Skip to content

Instantly share code, notes, and snippets.

@drogus
Forked from svenfuchs/README.md
Created December 12, 2012 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drogus/4269321 to your computer and use it in GitHub Desktop.
Save drogus/4269321 to your computer and use it in GitHub Desktop.

In your Gemfile add:

group :development, :test do
  gem 'micro_migrations', :git => 'git@gist.github.com:33e9f92c229eb808a4fa.git'
end

You might want to add something like this to the Rakefile of apps that use a gem that uses micro_migrations:

ENV['SCHEMA'] = "#{Gem.loaded_specs['your-gem-name'].full_gem_path}/db/schema.rb"
Gem::Specification.new do |s|
s.name = 'micro_migrations'
s.version = '0.0.1'
s.author = 'Sven Fuchs'
s.email = 'me@svenfuchs.com'
s.summary = 'Minimal ActiveRecord standalone migrations'
s.description = 'Minimal ActiveRecord standalone migrations.'
s.files = ['micro_migrations.rb']
s.require_path = '.'
end
require 'rails'
require 'active_record/railtie'
Bundler.require
app = Class.new(Rails::Application)
app.config.active_support.deprecation = :log
app.load_tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment