Guest User

Untitled

a guest
Jul 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. desc "remotely console"
  2. task :console, :roles => :app do
  3. input = ''
  4. run "cd #{current_path} && ./script/console #{ENV['RAILS_ENV']}" do |channel, stream, data|
  5. next if data.chomp == input.chomp || data.chomp == ''
  6. print data
  7. channel.send_data(input = $stdin.gets) if data =~ /^(>|\?)>/
  8. end
  9. end
Add Comment
Please, Sign In to add comment