Gem Version Build Status Maintainability Test Coverage

DeployPin

DeployPin

Sometimes we need to execute set of commands (tasks) after/before deployment. Most likely you use migrations for such things, but that is not what is related to migration at all. Also sometimes you need to execute some code before migration or later, after migration without blocking of main thread.

deploy_pins is exactly what you need.

Usage

To generate new task template file

rails g deploy_pin:task
# or
rails g deploy_pin:task --parallel

To list all pending tasks

rake deploy_pin:list

To run all pending tasks

rake deploy_pin:run

Groupped tasks

~~~ please define allowed groups in config/initializers/deploy_pin.rb ~~~

if you want to group tasks around "allowed_group"

rails g deploy_pin:task allowed_group
# or
rails g deploy_pin:task allowed_group --parallel

To list all pending tasks

rake deploy_pin:list[allowed_group]

To run all pending tasks

rake deploy_pin:run[allowed_group]

Installation

Add this line to your application's Gemfile:

gem 'deploy_pin'

And then execute:

$ bundle

Or install it yourself as:

$ gem install deploy_pin

then generate configuration file

rails g deploy_pin:install

and run migration

rake db:migrate

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.