0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Tiny gem open to migration after it's generated throught rails generate migration ...
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
 Project Readme

PLEASE NOTE, THIS PROJECT IS NO LONGER BEING MAINTAINED

Migration opener

Each time after I generated new migration in Rails, I copy-pasted path of generated file and typed

subl -n db/migration/20130111084016_my_migration.rb.

So I decided to make migration_opener to open any migration after it's generated throught

rails generate migration ....

Sponsored by Evrone

Getting Started

Prerequisites

Support Ruby on Rails >= 4.1

Installation

Add this line to your application's Gemfile:

gem 'migration_opener'

And then execute:

$ bundle

To prevent enabling gem behavior for all project's developers, add to Gemfile:

gem 'migration_opener', require: ENV.key?('AUTOOPEN_MIGRATIONS')

Usage

By default migration_opener opens migration with $EDITOR variable, but you can change it using special $MIGRATION_EDITOR variable:

export MIGRATION_EDITOR="/usr/bin/editor --flag"

for Sublime Text 2 this option is:

export MIGRATION_EDITOR="subl -n"

for Textmate:

export MIGRATION_EDITOR="mate"

Contributing

Please read Code of Conduct and Contributing Guidelines for submitting pull requests to us.

Changelog

The changelog is here.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License.