data_migrate 3.0.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -1
  3. data/.hound.yml +4 -0
  4. data/.overcommit.yml +21 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +2 -0
  7. data/.ruby-style.yml +1061 -0
  8. data/.travis.yml +16 -0
  9. data/Appraisals +17 -0
  10. data/Changelog.md +35 -0
  11. data/Gemfile.rails5 +5 -0
  12. data/Gemfile.rails5.1 +5 -0
  13. data/Gemfile.rails5.2 +5 -0
  14. data/README.md +58 -41
  15. data/data_migrate.gemspec +12 -1
  16. data/gemfiles/rails_4.1.gemfile +7 -0
  17. data/gemfiles/rails_4.2.gemfile +8 -0
  18. data/gemfiles/rails_5.0.gemfile +7 -0
  19. data/gemfiles/rails_5.1.gemfile +7 -0
  20. data/gemfiles/rails_5.2.gemfile +7 -0
  21. data/lib/data_migrate/data_migrator.rb +53 -8
  22. data/lib/data_migrate/data_migrator_five.rb +84 -0
  23. data/lib/data_migrate/data_schema.rb +63 -0
  24. data/lib/data_migrate/data_schema_migration.rb +1 -0
  25. data/lib/data_migrate/database_tasks.rb +82 -0
  26. data/lib/data_migrate/migration.rb +1 -1
  27. data/lib/data_migrate/migration_context.rb +90 -0
  28. data/lib/data_migrate/migration_five.rb +26 -0
  29. data/lib/data_migrate/railtie.rb +1 -1
  30. data/lib/data_migrate/schema_dumper.rb +42 -0
  31. data/lib/data_migrate/schema_migration.rb +31 -0
  32. data/lib/data_migrate/schema_migration_five.rb +31 -0
  33. data/lib/data_migrate/status_service.rb +65 -0
  34. data/lib/data_migrate/status_service_five.rb +48 -0
  35. data/lib/data_migrate/tasks/data_migrate_tasks.rb +25 -0
  36. data/lib/data_migrate/version.rb +1 -1
  37. data/lib/data_migrate.rb +30 -4
  38. data/lib/generators/data_migration/data_migration_generator.rb +17 -16
  39. data/lib/generators/data_migration/templates/data_migration.rb +4 -4
  40. data/screenshot.png +0 -0
  41. data/spec/data_migrate/data_migrator_spec.rb +50 -0
  42. data/spec/data_migrate/data_schema_migration_spec.rb +16 -0
  43. data/spec/data_migrate/data_spec.rb +87 -0
  44. data/spec/data_migrate/database_tasks_spec.rb +114 -0
  45. data/spec/data_migrate/migration.rb +19 -0
  46. data/spec/data_migrate/migration_context_spec.rb +107 -0
  47. data/spec/data_migrate/schema_dumper_spec.rb +46 -0
  48. data/spec/data_migrate/schema_migration_spec.rb +69 -0
  49. data/spec/data_migrate/status_service_spec.rb +93 -0
  50. data/spec/data_migrate/tasks/data_migrate_tasks_spec.rb +50 -0
  51. data/spec/db/4.2/20091231235959_some_name.rb +9 -0
  52. data/spec/db/4.2/20171231235959_super_update.rb +9 -0
  53. data/spec/db/5.0/20091231235959_some_name.rb +9 -0
  54. data/spec/db/5.0/20171231235959_super_update.rb +9 -0
  55. data/spec/db/data/20091231235959_some_name.rb +9 -0
  56. data/spec/db/data/20171231235959_super_update.rb +9 -0
  57. data/spec/db/migrate/4.2/20131111111111_late_migration.rb +9 -0
  58. data/spec/db/migrate/4.2/20202020202011_db_migration.rb +9 -0
  59. data/spec/db/migrate/5.0/20131111111111_late_migration.rb +9 -0
  60. data/spec/db/migrate/5.0/20202020202011_db_migration.rb +9 -0
  61. data/spec/db/migrate/5.2/20131111111111_late_migration.rb +9 -0
  62. data/spec/db/migrate/5.2/20202020202011_db_migration.rb +9 -0
  63. data/spec/generators/data_migration/data_migration_generator_spec.rb +27 -0
  64. data/spec/spec_helper.rb +9 -0
  65. data/tasks/databases.rake +69 -62
  66. metadata +221 -6
