From 745a99367f39840201b0d8b28f7c3299276337da Mon Sep 17 00:00:00 2001 From: Eric Budd Date: Wed, 24 Jan 2018 00:13:46 -0500 Subject: [PATCH] Comments and fixes --- iris.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/iris.rb b/iris.rb index 107a27f..e6d93d1 100644 --- a/iris.rb +++ b/iris.rb @@ -1,6 +1,7 @@ #!/usr/bin/env ruby #TODO: Validate author with file owner +#TODO: Create struct to firm up message payload require 'time' require 'base64' @@ -9,11 +10,11 @@ require 'socket' require 'json' class Config - CONFIG_FILE = self.get[:config_file] || "#{ENV['HOME']}/.iris.config.json" - MESSAGE_FILE = self.get[:message_file] || "#{ENV['HOME']}/.iris.messages" + CONFIG_FILE = "#{ENV['HOME']}/.iris.config.json" + MESSAGE_FILE = "#{ENV['HOME']}/.iris.messages" USER = ENV['USER'] || ENV['LOGNAME'] || ENV['USERNAME'] - HOSTNAME = self.get[:hostname] || Socket.gethostname + HOSTNAME = Socket.gethostname AUTHOR = "#{USER}@#{HOSTNAME}" def self.get(filepath = CONFIG_FILE)