Skip to content

Commit

Permalink
capistrano: defined? wasn't working well in this case. Switching to b…
Browse files Browse the repository at this point in the history
…egin/rescue is working much better now.
  • Loading branch information
Kieran Pilkington committed Jan 21, 2009
1 parent 0a0f51e commit c47dfc1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/recipes/apache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
end

def set_apache_clt
set :apache_ctl, "/etc/init.d/apache2" unless defined?(apache_ctl)
begin; apache_ctl; rescue; set(:apache_ctl, "/etc/init.d/apache2"); end
end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/recipes/db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
end

def set_app_environment
set :app_environment, 'production' unless defined?(app_environment)
begin; app_environment; rescue; set(:app_environment, 'production'); end
end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/recipes/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
end

def set_app_server
set :app_server, :apache unless defined?(app_server)
begin; app_server; rescue; set(:app_server, :apache); end
raise "Unknown Application Server #{app_server}" unless [:apache, :mongrel].include?(app_server)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/recipes/kete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def symlink_system_directory(dir, is_public=true)
end

def set_app_environment
set :app_environment, 'production' unless defined?(app_environment)
begin; app_environment; rescue; set(:app_environment, 'production'); end
end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/recipes/mongrel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
end

def set_mongrel_conf
set :mongrel_conf, "/etc/mongrel_cluster/#{application}.yml" unless defined?(mongrel_conf)
begin; mongrel_conf; rescue; set(:mongrel_conf, "/etc/mongrel_cluster/#{application}.yml"); end
end

end
Expand Down

0 comments on commit c47dfc1

Please sign in to comment.