lib/jendle/plugin.rb in jendle-0.1.1 vs lib/jendle/plugin.rb in jendle-0.1.2

- old
+ new

@@ -9,11 +9,11 @@ ) plugins = source_client.plugin.list_installed plugins.each do |k, v| apply_proc(k) end - restart + @core.restart end def export(options) plugins = @client.plugin.list_installed File.open(options[:output],'w:utf-8') { |file| @@ -27,25 +27,18 @@ def apply(options) File.read(options[:file]).lines.each do |plugin| plugin = plugin.strip apply_proc(plugin) end - restart + @core.restart end def apply_proc(plugin) if !(@client.plugin.list_installed.key?(plugin)) @client.plugin.install(plugin) sleep 3 else @logger.info("already installed #{plugin}") - end - end - - def restart - if @client.plugin.restart_required? - @logger.info("restarting...") - @client.system.restart(true) end end end end