Skip to content

Instantly share code, notes, and snippets.

@drogus
Forked from svenfuchs/README.md
Created December 12, 2012 16:36
Show Gist options
  • Select an option

  • Save drogus/4269321 to your computer and use it in GitHub Desktop.

Select an option

Save drogus/4269321 to your computer and use it in GitHub Desktop.

Revisions

  1. drogus revised this gist Dec 12, 2012. 1 changed file with 1 addition and 6 deletions.
    7 changes: 1 addition & 6 deletions micro_migrations.rb
    Original file line number Diff line number Diff line change
    @@ -5,9 +5,4 @@

    app = Class.new(Rails::Application)
    app.config.active_support.deprecation = :log

    Rake::Task['environment'].enhance do
    app.initialize!
    end

    app.load_tasks
    app.load_tasks
  2. drogus revised this gist Dec 12, 2012. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion micro_migrations.rb
    Original file line number Diff line number Diff line change
    @@ -5,8 +5,9 @@

    app = Class.new(Rails::Application)
    app.config.active_support.deprecation = :log
    app.load_tasks

    Rake::Task['environment'].enhance do
    app.initialize!
    end

    app.load_tasks
  3. Sven Fuchs created this gist Mar 19, 2012.
    9 changes: 9 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    In your Gemfile add:

    group :development, :test do
    gem 'micro_migrations', :git => '[email protected]: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"
    11 changes: 11 additions & 0 deletions micro_migrations.gemspec
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    Gem::Specification.new do |s|
    s.name = 'micro_migrations'
    s.version = '0.0.1'
    s.author = 'Sven Fuchs'
    s.email = '[email protected]'
    s.summary = 'Minimal ActiveRecord standalone migrations'
    s.description = 'Minimal ActiveRecord standalone migrations.'

    s.files = ['micro_migrations.rb']
    s.require_path = '.'
    end
    12 changes: 12 additions & 0 deletions micro_migrations.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    require 'rails'
    require 'active_record/railtie'

    Bundler.require

    app = Class.new(Rails::Application)
    app.config.active_support.deprecation = :log
    app.load_tasks

    Rake::Task['environment'].enhance do
    app.initialize!
    end