lib/shaddox/target.rb in shaddox-0.0.16 vs lib/shaddox/target.rb in shaddox-0.0.17
- old
+ new
@@ -68,11 +68,11 @@
class Actor
def initialize(&block)
instance_eval(&block)
end
- def exec(command)
+ def exec(command, opts = {})
raise "exec method must be implemented by Actor subclass"
end
def write_file(content, dest_path)
raise "write_file method must be implemented by Actor subclass"
end
@@ -81,10 +81,10 @@
class Localhost < Target
def new_actor(&block)
LocalActor.new(&block)
end
class LocalActor < Actor
- def exec(command)
+ def exec(command, opts = {})
system(command)
end
def write_file(content, dest_path)
File.open(dest_path, 'w') { |f| f.write(content) }
end