0.0
No commit activity in last 3 years
No release in over 3 years
[currently in development] Progressive application retirement with TDD
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

 Project Readme

Advancement Gem Version

Progressive application retirement with TDD.

Advancement will help you write migrations and tests with your legacy data. Then you can retire legacy applications making possible continius integration in a phased rollout model.

Installation

Add this line to your application's Gemfile:

gem 'advancement'

And then execute:

$ bundle

Usage

Generate the migration with test and fixtures

$ rails generate advancement places.dbf
create  app/advancement/places_migration.rb
create  test/unit/advancement/places_migration_test.rb
create  test/unit/advancement/fixtures/places.yml

Write some tests for the migrations:

require 'test_helper'

class PlacesMigrationTest < Advancement::TestCase

  def test_two_places_are_migrated
    run_migration
    assert_migrated Place, :count => 2
  end

end

Configure this migration in 'app/advancement/places_migration.rb'

# places_migration.rb

class PlacesMigration < Advancement::Migration

  Constrains = [:name]

  def build_place seed
    {name: seed.id, lat: seed.latit, lng: seed.longit}
  end

end

Configure migrations in 'config/advancement.rb'

# advancement.rb

Advancement.configure do |config|
  config.encoding = "CP1252"
  config.tables = ["places.dbf"]
end

Then run your migrations with

$ rake advancement:run_migrations

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request