data_migrate 11.1.0 → 11.2.0

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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +7 -0
  3. data/README.md +4 -12
  4. data/lib/data_migrate/database_tasks.rb +3 -1
  5. data/lib/data_migrate/rails_helper.rb +1 -0
  6. data/lib/data_migrate/version.rb +1 -1
  7. metadata +2 -51
  8. data/.github/workflows/build.yml +0 -39
  9. data/.github/workflows/gempush.yml +0 -28
  10. data/.gitignore +0 -12
  11. data/.hound.yml +0 -4
  12. data/.overcommit.yml +0 -21
  13. data/.rbenv-gemsets +0 -2
  14. data/.rspec +0 -3
  15. data/.rubocop.yml +0 -2
  16. data/.ruby-style.yml +0 -1061
  17. data/Appraisals +0 -19
  18. data/Gemfile +0 -3
  19. data/Gemfile.lock +0 -192
  20. data/Rakefile +0 -2
  21. data/data_migrate.gemspec +0 -41
  22. data/gemfiles/rails_6.1.gemfile +0 -7
  23. data/gemfiles/rails_6.1.gemfile.lock +0 -237
  24. data/gemfiles/rails_7.0.gemfile +0 -7
  25. data/gemfiles/rails_7.0.gemfile.lock +0 -238
  26. data/gemfiles/rails_7.1.gemfile +0 -7
  27. data/gemfiles/rails_7.1.gemfile.lock +0 -277
  28. data/gemfiles/rails_7.2.gemfile +0 -7
  29. data/gemfiles/rails_7.2.gemfile.lock +0 -274
  30. data/gemfiles/rails_8.0.gemfile +0 -7
  31. data/gemfiles/rails_8.0.gemfile.lock +0 -268
  32. data/screenshot.png +0 -0
  33. data/spec/data_migrate/config_spec.rb +0 -69
  34. data/spec/data_migrate/data_migrator_spec.rb +0 -84
  35. data/spec/data_migrate/data_schema_migration_spec.rb +0 -33
  36. data/spec/data_migrate/data_spec.rb +0 -74
  37. data/spec/data_migrate/database_tasks_spec.rb +0 -214
  38. data/spec/data_migrate/migration.rb +0 -17
  39. data/spec/data_migrate/migration_context_spec.rb +0 -117
  40. data/spec/data_migrate/schema_dumper_spec.rb +0 -36
  41. data/spec/data_migrate/schema_migration_spec.rb +0 -104
  42. data/spec/data_migrate/status_service_spec.rb +0 -76
  43. data/spec/data_migrate/tasks/data_migrate_tasks_spec.rb +0 -129
  44. data/spec/db/data/20091231235959_some_name.rb +0 -9
  45. data/spec/db/data/20171231235959_super_update.rb +0 -9
  46. data/spec/db/data/20181128000207_excluded_file.rb.other_ext +0 -1
  47. data/spec/db/data/partial_schema/data_schema.rb +0 -1
  48. data/spec/db/data/partial_schema/test_data_schema.rb +0 -1
  49. data/spec/db/data/schema/data_schema.rb +0 -1
  50. data/spec/db/data/schema/test_data_schema.rb +0 -1
  51. data/spec/db/data_two/20241231235959_data_two_update.rb +0 -9
  52. data/spec/db/migrate/20131111111111_late_migration.rb +0 -9
  53. data/spec/db/migrate/20202020202011_db_migration.rb +0 -9
  54. data/spec/generators/data_migration/data_migration_generator_spec.rb +0 -101
  55. data/spec/spec_helper.rb +0 -28
  56. data/tasks/.gitkeep +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93b03e47ca0a194f18a72fdb0cc47a54de82688858aa6660827ef7f68644ef8d