@@ -0,0 +1,9 @@
1
+ class LateMigration < ActiveRecord::Migration[5.2]
2
+ def up
3
+ puts "Doing schema LateMigration"
4
+ end
5
+
6
+ def down
7
+ puts "Undoing LateMigration"
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class DbMigration < ActiveRecord::Migration[5.2]
2
+ def up
3
+ puts "Doing schema migration"
4
+ end
5
+
6
+ def down
7
+ puts "Undoing DbMigration"
8
+ end
9
+ end
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+ require 'rails/generators'
3
+ require 'rails/generators/migration'
4
+ require 'generators/data_migration/data_migration_generator'
5
+
6
+ describe DataMigrate::Generators::DataMigrationGenerator do
7
+ let(:subject) { DataMigrate::Generators::DataMigrationGenerator }
8
+ describe :next_migration_number do
9
+ it "next migration" do
10
+ Timecop.freeze("2016-12-03 22:15:26 -0800") do
11
+ expect(ActiveRecord::Base).to receive(:timestamped_migrations) { true }
12
+ expect(subject.next_migration_number(1)).to eq("20161204061526")
13
+ end
14
+ end
15
+ end
16
+
17
+ describe :migration_base_class_name do
18
+ let(:subject) { DataMigrate::Generators::DataMigrationGenerator.new(['my_migration']) }
19
+ it "returns the correct base class name" do
20
+ if ActiveRecord.version >= Gem::Version.new('5.0')
21
+ expect(subject.send(:migration_base_class_name)).to eq("ActiveRecord::Migration[#{ActiveRecord::Migration.current_version}]")
22
+ else
23
+ expect(subject.send(:migration_base_class_name)).to eq('ActiveRecord::Migration')
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,9 @@
1
+ require 'rspec'
2
+ require 'rails'
3
+ require 'data_migrate'
4
+ require 'pry'
5
+ require 'timecop'
6
+
7
+ if Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR == 2
8
+ DataMigrate::DataMigrator.migrations_paths = ["spec/db/data"]
9
+ end
data/tasks/databases.rake CHANGED
@@ -1,3 +1,5 @@
1
+ require 'data_migrate/tasks/data_migrate_tasks'
2
+
1
3
  namespace :db do
2
4
  namespace :migrate do
3
5
  desc "Migrate the database data and schema (options: VERSION=x, VERBOSE=false)."
@@ -49,7 +51,7 @@ namespace :db do
49
51
  DataMigrate::DataMigrator.run(migration[:direction], "db/data/", migration[:version])
50
52
  else
51
53
  ActiveRecord::Migration.write("== %s %s" % ['Schema', "=" * 69])
