lib/mina/dsl.rb in mina-1.0.0.beta2 vs lib/mina/dsl.rb in mina-1.0.0.beta3
- old
+ new
@@ -17,14 +17,19 @@
def commands
@commands ||= Commands.new
end
+ def reset!
+ @commands = Commands.new
+ end
+
def run(backend)
@commands = Commands.new
yield
commands.run(backend)
+ @commands = Commands.new
end
def on(stage)
old_stage, commands.stage = commands.stage, stage
yield
@@ -38,10 +43,12 @@
real_commands.command(commands.process(path), quiet: true, indent: indent)
@commands = real_commands
end
def deploy(&block)
- command deploy_script(&block), quiet: true
+ run :remote do
+ command deploy_script(&block), quiet: true
+ end
end
end
end
extend Mina::DSL