lib/site_hook/cli.rb in site_hook-0.2.0 vs lib/site_hook/cli.rb in site_hook-0.3.0

- old
+ new

@@ -1,7 +1,8 @@ require 'thor' +require 'site_hook/config_class' module SiteHook def self.log_levels default = { 'hook' => 'info', 'build' => 'info', @@ -33,10 +34,14 @@ method_option(:log_levels, type: :hash, banner: 'LEVELS', default: SiteHook.log_levels) desc 'start', 'Start SiteHook' def start - SiteHook.mklogdir + + SiteHook.mklogdir unless Pathname(Dir.home).join('.jph', 'logs').exist? SiteHook::Webhook.run! end + + desc 'config SUBCOMMAND [OPTIONS]', 'Configure site_hook options' + subcommand('config', SiteHook::ConfigClass) end end