4
- data.tar.gz: 4aa2328b5e432edb4b445fa46efe0f2871e5eb47acee15a02c2a19bc4505404b
3
+ metadata.gz: 907383933e031d0a1da7bad6dd3a43807794c0abeb27313af27e59ed8d802f3a
4
+ data.tar.gz: 1ddf826962f7078972ca9a234a723646d7744a41990dbe38550155fc0276fca3
5
5
  SHA512:
6
- metadata.gz: 975645eca490e58faa6895abd76888876f2fa5d90487272d95441c6f887d75799db561c1a5773b53dd3f0d4fe9ffe3487beb964eab138766243cde3162dd0284
7
- data.tar.gz: d6aa8d28e0225ab194440f51b5c66787a363e4021c5291215ba406f7c410dd13ae898cdc3a19bb43908c20de6c0801c7bc3a51dcc78b8df7ccf69178d55568eb
6
+ metadata.gz: e9e79dd56bda8e5f2afecb79f940eb17d7b5439c1d07b38d67943d58fc0ebaf159283d4478ac13925a2ee399097f6825b519052d3fea9f7b04c659a98647e75f
7
+ data.tar.gz: '0959a1bcf969cbc7834c839eca029d1416ff287ea2927a8ae0493a7880fb6910adea4baf5a2d162bd4cce35f80b610dc2f9d671cf77cf6583a699a96196871de'
data/Changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ # 11.2.0
4
+
5
+ - Remove committed Gemfile.lock, reduce bundled file list when running `gem install` https://github.com/ilyakatz/data-migrate/pull/351
6
+ - [Bump actionpack from 7.1.3.4 to 7.1.4.1](https://github.com/ilyakatz/data-migrate/pull/348)
7
+ - [Bump rexml from 3.3.6 to 3.3.9](https://github.com/ilyakatz/data-migrate/pull/349)
8
+ - Fix db_config_with_versions arity change and backport https://github.com/ilyakatz/data-migrate/pull/337
9
+
3
10
  # 11.1.0
4
11
  - Allow multiple data migration paths https://github.com/ilyakatz/data-migrate/pull/331
5
12
  - Fix db:prepare:with_data task on [Rails 7.2](https://github.com/ilyakatz/data-migrate/pull/339)
data/README.md CHANGED
@@ -144,19 +144,12 @@ From now on capistrano will run `rake db:migrate:with_data` in every deploy.
144
144
  ## Rails Engines support
145
145
 
146
146
  This gem also has a initial support for adding data migrations inside Rails engines.
147
- Inside the Engine's class initializer (the one that inherits from `Rails::Engine`, usually inside `engines/ENGINE_NAME/lib/engine.rb`) you need to add something like this:
148
-
147
+ Just add your engines directory pattern to data_migrations initializer, for example
148
+ in the case your engines are located in `engines` folder you can set it up like this:
149
149
 
150
150
  ```ruby
151
- module EngineName
152
- class Engine < ::Rails::Engine
153
- initializer :engine_name do |app|
154
- ::DataMigrate.configure do |data_migrate|
155
- default_path = ::DataMigrate::Config.new.data_migrations_path
156
- data_migrate.data_migrations_path = [default_path, root.join('db', 'data')]
157
- end
158
- end
159
- end
151
+ DataMigrate.configure do |config|
152
+ config.data_migrations_path = ['db/data'] + Dir['engines/**/db/data']
160
153
  end
161
154
  ```
162
155
 
@@ -169,7 +162,6 @@ Then, in the Engine's `db/data` folder, you can add data migrations and run them
169
162
  Run tests for a specific version of Rails
170
163
 
171
164
  ```
172
-
173
165
  bundle exec appraisal rails-6.1 rspec
174
166
  bundle exec appraisal rails-7.0 rspec
175
167
  bundle exec appraisal rails-7.1 rspec
@@ -179,7 +179,9 @@ module DataMigrate
179
179
 
180
180
  ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
181
181
 
182
- schema_mapped_versions = if DataMigrate::RailsHelper.rails_version_equal_to_or_higher_than_7_1
182
+ # 7.2 removes the param for db_configs_with_versions in https://github.com/rails/rails/commit/9572fcb4a0bd5396436689a6a42613886871cd81
183
+ # 7.1 stable backported the change in https://github.com/rails/rails/commit/c53ec4b60980036b43528829d4b0b7457f759224
184
+ schema_mapped_versions = if Gem::Dependency.new("railties", ">= 7.1.4").match?("railties", Gem.loaded_specs["railties"].version, true)
183
185
  ActiveRecord::Tasks::DatabaseTasks.db_configs_with_versions
184
186
  else
185
187
  db_configs = ActiveRecord::Base.configurations.configs_for(env_name: ActiveRecord::Tasks::DatabaseTasks.env)
@@ -6,6 +6,7 @@ module DataMigrate
6
6
 
7
7
  @equal_to_or_higher_than_7_2 = Gem::Dependency.new("railties", ">= 7.2.0.alpha").match?("railties", Gem.loaded_specs["railties"].version, true)
8
8
  end
9
+
9
10
  def rails_version_equal_to_or_higher_than_7_1
10
11
  return @equal_to_or_higher_than_7_1 if defined?(@equal_to_or_higher_than_7_1)
11
12
 
@@ -1,3 +1,3 @@
1
1
  module DataMigrate
2
- VERSION = "11.1.0".freeze
2
+ VERSION = "11.2.0".freeze
3
3
  end
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: 11.1.0
4
+ version: 11.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew J Vargo
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-10-09 00:00:00.000000000 Z
13
+ date: 2024-11-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -189,33 +189,9 @@ executables: []
189
189
  extensions: []
190
190
  extra_rdoc_files: []
191
191
  files:
192
- - ".github/workflows/build.yml"
193
- - ".github/workflows/gempush.yml"
194
- - ".gitignore"
195
- - ".hound.yml"
196
- - ".overcommit.yml"
197
- - ".rbenv-gemsets"
198
- - ".rspec"
199
- - ".rubocop.yml"
200
- - ".ruby-style.yml"
201
- - Appraisals
202
192
  - Changelog.md
203
- - Gemfile
204
- - Gemfile.lock
205
193
  - LICENSE
206
194
  - README.md
207
- - Rakefile
208
- - data_migrate.gemspec
209
- - gemfiles/rails_6.1.gemfile
210
- - gemfiles/rails_6.1.gemfile.lock
211
- - gemfiles/rails_7.0.gemfile
212
- - gemfiles/rails_7.0.gemfile.lock
213
- - gemfiles/rails_7.1.gemfile
214
- - gemfiles/rails_7.1.gemfile.lock
215
- - gemfiles/rails_7.2.gemfile
216
- - gemfiles/rails_7.2.gemfile.lock
217
- - gemfiles/rails_8.0.gemfile
218
- - gemfiles/rails_8.0.gemfile.lock
219
195
  - lib/capistrano/data_migrate.rb
220
196
  - lib/capistrano/data_migrate/migrate.rb
221
197
  - lib/data_migrate.rb
@@ -237,31 +213,6 @@ files:
237
213
  - lib/generators/data_migration/data_migration_generator.rb
238
214
  - lib/generators/data_migration/templates/data_migration.rb
239
215
  - lib/generators/data_migration/templates/migration.rb
240
- - screenshot.png
241
- - spec/data_migrate/config_spec.rb
242
- - spec/data_migrate/data_migrator_spec.rb
243
- - spec/data_migrate/data_schema_migration_spec.rb
244
- - spec/data_migrate/data_spec.rb
245
- - spec/data_migrate/database_tasks_spec.rb
246
- - spec/data_migrate/migration.rb
247
- - spec/data_migrate/migration_context_spec.rb
248
- - spec/data_migrate/schema_dumper_spec.rb
249
- - spec/data_migrate/schema_migration_spec.rb
250
- - spec/data_migrate/status_service_spec.rb
251
- - spec/data_migrate/tasks/data_migrate_tasks_spec.rb
252
- - spec/db/data/20091231235959_some_name.rb
253
- - spec/db/data/20171231235959_super_update.rb
254
- - spec/db/data/20181128000207_excluded_file.rb.other_ext
255
- - spec/db/data/partial_schema/data_schema.rb
256
- - spec/db/data/partial_schema/test_data_schema.rb
257
- - spec/db/data/schema/data_schema.rb
258
- - spec/db/data/schema/test_data_schema.rb
259
- - spec/db/data_two/20241231235959_data_two_update.rb
260
- - spec/db/migrate/20131111111111_late_migration.rb
261
- - spec/db/migrate/20202020202011_db_migration.rb
262
- - spec/generators/data_migration/data_migration_generator_spec.rb
263
- - spec/spec_helper.rb
264
- - tasks/.gitkeep
265
216
  - tasks/databases.rake
266
217
  homepage: https://github.com/ilyakatz/data-migrate
267
218
  licenses:
@@ -1,39 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- - push
5
- - pull_request
6
-
7
- jobs:
8
- test:
9
- strategy:
10
- fail-fast: false
11
- matrix:
12
- os: [ "ubuntu-24.04" ]
13
- ruby:
14
- - '3.1'
15
- - '3.2'
16
- - '3.3'
17
- gemfile:
18
- - gemfiles/rails_6.1.gemfile
19
- - gemfiles/rails_7.0.gemfile
20
- - gemfiles/rails_7.1.gemfile
21
- - gemfiles/rails_7.2.gemfile
22
- - gemfiles/rails_8.0.gemfile
23
- exclude:
24
- - ruby: '3.1'
25
- gemfile: 'gemfiles/rails_8.0.gemfile'
26
- runs-on: ubuntu-latest
27
- env:
28
- BUNDLE_GEMFILE: ${{ matrix.gemfile }}
29
- RAILS_ENV: test
30
- steps:
31
- - name: Checkout code
32
- uses: actions/checkout@v4
33
- - name: Set up Ruby
34
- uses: ruby/setup-ruby@v1
35
- with:
36
- ruby-version: ${{ matrix.ruby }}
37
- bundler-cache: true
38
- - name: Run tests
39
- run: bundle exec rspec
@@ -1,28 +0,0 @@
1
- name: Release Gem
2
-
3
- on:
4
- release:
5
- types: [released]
6
-
7
- jobs:
8
- build:
9
- name: Build + Publish
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - uses: actions/checkout@master
14
- - name: Set up Ruby 3.2
15
- uses: ruby/setup-ruby@v1
16
- with:
17
- ruby-version: '3.2'
18
-
19
- - name: Publish to RubyGems
20
- run: |
21
- mkdir -p $HOME/.gem
22
- touch $HOME/.gem/credentials
23
- chmod 0600 $HOME/.gem/credentials
24
- printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
25
- gem build *.gemspec
26
- gem push *.gem
27
- env:
28
- GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
data/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- /.rvmrc
2
- *.gem
3
- gemfiles/.bundle
4
- spec/db/test.db
5
- spec/db/other_test.db
6
- spec/db/data_schema.rb
7
- .vscode/
8
- .DS_Store
9
- .ruby-gemset
10
- .ruby-version
11
- .idea/
12
- vendor/
data/.hound.yml DELETED
@@ -1,4 +0,0 @@
1
- fail_on_violations: true
2
-
3
- ruby:
4
- config_file: .rubocop.yml
data/.overcommit.yml DELETED
@@ -1,21 +0,0 @@
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/.rbenv-gemsets DELETED
@@ -1,2 +0,0 @@
1
- data-migrate
2
- -global
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --color
2
- --format d
3
-
data/.rubocop.yml DELETED
@@ -1,2 +0,0 @@
1
- # Use same configration as used by HoundCI
2
- inherit_from: .ruby-style.yml