migraine 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.
@@ -0,0 +1,27 @@
1
+ require 'minitest/autorun'
2
+ require 'migraine'
3
+
4
+ module SpecHelper
5
+ def create_test_connections_for(migration)
6
+ migration.instance_variable_set(
7
+ :@source_connection,
8
+ Sequel.sqlite
9
+ )
10
+ migration.instance_variable_get(:@source_connection).
11
+ create_table :old_table do
12
+ String :old_column
13
+ end
14
+
15
+ migration.instance_variable_set(
16
+ :@destination_connection,
17
+ Sequel.sqlite
18
+ )
19
+ migration.instance_variable_get(:@destination_connection).
20
+ create_table :new_table do
21
+ String :new_column
22
+ end
23
+
24
+ migration.instance_variable_get(:@source_connection)[:old_table].
25
+ insert(old_column: 'some text string')
26
+ end
27
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: migraine
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Daniel Nordstrom
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-01-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: &70210456015180 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *70210456015180
25
+ - !ruby/object:Gem::Dependency
26
+ name: sequel
27
+ requirement: &70210456014100 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70210456014100
36
+ description: Avoid a migraine when migrating your data from one database to another.
37
+ Simply specify which, and where, tables and columns should be migrated.
38
+ email:
39
+ - d@nintera.com
40
+ executables: []
41
+ extensions: []
42
+ extra_rdoc_files: []
43
+ files:
44
+ - .gitignore
45
+ - Gemfile
46
+ - README.md
47
+ - Rakefile
48
+ - examples/generated.rb
49
+ - examples/generation.rb
50
+ - examples/migration.rb
51
+ - lib/migraine.rb
52
+ - lib/migraine/generator.rb
53
+ - lib/migraine/map.rb
54
+ - lib/migraine/migration.rb
55
+ - lib/migraine/version.rb
56
+ - migraine.gemspec
57
+ - spec/map_spec.rb
58
+ - spec/migration_spec.rb
59
+ - spec/spec_helper.rb
60
+ homepage: ''
61
+ licenses: []
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubyforge_project: migraine
80
+ rubygems_version: 1.8.10
81
+ signing_key:
82
+ specification_version: 3
83
+ summary: Simple data migration scripts in Ruby.
84
+ test_files:
85
+ - spec/map_spec.rb
86
+ - spec/migration_spec.rb
87
+ - spec/spec_helper.rb