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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05611c746ae2e5d48980688858030777fa42be22
4
- data.tar.gz: 91ff5dcbff3883ccaa5e946f30d8d0ecdffa4736
3
+ metadata.gz: 513041c34e205e9f58b811e7b91a667d2383faaf
4
+ data.tar.gz: e33fbb5f528b37e747639225e7e05d9205ea4019
5
5
  SHA512:
6
- metadata.gz: 9e6a7d555fefb315e9e07d565b188be657c0b2a43a3e6046a55da2c00e0e482d53cc6c03e2daaac79ccaf56374b307bfd067d622b4bbb9739f42316524c99f54
7
- data.tar.gz: a51a6a6249723966aa25e8f0307c27bf49cf3d86282f95d32cba7c6b2b0feccb97a9ea156a8c201bed6f216dffd3359b7f9fde67dbd4a966cf55ce065ef82ba7
6
+ metadata.gz: 3352d4c800ad8cac090b0b4bb92e3fc646b16a54e871b88138f132b4f825581a42c1f3ff430563d6ed98c559129371e0dd0736466a328518405ddfd920204c3f
7
+ data.tar.gz: a93f9ed99ab3e6c346dacd1e3d5ce4ecfaf9c80cfa2d66ece9eb9177d72e2dccfdfacc60e0373f138582975bb3170a940e4974d2b5573e751a463d555e650e7d
data/.gitignore CHANGED
@@ -1,3 +1,8 @@
1
-
2
1
  /.rvmrc
3
2
  *.gem
3
+ *.lock
4
+ gemfiles/.bundle
5
+ spec/db/test.db
6
+ .vscode/
7
+ tasks/databases.rake
8
+ .DS_Store
data/.hound.yml ADDED
@@ -0,0 +1,4 @@
1
+ fail_on_violations: true
2
+
3
+ ruby:
4
+ config_file: .rubocop.yml
data/.overcommit.yml ADDED
@@ -0,0 +1,21 @@
1
+ # Use this file to configure the Overcommit hooks you wish to use. This will
2
+ # extend the default configuration defined in:
3
+ # https://github.com/brigade/overcommit/blob/master/config/default.yml
4
+ #
5
+ # At the topmost level of this YAML file is a key representing type of hook
6
+ # being run (e.g. pre-commit, commit-msg, etc.). Within each type you can
7
+ # customize each hook, such as whether to only run it on certain files (via
8
+ # `include`), whether to only display output if it fails (via `quiet`), etc.
9
+ #
10
+ # For a complete list of hooks, see:
11
+ # https://github.com/brigade/overcommit/tree/master/lib/overcommit/hook
12
+ #
13
+ # For a complete list of options that you can use to customize hooks, see:
14
+ # https://github.com/brigade/overcommit#configuration
15
+ #
16
+ # Uncomment the following lines to make the configuration take effect.
17
+
18
+ PreCommit:
19
+ RuboCop:
20
+ enabled: true
21
+ on_warn: fail # Treat all warnings as failures
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --format d
3
+
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ # Use same configration as used by HoundCI
2
+ inherit_from: .ruby-style.yml