lib/recipes/rails.rb in capitate-0.2.11 vs lib/recipes/rails.rb in capitate-0.2.13

- old
+ new

@@ -13,10 +13,12 @@ @set :db_pass, "the_password"@\n *db_host*: Database host (can be nil, if you are using socket). _Defaults to nil_\n *db_socket*: Database socket (can be nil, if you are using host). _Defaults to nil_\n @set :db_socket, "/var/lib/mysql/mysql.sock"@\n *database_yml_template*: Path to database yml erb template. _Defaults to <tt>rails/database.yml.erb</tt>_ (in this GEM)\n + + "Source":#{link_to_source(__FILE__)} DESC task :setup, :roles => :app do # Settings fetch(:db_name) @@ -47,12 +49,15 @@ # Log tasks namespace :logs do desc <<-DESC - Tail production log files.\n - http://errtheblog.com/posts/19-streaming-capistrano + Tail production log files. + + "From errtheblog":http://errtheblog.com/posts/19-streaming-capistrano + + "Source":#{link_to_source(__FILE__)} DESC task :tail, :roles => :web do run "tail -f #{shared_path}/log/production.log" do |channel, stream, data| puts # for an extra line break before the host name puts "#{channel[:host]}: #{data}" @@ -60,12 +65,15 @@ end end desc <<-DESC - Check production log files in TextMate.\n - See http://errtheblog.com/posts/19-streaming-capistrano + Check production log files in TextMate. + + "From errtheblog":http://errtheblog.com/posts/19-streaming-capistrano + + "Source":#{link_to_source(__FILE__)} DESC task :mate, :roles => :app do require 'tempfile' tmp = Tempfile.open('w') @@ -85,11 +93,14 @@ tmp.close end end desc <<-DESC - Remotely console.\n - See http://errtheblog.com/posts/19-streaming-capistrano + Remotely console. + + "From errtheblog":http://errtheblog.com/posts/19-streaming-capistrano + + "Source":#{link_to_source(__FILE__)} DESC task :console, :roles => :app do input = '' run "cd #{current_path} && ./script/console #{ENV['RAILS_ENV']}" do |channel, stream, data| next if data.chomp == input.chomp || data.chomp == ''