advancement 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in advancement.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Eloy Espinaco
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # Advancement
2
+
3
+ Progressive application retirement with TDD.
4
+
5
+ Advancement will help you write migrations and tests with your legacy data.
6
+ Then you can retire legacy applications making possible continius integration in
7
+ a phased rollout model.
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ gem 'advancement'
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ ## Usage
20
+
21
+ Generate the migration with test and fixtures
22
+
23
+ $ rails generate advancement places.dbf
24
+ create app/advancement/places_migration.rb
25
+ create test/unit/advancement/places_migration_test.rb
26
+ create test/unit/advancement/fixtures/places.yml
27
+
28
+ Write some tests for the migrations:
29
+
30
+ require 'test_helper'
31
+
32
+ class AdvancementPlacesTest < Advancement::TestCase
33
+
34
+ def test_two_places_are_migrated
35
+ run_migration
36
+ assert_migrated Place, :count => 2
37
+ end
38
+
39
+ end
40
+
41
+ Configure this migration in `'app/advancement/places_migration.rb'`
42
+
43
+ # places_migration.rb
44
+
45
+ class PlacesMigration < Advancement::Migration
46
+
47
+ Constrains = [:name]
48
+
49
+ def build_place seed
50
+ {name: seed.id, lat: seed.latit, lng: seed.longit}
51
+ end
52
+
53
+ end
54
+
55
+ Configure migrations in `'config/advancement.rb'`
56
+
57
+ # advancement.rb
58
+
59
+ Advancement.configure do |config|
60
+ config.encoding = "CP1252"
61
+ config.tables = ["places.dbf"]
62
+ end
63
+
64
+ Then run your migrations with
65
+
66
+ $ rake advancement:run_migrations
67
+
68
+ ## Contributing
69
+
70
+ 1. Fork it
71
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
72
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
73
+ 4. Push to the branch (`git push origin my-new-feature`)
74
+ 5. Create new Pull Request
75
+
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
@@ -0,0 +1,18 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/advancement/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Eloy Espinaco"]
6
+ gem.email = ["eloyesp@gmail.com"]
7
+ gem.description = %q{Progressive application retirement with TDD}
8
+ gem.summary = %q{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.}
9
+ gem.homepage = ""
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "advancement"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = Advancement::VERSION
17
+ end
18
+
@@ -0,0 +1,3 @@
1
+ module Advancement
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,5 @@
1
+ require "advancement/version"
2
+
3
+ module Advancement
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,3 @@
1
+ module Legacy
2
+ VERSION = "0.0.1"
3
+ end
data/lib/legacy.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "legacy/version"
2
+
3
+ module Legacy
4
+ # Your code goes here...
5
+ end
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: advancement
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Eloy Espinaco
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-11-01 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Progressive application retirement with TDD
15
+ email:
16
+ - eloyesp@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
22
+ - Gemfile
23
+ - LICENSE
24
+ - README.md
25
+ - Rakefile
26
+ - advancement.gemspec
27
+ - lib/advancement.rb
28
+ - lib/advancement/version.rb
29
+ - lib/legacy.rb
30
+ - lib/legacy/version.rb
31
+ homepage: ''
32
+ licenses: []
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ requirements: []
50
+ rubyforge_project:
51
+ rubygems_version: 1.8.24
52
+ signing_key:
53
+ specification_version: 3
54
+ summary: Advancement will help you write migrations and tests with your legacy data.
55
+ Then you can retire legacy applications making possible continius integration in
56
+ a phased rollout model.
57
+ test_files: []
58
+ has_rdoc: