data-migration 1.3.0 → 2.0.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +27 -3
- data/data-migration.gemspec +27 -15
- data/lib/data-migration.rb +1 -1
- data/lib/data_migration/config.rb +1 -1
- data/lib/data_migration/job.rb +27 -9
- data/lib/data_migration/task.rb +22 -19
- metadata +185 -65
- data/.editorconfig +0 -14
- data/.github/dependabot.yml +0 -27
- data/.github/workflows/_trunk_check.yml +0 -15
- data/.github/workflows/test.yml +0 -42
- data/.gitignore +0 -24
- data/.ruby-version +0 -1
- data/.trunk/.gitignore +0 -9
- data/.trunk/configs/.markdownlint.yaml +0 -2
- data/.trunk/configs/.shellcheckrc +0 -7
- data/.trunk/configs/.yamllint.yaml +0 -7
- data/.trunk/trunk.yaml +0 -39
- data/.vscode/extensions.json +0 -18
- data/.vscode/settings.json +0 -7
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -246
- data/spec/data_migration/config_spec.rb +0 -116
- data/spec/data_migration/job_spec.rb +0 -96
- data/spec/data_migration/task_spec.rb +0 -152
- data/spec/data_migration_spec.rb +0 -65
- data/spec/fixtures/data_migrations/20241206200111_create_users.rb +0 -17
- data/spec/fixtures/data_migrations/20241206200112_create_bad_users.rb +0 -5
- data/spec/fixtures/data_migrations/20241206200113_change_users.rb +0 -5
- data/spec/fixtures/data_migrations/20241206200114_create_batch_users.rb +0 -9
- data/spec/fixtures/schema.rb +0 -26
- data/spec/generators/install_generator_spec.rb +0 -48
- data/spec/generators/migration_generator_spec.rb +0 -50
- data/spec/rails_helper.rb +0 -21
- data/spec/spec_helper.rb +0 -30
- data/spec/support/junit_formatter.rb +0 -6
- data/spec/support/rails_helpers.rb +0 -53
- data/usr/bin/release.sh +0 -35
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f317e1c1d38d56179e7236be0d37be8105859b653792c8eb4bdae60c0010affa
|
|
4
|
+
data.tar.gz: df14fb4e41b46c7fffebf89d9367b810128216f285b15da18d8c5b3297f653d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11da0da9e0b6593df4bd94a728d66f2ecbd5672e3a9819ec90bf58d32f811053b7e8f7890631faa7ea99253f9652e14f5383ece6af4f367ba16971a8cd7b1051
|
|
7
|
+
data.tar.gz: e93699e6817f780e7d12457742bd4d053ad029b6478f1a86cce911a75bfb49b6567bfb8822030dfdd8a1474fc4ffc47d6ec92519d041449250643b6b7c2c784f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 2.0.0 (2026-09-04)
|
|
4
|
+
|
|
5
|
+
- BREAKING: Require Ruby 3.4 or newer.
|
|
6
|
+
- Add `rfcs/` starter pack: process (RFC 0001), positioning (RFC 0002), and Standards Track design RFCs 0003–0005 for task status, operator run path, and jobs.
|
|
7
|
+
- Report stopped data migrations as failed and release their job slots (RFC 0006).
|
|
8
|
+
- Serialize task job-slot updates across worker instances.
|
|
9
|
+
- Limit the gem package to runtime code and release documentation.
|
|
10
|
+
|
|
3
11
|
## 1.3.0
|
|
4
12
|
|
|
5
13
|
- Fix data migration tasks table generator
|
data/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# data-migration.rb
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/rb/data-migration) [](https://github.com/amkisko/data-migration.rb/actions/workflows/test.yml) [](https://codecov.io/
|
|
3
|
+
[](https://badge.fury.io/rb/data-migration) [](https://github.com/amkisko/data-migration.rb/actions/workflows/test.yml) [](https://app.codecov.io/github/amkisko/data-migration.rb)
|
|
4
4
|
|
|
5
5
|
Data migrations kit for ActiveRecord and ActiveJob.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Requires Ruby 3.4 or newer.
|
|
8
|
+
|
|
9
|
+
Design changes go through `rfcs/` (RFC 0001).
|
|
8
10
|
|
|
9
11
|
## Data migrations concept
|
|
10
12
|
|
|
@@ -116,6 +118,7 @@ end
|
|
|
116
118
|
- ActiveRecord migrations generator is used to generate data migration files
|
|
117
119
|
- Data migrations are not reversible, it is operator's responsibility to ensure that data migration has correct effect
|
|
118
120
|
- Keep migrations logic stable and predictable, e.g. by checking uniqueness of created/updated records
|
|
121
|
+
- Task rows persist migration keyword arguments and active job metadata; pass record references instead of secrets or unnecessary personal data
|
|
119
122
|
|
|
120
123
|
## Contributing
|
|
121
124
|
|
|
@@ -132,7 +135,7 @@ Contribution policy:
|
|
|
132
135
|
|
|
133
136
|
## Publishing
|
|
134
137
|
|
|
135
|
-
Prefer using script `usr/bin/release.
|
|
138
|
+
Prefer using script `usr/bin/release.rb`, it will ensure that repository is synced and after publishing gem will create a tag.
|
|
136
139
|
|
|
137
140
|
```sh
|
|
138
141
|
GEM_VERSION=$(grep -Eo "VERSION\s*=\s*\".+\"" lib/data-migration.rb | grep -Eo "[0-9.]{5,}")
|
|
@@ -142,6 +145,27 @@ gem push data-migration-$GEM_VERSION.gem
|
|
|
142
145
|
git tag $GEM_VERSION && git push --tags && gh release create $GEM_VERSION --generate-notes
|
|
143
146
|
```
|
|
144
147
|
|
|
148
|
+
## Links
|
|
149
|
+
|
|
150
|
+
- [GitHub](https://github.com/amkisko/data-migration.rb)
|
|
151
|
+
- [GitLab](https://gitlab.com/amkisko/data-migration.rb)
|
|
152
|
+
- [RubyGems](https://rubygems.org/gems/data-migration)
|
|
153
|
+
- [Versions Atom](https://rubygems.org/gems/data-migration/versions.atom) (feed id `8154436273761`)
|
|
154
|
+
- [libraries.io](https://libraries.io/rubygems/data-migration)
|
|
155
|
+
- [Deps.dev](https://deps.dev/rubygems/data-migration)
|
|
156
|
+
- [SonarCloud](https://sonarcloud.io/project/overview?id=amkisko_data-migration.rb)
|
|
157
|
+
- [Snyk](https://snyk.io/test/github/amkisko/data-migration.rb)
|
|
158
|
+
- [Codecov](https://app.codecov.io/github/amkisko/data-migration.rb)
|
|
159
|
+
- [OpenSSF Scorecard](https://scorecard.dev/viewer/?uri=github.com/amkisko/data-migration.rb)
|
|
160
|
+
|
|
145
161
|
## License
|
|
146
162
|
|
|
147
163
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
164
|
+
|
|
165
|
+
## Sponsors
|
|
166
|
+
|
|
167
|
+
Sponsored by [Kisko Labs](https://www.kiskolabs.com).
|
|
168
|
+
|
|
169
|
+
<a href="https://www.kiskolabs.com">
|
|
170
|
+
<img src="kisko.svg" width="200" alt="Sponsored by Kisko Labs" />
|
|
171
|
+
</a>
|
data/data-migration.gemspec
CHANGED
|
@@ -2,7 +2,6 @@ Gem::Specification.new do |gem|
|
|
|
2
2
|
gem.name = "data-migration"
|
|
3
3
|
gem.version = File.read(File.expand_path("../lib/data-migration.rb", __FILE__)).match(/VERSION\s*=\s*"(.*?)"/)[1]
|
|
4
4
|
|
|
5
|
-
repository_url = "https://github.com/amkisko/data-migration.rb"
|
|
6
5
|
root_files = %w[CHANGELOG.md LICENSE.md README.md]
|
|
7
6
|
root_files << "#{gem.name}.gemspec"
|
|
8
7
|
|
|
@@ -11,23 +10,24 @@ Gem::Specification.new do |gem|
|
|
|
11
10
|
gem.platform = Gem::Platform::RUBY
|
|
12
11
|
|
|
13
12
|
gem.authors = ["Andrei Makarov"]
|
|
14
|
-
gem.email = ["
|
|
15
|
-
gem.homepage =
|
|
13
|
+
gem.email = ["contact@kiskolabs.com"]
|
|
14
|
+
gem.homepage = "https://github.com/amkisko/data-migration.rb"
|
|
16
15
|
gem.summary = "Data migrations kit for ActiveRecord and ActiveJob"
|
|
17
|
-
gem.description =
|
|
16
|
+
gem.description = "Run and track data migrations through ActiveRecord tasks and ActiveJob workers."
|
|
18
17
|
gem.metadata = {
|
|
19
|
-
"homepage" =>
|
|
20
|
-
"source_code_uri" =>
|
|
21
|
-
"bug_tracker_uri" => "
|
|
22
|
-
"changelog_uri" => "
|
|
18
|
+
"homepage" => "https://github.com/amkisko/data-migration.rb",
|
|
19
|
+
"source_code_uri" => "https://github.com/amkisko/data-migration.rb",
|
|
20
|
+
"bug_tracker_uri" => "https://github.com/amkisko/data-migration.rb/issues",
|
|
21
|
+
"changelog_uri" => "https://github.com/amkisko/data-migration.rb/blob/main/CHANGELOG.md",
|
|
23
22
|
"rubygems_mfa_required" => "true"
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
gem.files = `git ls-files`.split("\n")
|
|
27
|
-
|
|
25
|
+
gem.files = `git ls-files`.split("\n").select do |file|
|
|
26
|
+
root_files.include?(file) || file.start_with?("bin/", "lib/")
|
|
27
|
+
end
|
|
28
28
|
gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
|
29
29
|
|
|
30
|
-
gem.required_ruby_version = ">= 3"
|
|
30
|
+
gem.required_ruby_version = ">= 3.4"
|
|
31
31
|
gem.require_paths = ["lib"]
|
|
32
32
|
|
|
33
33
|
gem.add_dependency "rails", "> 5"
|
|
@@ -35,10 +35,22 @@ Gem::Specification.new do |gem|
|
|
|
35
35
|
gem.add_dependency "activerecord", "> 5"
|
|
36
36
|
gem.add_dependency "activesupport", "> 5"
|
|
37
37
|
|
|
38
|
-
gem.add_development_dependency "bundler", "
|
|
38
|
+
gem.add_development_dependency "bundler", ">= 2"
|
|
39
39
|
gem.add_development_dependency "rspec", "~> 3"
|
|
40
|
+
gem.add_development_dependency "polyrun", ">= 2.2.0"
|
|
41
|
+
gem.add_development_dependency "prosopite", "~> 2.0"
|
|
42
|
+
gem.add_development_dependency "webmock", "~> 3"
|
|
40
43
|
gem.add_development_dependency "rspec_junit_formatter", "~> 0.6"
|
|
41
|
-
gem.add_development_dependency "simplecov", "~> 0.
|
|
42
|
-
gem.add_development_dependency "simplecov-cobertura", "~>
|
|
43
|
-
gem.add_development_dependency "
|
|
44
|
+
gem.add_development_dependency "simplecov", "~> 0.22"
|
|
45
|
+
gem.add_development_dependency "simplecov-cobertura", "~> 3"
|
|
46
|
+
gem.add_development_dependency "rbs", "~> 3"
|
|
47
|
+
gem.add_development_dependency "standard", "~> 1.52"
|
|
48
|
+
gem.add_development_dependency "standard-custom", "~> 1.0"
|
|
49
|
+
gem.add_development_dependency "standard-performance", "~> 1.8"
|
|
50
|
+
gem.add_development_dependency "standard-rails", "~> 1.5"
|
|
51
|
+
gem.add_development_dependency "standard-rspec", "~> 0.3"
|
|
52
|
+
gem.add_development_dependency "rubocop-rails", "~> 2.33"
|
|
53
|
+
gem.add_development_dependency "rubocop-rspec", "~> 3.8"
|
|
54
|
+
gem.add_development_dependency "rubocop-thread_safety", "~> 0.7"
|
|
55
|
+
gem.add_development_dependency "appraisal", "~> 2"
|
|
44
56
|
end
|
data/lib/data-migration.rb
CHANGED
data/lib/data_migration/job.rb
CHANGED
|
@@ -7,6 +7,10 @@ module DataMigration
|
|
|
7
7
|
discard_on StandardError
|
|
8
8
|
|
|
9
9
|
def perform(task_id, *job_args, **job_kwargs)
|
|
10
|
+
checked_in = false
|
|
11
|
+
failed = false
|
|
12
|
+
migration_started = false
|
|
13
|
+
migration_class = nil
|
|
10
14
|
task = DataMigration::Task.find(task_id)
|
|
11
15
|
DataMigration.config.monitoring_context.call(task)
|
|
12
16
|
|
|
@@ -15,16 +19,19 @@ module DataMigration
|
|
|
15
19
|
|
|
16
20
|
unless task.file_exists?
|
|
17
21
|
DataMigration.notify("#{migration_name} not found")
|
|
22
|
+
task.update_columns(status: task.class.statuses.fetch("failed"), updated_at: Time.current)
|
|
18
23
|
return
|
|
19
24
|
end
|
|
20
25
|
|
|
21
26
|
task.job_check_in!(job_id, job_args: job_args, job_kwargs: job_kwargs)
|
|
27
|
+
checked_in = true
|
|
28
|
+
migration_started = true
|
|
22
29
|
|
|
23
30
|
require migration_path
|
|
24
31
|
klass_name = migration_name.gsub(/^[0-9_]+/, "").camelize
|
|
25
|
-
|
|
26
|
-
raise "Data migration class #{klass_name} not found" unless
|
|
27
|
-
raise "Data migration class #{klass_name} must implement `perform` method" unless
|
|
32
|
+
migration_class = klass_name.safe_constantize
|
|
33
|
+
raise "Data migration class #{klass_name} not found" unless migration_class.is_a?(Class)
|
|
34
|
+
raise "Data migration class #{klass_name} must implement `perform` method" unless migration_class.method_defined?(:perform)
|
|
28
35
|
|
|
29
36
|
if task.started_at.blank?
|
|
30
37
|
task.update!(started_at: Time.current, status: :started)
|
|
@@ -38,17 +45,18 @@ module DataMigration
|
|
|
38
45
|
|
|
39
46
|
Thread.current[:data_migration_enqueue_called] ||= {}
|
|
40
47
|
Thread.current[:data_migration_enqueue_kwargs] ||= {}
|
|
41
|
-
|
|
42
|
-
Thread.current[:data_migration_enqueue_called][
|
|
43
|
-
Thread.current[:data_migration_enqueue_kwargs][
|
|
48
|
+
migration_class.define_method(:enqueue) do |**enqueue_kwargs|
|
|
49
|
+
Thread.current[:data_migration_enqueue_called][migration_class.name] = true
|
|
50
|
+
Thread.current[:data_migration_enqueue_kwargs][migration_class.name] = enqueue_kwargs
|
|
44
51
|
end
|
|
45
52
|
|
|
46
53
|
task.update!(status: :performing, pause_minutes: 0)
|
|
47
|
-
|
|
54
|
+
migration_class.new.perform(**job_kwargs)
|
|
48
55
|
task.job_check_out!(job_id)
|
|
56
|
+
checked_in = false
|
|
49
57
|
|
|
50
|
-
enqueue_called = Thread.current[:data_migration_enqueue_called].delete(
|
|
51
|
-
enqueue_kwargs = Thread.current[:data_migration_enqueue_kwargs].delete(
|
|
58
|
+
enqueue_called = Thread.current[:data_migration_enqueue_called].delete(migration_class.name)
|
|
59
|
+
enqueue_kwargs = Thread.current[:data_migration_enqueue_kwargs].delete(migration_class.name)
|
|
52
60
|
if enqueue_called
|
|
53
61
|
if enqueue_kwargs[:background] == false
|
|
54
62
|
self.class.new.perform(task_id, *job_args, **enqueue_kwargs)
|
|
@@ -58,6 +66,16 @@ module DataMigration
|
|
|
58
66
|
else
|
|
59
67
|
task.update!(completed_at: Time.current, status: :completed)
|
|
60
68
|
end
|
|
69
|
+
rescue
|
|
70
|
+
failed = migration_started
|
|
71
|
+
raise
|
|
72
|
+
ensure
|
|
73
|
+
task.job_check_out!(job_id, status: (failed ? :failed : nil)) if checked_in
|
|
74
|
+
task.update_columns(status: task.class.statuses.fetch("failed"), updated_at: Time.current) if failed && !checked_in
|
|
75
|
+
if migration_class
|
|
76
|
+
Thread.current[:data_migration_enqueue_called]&.delete(migration_class.name)
|
|
77
|
+
Thread.current[:data_migration_enqueue_kwargs]&.delete(migration_class.name)
|
|
78
|
+
end
|
|
61
79
|
end
|
|
62
80
|
end
|
|
63
81
|
end
|
data/lib/data_migration/task.rb
CHANGED
|
@@ -23,13 +23,10 @@ module DataMigration
|
|
|
23
23
|
started: "started",
|
|
24
24
|
performing: "performing",
|
|
25
25
|
paused: "paused",
|
|
26
|
+
failed: "failed",
|
|
26
27
|
completed: "completed"
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
-
enum :status, STATUS_OPTIONS
|
|
30
|
-
else
|
|
31
|
-
enum status: STATUS_OPTIONS
|
|
32
|
-
end
|
|
29
|
+
enum :status, STATUS_OPTIONS
|
|
33
30
|
|
|
34
31
|
validates :name, presence: true
|
|
35
32
|
validates :pause_minutes, numericality: {greater_than_or_equal_to: 0, only_integer: true}, if: -> { pause_minutes.present? }
|
|
@@ -49,6 +46,7 @@ module DataMigration
|
|
|
49
46
|
scope :started, -> { where(status: :started) }
|
|
50
47
|
scope :paused, -> { where(status: :paused) }
|
|
51
48
|
scope :performing, -> { where(status: :performing) }
|
|
49
|
+
scope :failed, -> { where(status: :failed) }
|
|
52
50
|
scope :completed, -> { where(status: :completed) }
|
|
53
51
|
|
|
54
52
|
def self.job_class
|
|
@@ -98,22 +96,27 @@ module DataMigration
|
|
|
98
96
|
end
|
|
99
97
|
|
|
100
98
|
def job_check_in!(job_id, job_args: [], job_kwargs: {})
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
99
|
+
with_lock do
|
|
100
|
+
self.current_jobs ||= {}
|
|
101
|
+
|
|
102
|
+
raise DataMigration::JobConflictError, "#{user_title} already has job ##{job_id}" if current_jobs.key?(job_id)
|
|
103
|
+
raise DataMigration::JobConcurrencyLimitError, "#{user_title} reached limit of #{jobs_limit} jobs" if jobs_limit.present? && current_jobs.size >= jobs_limit
|
|
104
|
+
|
|
105
|
+
current_jobs[job_id] = {
|
|
106
|
+
ts: Time.current,
|
|
107
|
+
args: job_args,
|
|
108
|
+
kwargs: job_kwargs
|
|
109
|
+
}
|
|
110
|
+
save!
|
|
111
|
+
end
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
-
def job_check_out!(job_id)
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
def job_check_out!(job_id, status: nil)
|
|
115
|
+
with_lock do
|
|
116
|
+
current_jobs.delete(job_id)
|
|
117
|
+
self.status = status if status
|
|
118
|
+
save!(validate: false)
|
|
119
|
+
end
|
|
117
120
|
end
|
|
118
121
|
|
|
119
122
|
def user_title
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: data-migration
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrei Makarov
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rails
|
|
@@ -70,14 +69,14 @@ dependencies:
|
|
|
70
69
|
name: bundler
|
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
|
72
71
|
requirements:
|
|
73
|
-
- - "
|
|
72
|
+
- - ">="
|
|
74
73
|
- !ruby/object:Gem::Version
|
|
75
74
|
version: '2'
|
|
76
75
|
type: :development
|
|
77
76
|
prerelease: false
|
|
78
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
78
|
requirements:
|
|
80
|
-
- - "
|
|
79
|
+
- - ">="
|
|
81
80
|
- !ruby/object:Gem::Version
|
|
82
81
|
version: '2'
|
|
83
82
|
- !ruby/object:Gem::Dependency
|
|
@@ -94,6 +93,48 @@ dependencies:
|
|
|
94
93
|
- - "~>"
|
|
95
94
|
- !ruby/object:Gem::Version
|
|
96
95
|
version: '3'
|
|
96
|
+
- !ruby/object:Gem::Dependency
|
|
97
|
+
name: polyrun
|
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - ">="
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: 2.2.0
|
|
103
|
+
type: :development
|
|
104
|
+
prerelease: false
|
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
106
|
+
requirements:
|
|
107
|
+
- - ">="
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: 2.2.0
|
|
110
|
+
- !ruby/object:Gem::Dependency
|
|
111
|
+
name: prosopite
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - "~>"
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: '2.0'
|
|
117
|
+
type: :development
|
|
118
|
+
prerelease: false
|
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
120
|
+
requirements:
|
|
121
|
+
- - "~>"
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: '2.0'
|
|
124
|
+
- !ruby/object:Gem::Dependency
|
|
125
|
+
name: webmock
|
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
|
127
|
+
requirements:
|
|
128
|
+
- - "~>"
|
|
129
|
+
- !ruby/object:Gem::Version
|
|
130
|
+
version: '3'
|
|
131
|
+
type: :development
|
|
132
|
+
prerelease: false
|
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
134
|
+
requirements:
|
|
135
|
+
- - "~>"
|
|
136
|
+
- !ruby/object:Gem::Version
|
|
137
|
+
version: '3'
|
|
97
138
|
- !ruby/object:Gem::Dependency
|
|
98
139
|
name: rspec_junit_formatter
|
|
99
140
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -114,65 +155,177 @@ dependencies:
|
|
|
114
155
|
requirements:
|
|
115
156
|
- - "~>"
|
|
116
157
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '0.
|
|
158
|
+
version: '0.22'
|
|
118
159
|
type: :development
|
|
119
160
|
prerelease: false
|
|
120
161
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
162
|
requirements:
|
|
122
163
|
- - "~>"
|
|
123
164
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: '0.
|
|
165
|
+
version: '0.22'
|
|
125
166
|
- !ruby/object:Gem::Dependency
|
|
126
167
|
name: simplecov-cobertura
|
|
127
168
|
requirement: !ruby/object:Gem::Requirement
|
|
128
169
|
requirements:
|
|
129
170
|
- - "~>"
|
|
130
171
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: '
|
|
172
|
+
version: '3'
|
|
132
173
|
type: :development
|
|
133
174
|
prerelease: false
|
|
134
175
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
176
|
requirements:
|
|
136
177
|
- - "~>"
|
|
137
178
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '
|
|
179
|
+
version: '3'
|
|
180
|
+
- !ruby/object:Gem::Dependency
|
|
181
|
+
name: rbs
|
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
|
183
|
+
requirements:
|
|
184
|
+
- - "~>"
|
|
185
|
+
- !ruby/object:Gem::Version
|
|
186
|
+
version: '3'
|
|
187
|
+
type: :development
|
|
188
|
+
prerelease: false
|
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
190
|
+
requirements:
|
|
191
|
+
- - "~>"
|
|
192
|
+
- !ruby/object:Gem::Version
|
|
193
|
+
version: '3'
|
|
194
|
+
- !ruby/object:Gem::Dependency
|
|
195
|
+
name: standard
|
|
196
|
+
requirement: !ruby/object:Gem::Requirement
|
|
197
|
+
requirements:
|
|
198
|
+
- - "~>"
|
|
199
|
+
- !ruby/object:Gem::Version
|
|
200
|
+
version: '1.52'
|
|
201
|
+
type: :development
|
|
202
|
+
prerelease: false
|
|
203
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
204
|
+
requirements:
|
|
205
|
+
- - "~>"
|
|
206
|
+
- !ruby/object:Gem::Version
|
|
207
|
+
version: '1.52'
|
|
208
|
+
- !ruby/object:Gem::Dependency
|
|
209
|
+
name: standard-custom
|
|
210
|
+
requirement: !ruby/object:Gem::Requirement
|
|
211
|
+
requirements:
|
|
212
|
+
- - "~>"
|
|
213
|
+
- !ruby/object:Gem::Version
|
|
214
|
+
version: '1.0'
|
|
215
|
+
type: :development
|
|
216
|
+
prerelease: false
|
|
217
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
218
|
+
requirements:
|
|
219
|
+
- - "~>"
|
|
220
|
+
- !ruby/object:Gem::Version
|
|
221
|
+
version: '1.0'
|
|
222
|
+
- !ruby/object:Gem::Dependency
|
|
223
|
+
name: standard-performance
|
|
224
|
+
requirement: !ruby/object:Gem::Requirement
|
|
225
|
+
requirements:
|
|
226
|
+
- - "~>"
|
|
227
|
+
- !ruby/object:Gem::Version
|
|
228
|
+
version: '1.8'
|
|
229
|
+
type: :development
|
|
230
|
+
prerelease: false
|
|
231
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
232
|
+
requirements:
|
|
233
|
+
- - "~>"
|
|
234
|
+
- !ruby/object:Gem::Version
|
|
235
|
+
version: '1.8'
|
|
236
|
+
- !ruby/object:Gem::Dependency
|
|
237
|
+
name: standard-rails
|
|
238
|
+
requirement: !ruby/object:Gem::Requirement
|
|
239
|
+
requirements:
|
|
240
|
+
- - "~>"
|
|
241
|
+
- !ruby/object:Gem::Version
|
|
242
|
+
version: '1.5'
|
|
243
|
+
type: :development
|
|
244
|
+
prerelease: false
|
|
245
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
246
|
+
requirements:
|
|
247
|
+
- - "~>"
|
|
248
|
+
- !ruby/object:Gem::Version
|
|
249
|
+
version: '1.5'
|
|
250
|
+
- !ruby/object:Gem::Dependency
|
|
251
|
+
name: standard-rspec
|
|
252
|
+
requirement: !ruby/object:Gem::Requirement
|
|
253
|
+
requirements:
|
|
254
|
+
- - "~>"
|
|
255
|
+
- !ruby/object:Gem::Version
|
|
256
|
+
version: '0.3'
|
|
257
|
+
type: :development
|
|
258
|
+
prerelease: false
|
|
259
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
260
|
+
requirements:
|
|
261
|
+
- - "~>"
|
|
262
|
+
- !ruby/object:Gem::Version
|
|
263
|
+
version: '0.3'
|
|
139
264
|
- !ruby/object:Gem::Dependency
|
|
140
|
-
name:
|
|
265
|
+
name: rubocop-rails
|
|
141
266
|
requirement: !ruby/object:Gem::Requirement
|
|
142
267
|
requirements:
|
|
143
268
|
- - "~>"
|
|
144
269
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: '2.
|
|
270
|
+
version: '2.33'
|
|
146
271
|
type: :development
|
|
147
272
|
prerelease: false
|
|
148
273
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
274
|
requirements:
|
|
150
275
|
- - "~>"
|
|
151
276
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: '2.
|
|
153
|
-
|
|
277
|
+
version: '2.33'
|
|
278
|
+
- !ruby/object:Gem::Dependency
|
|
279
|
+
name: rubocop-rspec
|
|
280
|
+
requirement: !ruby/object:Gem::Requirement
|
|
281
|
+
requirements:
|
|
282
|
+
- - "~>"
|
|
283
|
+
- !ruby/object:Gem::Version
|
|
284
|
+
version: '3.8'
|
|
285
|
+
type: :development
|
|
286
|
+
prerelease: false
|
|
287
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
288
|
+
requirements:
|
|
289
|
+
- - "~>"
|
|
290
|
+
- !ruby/object:Gem::Version
|
|
291
|
+
version: '3.8'
|
|
292
|
+
- !ruby/object:Gem::Dependency
|
|
293
|
+
name: rubocop-thread_safety
|
|
294
|
+
requirement: !ruby/object:Gem::Requirement
|
|
295
|
+
requirements:
|
|
296
|
+
- - "~>"
|
|
297
|
+
- !ruby/object:Gem::Version
|
|
298
|
+
version: '0.7'
|
|
299
|
+
type: :development
|
|
300
|
+
prerelease: false
|
|
301
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
302
|
+
requirements:
|
|
303
|
+
- - "~>"
|
|
304
|
+
- !ruby/object:Gem::Version
|
|
305
|
+
version: '0.7'
|
|
306
|
+
- !ruby/object:Gem::Dependency
|
|
307
|
+
name: appraisal
|
|
308
|
+
requirement: !ruby/object:Gem::Requirement
|
|
309
|
+
requirements:
|
|
310
|
+
- - "~>"
|
|
311
|
+
- !ruby/object:Gem::Version
|
|
312
|
+
version: '2'
|
|
313
|
+
type: :development
|
|
314
|
+
prerelease: false
|
|
315
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
316
|
+
requirements:
|
|
317
|
+
- - "~>"
|
|
318
|
+
- !ruby/object:Gem::Version
|
|
319
|
+
version: '2'
|
|
320
|
+
description: Run and track data migrations through ActiveRecord tasks and ActiveJob
|
|
321
|
+
workers.
|
|
154
322
|
email:
|
|
155
|
-
-
|
|
323
|
+
- contact@kiskolabs.com
|
|
156
324
|
executables: []
|
|
157
325
|
extensions: []
|
|
158
326
|
extra_rdoc_files: []
|
|
159
327
|
files:
|
|
160
|
-
- ".editorconfig"
|
|
161
|
-
- ".github/dependabot.yml"
|
|
162
|
-
- ".github/workflows/_trunk_check.yml"
|
|
163
|
-
- ".github/workflows/test.yml"
|
|
164
|
-
- ".gitignore"
|
|
165
|
-
- ".ruby-version"
|
|
166
|
-
- ".trunk/.gitignore"
|
|
167
|
-
- ".trunk/configs/.markdownlint.yaml"
|
|
168
|
-
- ".trunk/configs/.shellcheckrc"
|
|
169
|
-
- ".trunk/configs/.yamllint.yaml"
|
|
170
|
-
- ".trunk/trunk.yaml"
|
|
171
|
-
- ".vscode/extensions.json"
|
|
172
|
-
- ".vscode/settings.json"
|
|
173
328
|
- CHANGELOG.md
|
|
174
|
-
- Gemfile
|
|
175
|
-
- Gemfile.lock
|
|
176
329
|
- LICENSE.md
|
|
177
330
|
- README.md
|
|
178
331
|
- data-migration.gemspec
|
|
@@ -184,22 +337,6 @@ files:
|
|
|
184
337
|
- lib/generators/data_migration/templates/install_data_migration_tasks.rb.tt
|
|
185
338
|
- lib/generators/data_migration_generator.rb
|
|
186
339
|
- lib/generators/templates/data_migration.rb.tt
|
|
187
|
-
- spec/data_migration/config_spec.rb
|
|
188
|
-
- spec/data_migration/job_spec.rb
|
|
189
|
-
- spec/data_migration/task_spec.rb
|
|
190
|
-
- spec/data_migration_spec.rb
|
|
191
|
-
- spec/fixtures/data_migrations/20241206200111_create_users.rb
|
|
192
|
-
- spec/fixtures/data_migrations/20241206200112_create_bad_users.rb
|
|
193
|
-
- spec/fixtures/data_migrations/20241206200113_change_users.rb
|
|
194
|
-
- spec/fixtures/data_migrations/20241206200114_create_batch_users.rb
|
|
195
|
-
- spec/fixtures/schema.rb
|
|
196
|
-
- spec/generators/install_generator_spec.rb
|
|
197
|
-
- spec/generators/migration_generator_spec.rb
|
|
198
|
-
- spec/rails_helper.rb
|
|
199
|
-
- spec/spec_helper.rb
|
|
200
|
-
- spec/support/junit_formatter.rb
|
|
201
|
-
- spec/support/rails_helpers.rb
|
|
202
|
-
- usr/bin/release.sh
|
|
203
340
|
homepage: https://github.com/amkisko/data-migration.rb
|
|
204
341
|
licenses:
|
|
205
342
|
- MIT
|
|
@@ -209,7 +346,6 @@ metadata:
|
|
|
209
346
|
bug_tracker_uri: https://github.com/amkisko/data-migration.rb/issues
|
|
210
347
|
changelog_uri: https://github.com/amkisko/data-migration.rb/blob/main/CHANGELOG.md
|
|
211
348
|
rubygems_mfa_required: 'true'
|
|
212
|
-
post_install_message:
|
|
213
349
|
rdoc_options: []
|
|
214
350
|
require_paths:
|
|
215
351
|
- lib
|
|
@@ -217,30 +353,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
217
353
|
requirements:
|
|
218
354
|
- - ">="
|
|
219
355
|
- !ruby/object:Gem::Version
|
|
220
|
-
version: '3'
|
|
356
|
+
version: '3.4'
|
|
221
357
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
358
|
requirements:
|
|
223
359
|
- - ">="
|
|
224
360
|
- !ruby/object:Gem::Version
|
|
225
361
|
version: '0'
|
|
226
362
|
requirements: []
|
|
227
|
-
rubygems_version:
|
|
228
|
-
signing_key:
|
|
363
|
+
rubygems_version: 4.0.6
|
|
229
364
|
specification_version: 4
|
|
230
365
|
summary: Data migrations kit for ActiveRecord and ActiveJob
|
|
231
|
-
test_files:
|
|
232
|
-
- spec/data_migration/config_spec.rb
|
|
233
|
-
- spec/data_migration/job_spec.rb
|
|
234
|
-
- spec/data_migration/task_spec.rb
|
|
235
|
-
- spec/data_migration_spec.rb
|
|
236
|
-
- spec/fixtures/data_migrations/20241206200111_create_users.rb
|
|
237
|
-
- spec/fixtures/data_migrations/20241206200112_create_bad_users.rb
|
|
238
|
-
- spec/fixtures/data_migrations/20241206200113_change_users.rb
|
|
239
|
-
- spec/fixtures/data_migrations/20241206200114_create_batch_users.rb
|
|
240
|
-
- spec/fixtures/schema.rb
|
|
241
|
-
- spec/generators/install_generator_spec.rb
|
|
242
|
-
- spec/generators/migration_generator_spec.rb
|
|
243
|
-
- spec/rails_helper.rb
|
|
244
|
-
- spec/spec_helper.rb
|
|
245
|
-
- spec/support/junit_formatter.rb
|
|
246
|
-
- spec/support/rails_helpers.rb
|
|
366
|
+
test_files: []
|