lib/jendle/cli.rb in jendle-0.1.0 vs lib/jendle/cli.rb in jendle-0.1.1

- old
+ new

@@ -10,14 +10,14 @@ class_option :profile, aliases: '-p', type: :string, default: 'default', desc: 'profile' def initialize(args = [], options = {}, config = {}) super(args, options, config) @global_options = config[:shell].base.options config = get_config(@global_options[:profile]) - core = Core.new(config) - @job = Job.new(core) - @view = View.new(core) - @plugin = Plugin.new(core) + @core = Core.new(config) + @job = Job.new(@core) + @view = View.new(@core) + @plugin = Plugin.new(@core) end desc 'export', 'export' def export invoke(:export_plugins, [], []) @@ -98,9 +98,14 @@ desc 'restore_views', 'restore_views' option :source_profile, type: :string, required: true, desc: 'file' option :'dry-run', aliases: '-d', type: :boolean, default: false, desc: 'dry-run' def restore_views @view.restore(options, get_config(options[:source_profile])) + end + + desc 'restart', 'restart' + def restart + @core.restart end desc 'version', 'show version' def version puts VERSION