52
- ActiveRecord::Migrator.run(
54
+ DataMigrate::SchemaMigration.run(
53
55
  migration[:direction],
54
56
  Rails.application.config.paths["db/migrate"],
55
57
  migration[:version]
@@ -57,7 +59,8 @@ namespace :db do
57
59
  end
58
60
  end
59
61
 
60
- Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
62
+ Rake::Task["db:_dump"].invoke
63
+ Rake::Task["data:dump"].invoke
61
64
  end
62
65
 
63
66
  namespace :redo do
@@ -93,9 +96,12 @@ namespace :db do
93
96
  DataMigrate::DataMigrator.run(:up, "db/data/", migration[:version])
94
97
  else
95
98
  ActiveRecord::Migration.write("== %s %s" % ['Schema', "=" * 69])
96
- ActiveRecord::Migrator.run(:up, "db/migrate/", migration[:version])
99
+ DataMigrate::SchemaMigration.run(:up, "db/migrate/", migration[:version])
97
100
  end
98
101
  end
102
+
103
+ Rake::Task["db:_dump"].invoke
104
+ Rake::Task["data:dump"].invoke
99
105
  end
100
106
  end
101
107
 
@@ -118,9 +124,12 @@ namespace :db do
118
124
  DataMigrate::DataMigrator.run(:down, "db/data/", migration[:version])
119
125
  else
120
126
  ActiveRecord::Migration.write("== %s %s" % ['Schema', "=" * 69])
121
- ActiveRecord::Migrator.run(:down, "db/migrate/", migration[:version])
127
+ DataMigrate::SchemaMigration.run(:down, "db/migrate/", migration[:version])
122
128
  end
123
129
  end
130
+
131
+ Rake::Task["db:_dump"].invoke
132
+ Rake::Task["data:dump"].invoke
124
133
  end
125
134
  end
126
135
 
@@ -130,8 +139,12 @@ namespace :db do
130
139
  config = connect_to_database
131
140
  next unless config
132
141
 
133
- db_list_data = ActiveRecord::Base.connection.select_values("SELECT version FROM #{DataMigrate::DataMigrator.schema_migrations_table_name}")
134
- db_list_schema = ActiveRecord::Base.connection.select_values("SELECT version FROM #{ActiveRecord::Migrator.schema_migrations_table_name}")
142
+ db_list_data = ActiveRecord::Base.connection.select_values(
143
+ "SELECT version FROM #{DataMigrate::DataSchemaMigration.table_name}"
144
+ )
145
+ db_list_schema = ActiveRecord::Base.connection.select_values(
146
+ "SELECT version FROM #{ActiveRecord::SchemaMigration.schema_migrations_table_name}"
147
+ )
135
148
  file_list = []
136
149
 
137
150
  Dir.foreach(File.join(Rails.root, 'db', 'data')) do |file|
@@ -184,6 +197,9 @@ namespace :db do
184
197
  ActiveRecord::Migrator.run(:down, "db/migrate/", past_migration[:version])
185
198
  end
186
199
  end
200
+
201
+ Rake::Task["db:_dump"].invoke
202
+ Rake::Task["data:dump"].invoke
187
203
  end
188
204
  end
189
205
 
@@ -191,19 +207,10 @@ namespace :db do
191
207
  desc 'Pushes the schema to the next version (specify steps w/ STEP=n).'
192
208
  task :with_data => :environment do
193
209
  assure_data_schema_table
194
- # TODO: No worky for .forward
195
210
  step = ENV['STEP'] ? ENV['STEP'].to_i : 1
196
- # DataMigrate::DataMigrator.forward('db/data/', step)
197
- migrations = pending_migrations.reverse.pop(step).reverse
198
- migrations.each do | pending_migration |
199
- if pending_migration[:kind] == :data
200
- ActiveRecord::Migration.write("== %s %s" % ['Data', "=" * 71])
201
- DataMigrate::DataMigrator.run(:up, "db/data/", pending_migration[:version])
202
- elsif pending_migration[:kind] == :schema
203
- ActiveRecord::Migration.write("== %s %s" % ['Schema', "=" * 69])
204
- ActiveRecord::Migrator.run(:up, "db/migrate/", pending_migration[:version])
205
- end
206
- end
211
+ DataMigrate::DatabaseTasks.forward(step)
212
+ Rake::Task["db:_dump"].invoke
213
+ Rake::Task["data:dump"].invoke
207
214
  end
208
215
  end
209
216
 
@@ -215,14 +222,24 @@ namespace :db do
215
222
  puts "Current Data version: #{DataMigrate::DataMigrator.current_version}"
216
223
  end
217
224
  end
225
+
226
+ namespace :schema do
227
+ namespace :load do
228
+ desc "Load both schema.rb and data_schema.rb file into the database"
229
+ task with_data: :environment do
230
+ Rake::Task["db:schema:load"].invoke
231
+
232
+ DataMigrate::DatabaseTasks.load_schema_current(:ruby, ENV["SCHEMA"])
233
+ end
234
+ end
235
+ end
218
236
  end
219
237
 
220
238
  namespace :data do
221
239
  desc 'Migrate data migrations (options: VERSION=x, VERBOSE=false)'
222
240
  task :migrate => :environment do
223
- assure_data_schema_table
224
- #ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
225
- DataMigrate::DataMigrator.migrate("db/data/", ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
241
+ DataMigrate::Tasks::DataMigrateTasks.migrate
242
+ Rake::Task["data:dump"].invoke
226
243
  end
227
244
 
228
245
  namespace :migrate do
@@ -244,6 +261,7 @@ namespace :data do
244
261
  version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
245
262
  raise "VERSION is required" unless version
246
263
  DataMigrate::DataMigrator.run(:up, "db/data/", version)
264
+ Rake::Task["data:dump"].invoke
247
265
  end
248
266
 
249
267
  desc 'Runs the "down" for a given migration VERSION.'
@@ -252,36 +270,16 @@ namespace :data do
252
270
  raise "VERSION is required" unless version
253
271
  assure_data_schema_table
254
272
  DataMigrate::DataMigrator.run(:down, "db/data/", version)
273
+ Rake::Task["data:dump"].invoke
255
274
  end
256
275
 
257
276
  desc "Display status of data migrations"
258
277
  task :status => :environment do
259
278
  config = ActiveRecord::Base.configurations[Rails.env || 'development']
260
279
  ActiveRecord::Base.establish_connection(config)
261
- unless ActiveRecord::Base.connection.table_exists?(DataMigrate::DataMigrator.schema_migrations_table_name)
262
- puts 'Data migrations table does not exist yet.'
263
- next # means "return" for rake task
264
- end
265
- db_list = ActiveRecord::Base.connection.select_values("SELECT version FROM #{DataMigrate::DataMigrator.schema_migrations_table_name}")
266
- file_list = []
267
- Dir.foreach(File.join(Rails.root, 'db', 'data')) do |file|
268
- # only files matching "20091231235959_some_name.rb" pattern
269
- if match_data = /(\d{14})_(.+)\.rb/.match(file)
270
- status = db_list.delete(match_data[1]) ? 'up' : 'down'
271
- file_list << [status, match_data[1], match_data[2]]
272
- end
273
- end
274
- # output
280
+ connection = ActiveRecord::Base.connection
275
281
  puts "\ndatabase: #{config['database']}\n\n"
276
- puts "#{"Status".center(8)} #{"Migration ID".ljust(14)} Migration Name"
277
- puts "-" * 50
278
- file_list.each do |file|
279
- puts "#{file[0].center(8)} #{file[1].ljust(14)} #{file[2].humanize}"
280
- end
281
- db_list.each do |version|
282
- puts "#{'up'.center(8)} #{version.ljust(14)} *** NO FILE ***"
283
- end
284
- puts
282
+ DataMigrate::StatusService.dump(connection)
285
283
  end
286
284
  end
287
285
 
@@ -290,6 +288,7 @@ namespace :data do
290
288
  assure_data_schema_table
291
289
  step = ENV['STEP'] ? ENV['STEP'].to_i : 1
292
290
  DataMigrate::DataMigrator.rollback('db/data/', step)
291
+ Rake::Task["data:dump"].invoke
293
292
  end
294
293
 
295
294
  desc 'Pushes the schema to the next version (specify steps w/ STEP=n).'
@@ -302,6 +301,7 @@ namespace :data do
302
301
  migrations.each do | pending_migration |
303
302
  DataMigrate::DataMigrator.run(:up, "db/data/", pending_migration[:version])
304
303
  end
304
+ Rake::Task["data:dump"].invoke
305
305
  end
306
306
 
307
307
  desc "Retrieves the current schema version number for data migrations"
@@ -309,24 +309,36 @@ namespace :data do
309
309
  assure_data_schema_table
310
310
  puts "Current data version: #{DataMigrate::DataMigrator.current_version}"
311
311
  end
312
+
313
+ desc "Create a db/data_schema.rb file that stores the current data version"
314
+ task dump: :environment do
315
+ if ActiveRecord::Base.dump_schema_after_migration
316
+ filename = DataMigrate::DatabaseTasks.data_schema_file
317
+ File.open(filename, "w:utf-8") do |file|
318
+ DataMigrate::SchemaDumper.dump(ActiveRecord::Base.connection, file)
319
+ end
320
+ end
321
+
322
+ # Allow this task to be called as many times as required. An example
323
+ # is the migrate:redo task, which calls other two internally
324
+ # that depend on this one.
325
+ Rake::Task["data:dump"].reenable
326
+ end
312
327
  end
313
328
 
314
329
  def pending_migrations
315
- sort_migrations pending_data_migrations, pending_schema_migrations
330
+ DataMigrate::DatabaseTasks.sort_migrations(
331
+ DataMigrate::DatabaseTasks.pending_schema_migrations,
332
+ DataMigrate::DatabaseTasks.pending_data_migrations
333
+ )
316
334
  end
317
335
 
318
336
  def pending_data_migrations
319
- data_migrations = DataMigrate::DataMigrator.migrations('db/data')
320
- sort_migrations DataMigrate::DataMigrator.new(:up, data_migrations ).
321
- pending_migrations.map{|m| { :version => m.version, :kind => :data }}
337
+ DataMigrate::DatabaseTasks.pending_data_migrations
322
338
  end
323
339
 
324
340
  def pending_schema_migrations
325
- all_migrations = ActiveRecord::Migrator.migrations(Rails.application.config.paths["db/migrate"])
326
- sort_migrations(
327
- ActiveRecord::Migrator.new(:up, all_migrations).
328
- pending_migrations.
329
- map{|m| { :version => m.version, :kind => :schema }})
341
+ DataMigrate::DatabaseTasks.pending_schema_migrations
330
342
  end
331
343
 
332
344
  def sort_migrations set_1, set_2=nil
@@ -342,24 +354,19 @@ def connect_to_database
342
354
  config = ActiveRecord::Base.configurations[Rails.env || 'development']
343
355
  ActiveRecord::Base.establish_connection(config)
344
356
 
345
- unless ActiveRecord::Base.connection.table_exists?(DataMigrate::DataMigrator.schema_migrations_table_name)
357
+ unless DataMigrate::DataSchemaMigration.table_exists?
346
358
  puts 'Data migrations table does not exist yet.'
347
359
  config = nil
348
360
  end
349
- unless ActiveRecord::Base.connection.table_exists?(ActiveRecord::Migrator.schema_migrations_table_name)
361
+ unless ActiveRecord::SchemaMigration.table_exists?
350
362
  puts 'Schema migrations table does not exist yet.'
351
363
  config = nil
352
364
  end
353
365
  config
354
366
  end
355
367
 
356
- def past_migrations sort=nil
357
- sort = sort.downcase if sort
358
- db_list_data = ActiveRecord::Base.connection.select_values("SELECT version FROM #{DataMigrate::DataMigrator.schema_migrations_table_name}").sort
359
- db_list_schema = ActiveRecord::Base.connection.select_values("SELECT version FROM #{ActiveRecord::Migrator.schema_migrations_table_name}").sort
360
- migrations = db_list_data.map{|d| {:version => d.to_i, :kind => :data }} + db_list_schema.map{|d| {:version => d.to_i, :kind => :schema }}
361
-
362
- sort == 'asc' ? sort_migrations(migrations) : sort_migrations(migrations).reverse
368
+ def past_migrations(sort=nil)
369
+ DataMigrate::DatabaseTasks.past_migrations(sort)
363
370
  end
364
371
 
365
372
  def assure_data_schema_table
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_migrate
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew J Vargo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-10-15 00:00:00.000000000 Z
12
+ date: 2018-05-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -17,14 +17,154 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '4.0'
20
+ version: '4.2'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '4.0'
27
+ version: '4.2'
28
+ - !ruby/object:Gem::Dependency
29
+ name: appraisal
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rspec
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rspec-core
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: pry
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: rb-readline
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: sqlite3
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: timecop
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: rubocop
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: overcommit
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
28
168
  description: Rake tasks to migrate data alongside schema changes.
29
169
  email:
30
170
  - ajvargo@computer.org
@@ -34,24 +174,75 @@ extensions: []
34
174
  extra_rdoc_files: []
35
175
  files:
36
176
  - ".gitignore"
177
+ - ".hound.yml"
178
+ - ".overcommit.yml"
179
+ - ".rspec"
180
+ - ".rubocop.yml"
181
+ - ".ruby-style.yml"
182
+ - ".travis.yml"
183
+ - Appraisals
37
184
  - Changelog.md
38
185
  - Gemfile
186
+ - Gemfile.rails5
187
+ - Gemfile.rails5.1
188
+ - Gemfile.rails5.2
39
189
  - LICENSE
40
190
  - README.md
41
191
  - Rakefile
42
192
  - data_migrate.gemspec
193
+ - gemfiles/rails_4.1.gemfile
194
+ - gemfiles/rails_4.2.gemfile
195
+ - gemfiles/rails_5.0.gemfile
196
+ - gemfiles/rails_5.1.gemfile
197
+ - gemfiles/rails_5.2.gemfile
43
198
  - lib/capistrano/data_migrate.rb
44
199
  - lib/capistrano/data_migrate/migrate.rb
45
200
  - lib/data_migrate.rb
46
201
  - lib/data_migrate/data_migrator.rb
202
+ - lib/data_migrate/data_migrator_five.rb
203
+ - lib/data_migrate/data_schema.rb
47
204
  - lib/data_migrate/data_schema_migration.rb
205
+ - lib/data_migrate/database_tasks.rb
48
206
  - lib/data_migrate/migration.rb
207
+ - lib/data_migrate/migration_context.rb
208
+ - lib/data_migrate/migration_five.rb
49
209
  - lib/data_migrate/railtie.rb
210
+ - lib/data_migrate/schema_dumper.rb
211
+ - lib/data_migrate/schema_migration.rb
212
+ - lib/data_migrate/schema_migration_five.rb
213
+ - lib/data_migrate/status_service.rb
214
+ - lib/data_migrate/status_service_five.rb
215
+ - lib/data_migrate/tasks/data_migrate_tasks.rb
50
216
  - lib/data_migrate/version.rb
51
217
  - lib/generators/data_migrate.rb
52
218
  - lib/generators/data_migration/data_migration_generator.rb
53
219
  - lib/generators/data_migration/templates/data_migration.rb
54
220
  - lib/generators/data_migration/templates/migration.rb
221
+ - screenshot.png
222
+ - spec/data_migrate/data_migrator_spec.rb
223
+ - spec/data_migrate/data_schema_migration_spec.rb
224
+ - spec/data_migrate/data_spec.rb
225
+ - spec/data_migrate/database_tasks_spec.rb
226
+ - spec/data_migrate/migration.rb
227
+ - spec/data_migrate/migration_context_spec.rb
228
+ - spec/data_migrate/schema_dumper_spec.rb
229
+ - spec/data_migrate/schema_migration_spec.rb
230
+ - spec/data_migrate/status_service_spec.rb
231
+ - spec/data_migrate/tasks/data_migrate_tasks_spec.rb
232
+ - spec/db/4.2/20091231235959_some_name.rb
233
+ - spec/db/4.2/20171231235959_super_update.rb
234
+ - spec/db/5.0/20091231235959_some_name.rb
235
+ - spec/db/5.0/20171231235959_super_update.rb
236
+ - spec/db/data/20091231235959_some_name.rb
237
+ - spec/db/data/20171231235959_super_update.rb
238
+ - spec/db/migrate/4.2/20131111111111_late_migration.rb
239
+ - spec/db/migrate/4.2/20202020202011_db_migration.rb
240
+ - spec/db/migrate/5.0/20131111111111_late_migration.rb
241
+ - spec/db/migrate/5.0/20202020202011_db_migration.rb
242
+ - spec/db/migrate/5.2/20131111111111_late_migration.rb
243
+ - spec/db/migrate/5.2/20202020202011_db_migration.rb
244
+ - spec/generators/data_migration/data_migration_generator_spec.rb
245
+ - spec/spec_helper.rb
55
246
  - tasks/.gitkeep
56
247
  - tasks/databases.rake
57
248
  homepage: https://github.com/ilyakatz/data-migrate
@@ -77,8 +268,32 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
268
  version: '0'
78
269
  requirements: []
79
270
  rubyforge_project: data_migrate
80
- rubygems_version: 2.2.3
271
+ rubygems_version: 2.6.13
81
272
  signing_key:
82
273
  specification_version: 4
83
274
  summary: Rake tasks to migrate data alongside schema changes.
84
- test_files: []
275
+ test_files:
276
+ - spec/data_migrate/data_migrator_spec.rb
277
+ - spec/data_migrate/data_schema_migration_spec.rb
278
+ - spec/data_migrate/data_spec.rb
279
+ - spec/data_migrate/database_tasks_spec.rb
280
+ - spec/data_migrate/migration.rb
281
+ - spec/data_migrate/migration_context_spec.rb
282
+ - spec/data_migrate/schema_dumper_spec.rb
283
+ - spec/data_migrate/schema_migration_spec.rb
284
+ - spec/data_migrate/status_service_spec.rb
285
+ - spec/data_migrate/tasks/data_migrate_tasks_spec.rb
286
+ - spec/db/4.2/20091231235959_some_name.rb
287
+ - spec/db/4.2/20171231235959_super_update.rb
288
+ - spec/db/5.0/20091231235959_some_name.rb
289
+ - spec/db/5.0/20171231235959_super_update.rb
290
+ - spec/db/data/20091231235959_some_name.rb
291
+ - spec/db/data/20171231235959_super_update.rb
292
+ - spec/db/migrate/4.2/20131111111111_late_migration.rb
293
+ - spec/db/migrate/4.2/20202020202011_db_migration.rb
294
+ - spec/db/migrate/5.0/20131111111111_late_migration.rb
295
+ - spec/db/migrate/5.0/20202020202011_db_migration.rb
296
+ - spec/db/migrate/5.2/20131111111111_late_migration.rb
297
+ - spec/db/migrate/5.2/20202020202011_db_migration.rb
298
+ - spec/generators/data_migration/data_migration_generator_spec.rb
299
+ - spec/spec_helper.rb