lib/splash/cli/config.rb in prometheus-splash-0.3.0 vs lib/splash/cli/config.rb in prometheus-splash-0.4.0
- old
+ new
@@ -1,22 +1,23 @@
# coding: utf-8
module CLISplash
class Config < Thor
- include Splash::Config
+ include Splash::ConfigUtilities
include Splash::Helpers
include Splash::Exiter
+ include Splash::Loggers
desc "setup", "Setup installation fo Splash"
long_desc <<-LONGDESC
- Setup installation fo Splash
+ Setup installation fo Splash\n
with --preserve, preserve from reinstallation of the config
LONGDESC
option :preserve, :type => :boolean
def setup
- acase = run_as_root :setupsplash
+ acase = run_as_root :setupsplash, options
splash_exit acase
end
desc "sanitycheck", "Verify installation fo Splash"
def sanitycheck
@@ -24,12 +25,13 @@
splash_exit acase
end
desc "version", "display current Splash version"
def version
+ log = get_logger
config = get_config
- puts "Splash version : #{config.version}, Author : #{config.author}"
- puts config.copyright
+ log.info "Splash version : #{config.version}, Author : #{config.author}"
+ log_info config.copyright
splash_exit case: :quiet_exit
end
end