lib/tasks/capistrano_tasks.rb in switches-0.1.1 vs lib/tasks/capistrano_tasks.rb in switches-0.1.2

- old
+ new

@@ -21,9 +21,10 @@ # Hash.from_xml(a.gsub(/\n+/, ''))['hash'] namespace :s do %w{ c d on off clear reset backup restore default }.each do |cmd| task cmd.to_sym, :roles => lambda { roles.keys.map(&:to_s).grep(/app/).map(&:to_sym) } do + upload File.join(File.dirname(__FILE__), '..', '..', 'lib', 'tasks', 'switches.rake'), File.join(deploy_to, 'current', 'lib', 'tasks', 'switches.rake') # download switches xml from servers raw_input = Hash.new run "cd #{deploy_to}/current; rake --silent s:#{cmd}#{"[#{ENV['ARG']}]" if ENV['ARG'].present?} RAILS_ENV=#{rails_env}; true" do |channel, stream, data| server = channel[:server]