lib/yawast.rb in yawast-0.7.0.beta1 vs lib/yawast.rb in yawast-0.7.0.beta2
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
# Require all of the Ruby files in the given directory.
#
# path - The String relative path from here to the directory.
def require_all(path)
glob = File.join(File.dirname(__FILE__), path + '/**/', '*.rb')
@@ -37,22 +39,30 @@
puts ''
puts "YAWAST v#{VERSION} - #{DESCRIPTION}"
puts ' Copyright (c) 2013-2019 Adam Caudill <adam@adamcaudill.com>'
puts ' Support & Documentation: https://github.com/adamcaudill/yawast'
puts " Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}; #{OpenSSL::OPENSSL_VERSION} (#{RUBY_PLATFORM})"
- puts " Started at #{Time.now.strftime("%Y-%m-%d %H:%M:%S %Z")}"
+ puts " Started at #{Time.now.strftime('%Y-%m-%d %H:%M:%S %Z')}"
begin
version = Yawast::Shared::Http.get_json(URI('https://rubygems.org/api/v1/versions/yawast/latest.json'))['version']
if version != VERSION
puts " Latest Version: YAWAST v#{version} is the officially supported version, please update.".blue
end
rescue
- #we don't care, this is a best effort check
+ # we don't care, this is a best effort check
end
puts ''
+ end
+
+ def self.options
+ @options
+ end
+
+ def self.options=(opts)
+ @options = opts
end
STDOUT.sync = true
trap 'SIGINT' do