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 some_task_title
# or
rails g deploy_pin:task some_task_title --parallel
Also, you can specify author
rails g deploy_pin:task some_task_title -a author_name
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 task_title -g allowed_group
# or
rails g deploy_pin:task task_title -g 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]
Run by uuid
To run some specific task by uuid
rake deploy_pin:run['uuid_1, uuid_2']
Or you can combine uuid and group
rake deploy_pin:run['uuid, allowed_group']
In case if you want to rerun task you should add exclamation mark in the end of uuid
rake deploy_pin:run['uuid_1!, uuid_2!']
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.