Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix erros in 1.8.6 #21

Open
wants to merge 8 commits into from
This page is out of date. Refresh to see the latest.
View
8 lib/inploy/dsl.rb
@@ -3,9 +3,11 @@ module DSL
module ClassMethods
def define_callbacks(*callbacks)
callbacks.each do |callback|
- define_method callback do |&block|
- instance_variable_set "@#{callback}", block
- end
+ class_eval <<-METHOD
+ def #{callback} &block
+ instance_variable_set("@#{callback}", block)
+ end
+ METHOD
end
end
end
View
2  spec/deploy_spec.rb
@@ -135,7 +135,7 @@ def setup(subject)
it "should exec the commands in all hosts" do
subject.hosts = ['host0', 'host1', 'host2']
- 3.times.each do |i|
+ 3.times do |i|
expect_command "ssh #{@ssh_opts} #{@user}@host#{i} 'cd #{@path}/#{@application} && rake inploy:local:update RAILS_ENV=#{@environment} environment=#{@environment}'"
end
subject.remote_update
View
2  spec/rails3_push_spec.rb
@@ -32,7 +32,7 @@
it "should push git repository and runs the local update on all hosts" do
subject.hosts = ['host0', 'host1', 'host2']
- 3.times.each do |i|
+ 3.times do |i|
expect_command "git push -f batman@host#{i}:/fakie/path/robin live"
expect_command "ssh #{@ssh_opts} batman@host#{i} 'cd /fakie/path/robin && git reset --hard && git clean -f -d -e public/system && git submodule update --init && bundle install --deployment'"
expect_command "ssh #{@ssh_opts} batman@host#{i} 'cd /fakie/path/robin && rake inploy:local:update RAILS_ENV=production environment=production'"
Something went wrong with that request. Please try again.