Skip to content

coders51/rails51

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails51

This gem adds some handy capistrano tasks (for now)

Installation

Add this line to your application's Gemfile:

gem 'rails51', github: 'coders51/rails51'

Capistrano Tasks

To use capistrano tasks in your project add this line in your Capfile

require 'rails51/capistrano'

pg:import

This task imports in local postgres database a remote dump. Just call

cap production pg:import

This will:

  1. Dump the database on the server with --clean and --no-owner flags, and gzips it. Fetch database name and eventually port from :release_path/config/database.yml file
  2. Download the file and uncompress
  3. Import in the database defined in local database.yml file

New

  • Password authentication now available. The task will attempt to create the appropriate ~/.pgpass file. Feel free to report any issue

mysql:import

This task imports in local mysql database a remote dump. Just call

cap production mysql:import

This will:

  1. Dump the database on the server and gzips it. Fetch database name, user, password and eventually port from :release_path/config/database.yml file
  2. Download the file and uncompress
  3. Import in the database defined in local database.yml file

logs:tail

This task simply stream the tail -f results of log/#{fetch(:rails_env, 'production')}.log file locally.

Known Issues: If you use Airbrussh, you won't see anything because all the stdout is sent to log/capistrano.log. You can either use my fork or wait for this pr to be merged.

rails:console

Inspired (and mostly copied) from capistrano-rails-console this task allows you to launch a rails console in the target environment without the need of ssh, find the right directory, RAILS_ENV etc etc...

Just type

cap production rails:console

and you will have your console.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/rails51/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Rails51 add some capistrano task and some project sanity checker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages