lib/repla/lib/module.rb in repla-0.5.2 vs lib/repla/lib/module.rb in repla-0.5.3

- old
+ new

@@ -3,10 +3,15 @@ # Repla module Repla using Escape + @debug = false + class << self + attr_accessor :debug + end + LOAD_PLUGIN_SCRIPT = File.join(APPLESCRIPT_DIRECTORY, 'load_plugin.scpt') def self.load_plugin(path) run_applescript(LOAD_PLUGIN_SCRIPT, [path]) end @@ -80,9 +85,10 @@ command += ' ' + arguments.compact.map(&:to_s).map do |x| x.shell_escape end.join(' ') end + puts command if @debug result = `#{command}` result.chomp! return nil if result.empty?