MigrationReporter
Provides a rake task to report Active Record migration details to a given URL.
Installation
Add this line to your application's Gemfile:
gem 'migration_reporter'
And then execute:
$ bundle
Or install it yourself as:
$ gem install migration_reporter
Usage
Pass the URL to which the migration details should be reported:
rake migration_reporter:report_migrations[http://my-build-server.com/migrations]
You can also provide an optional limit parameter, to only report the latest few migrations:
rake migration_reporter:report_migrations[http://my-build-server.com/migrations,5]
Payload format
Each migration is sent individually as a HTTP POST in the following JSON format:
{
"name" : "MyMigration",
"version" : 20140102030405,
"filename" : "20140102030405_my_migration.rb",
"contents" : "class MyMigration < ActiveRecord::Migration\n...",
"status" : "up"
}
Contributing
- Fork it ( https://github.com/intercom/migration_reporter/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request