Cleaned up portions

This commit is contained in:
Tristan Ancelet 2024-10-19 11:20:47 -05:00
parent 72549ac3bf
commit b6226ad3cb

View File

@ -5,13 +5,13 @@
require 'erb' require 'erb'
require 'time' require 'time'
require 'json' require 'json'
require 'net/http'
require 'English'
require 'rubygems/package'
require 'fileutils'
require 'optparse'
require 'zlib' require 'zlib'
require 'find' require 'find'
require 'English'
require 'net/http'
require 'optparse'
require 'fileutils'
require 'rubygems/package'
# END: Includes & Requires # END: Includes & Requires
@ -23,7 +23,7 @@ require 'find'
class Dir class Dir
def / (path) def / (path)
output_path = File.absolute_path(self.path) + '/' + path output_path = File.join(self.path + '/' + path)
if File.directory? output_path if File.directory? output_path
Dir.new(output_path) Dir.new(output_path)
else else
@ -34,7 +34,7 @@ end
class String class String
def / (other) def / (other)
self + '/' + other File.join(self, other)
end end
end end
@ -293,10 +293,10 @@ end
# BEGIN: Work # BEGIN: Work
installer = Installer.new
case $CONFIG[:action] case $CONFIG[:action]
when 'install' when 'install'
installer = Installer.new
if installer.needs_update? if installer.needs_update?
puts "main: Installed Version will be updated" puts "main: Installed Version will be updated"
installer.download installer.download
@ -311,9 +311,9 @@ case $CONFIG[:action]
puts puts
puts " Report" puts " Report"
puts "-------------------------------------" puts "-------------------------------------"
puts " Remote Version: #{remote_version.to_s}" puts " Remote Version: #{installer.remote_version.to_s}"
puts " Local Version: #{local_version.to_s}" puts " Local Version: #{installer.local_version.to_s}"
puts " Needs Updating: #{(remote_version > local_version) ? "Yes" : "No"}" puts " Needs Updating: #{installer.needs_update? ? "Yes" : "No"}"
when 'backup' when 'backup'
make_backup make_backup