synchronised_migration 1.0.2 → 2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 43c8eeec8dc9d137fa28a3a9bb87814c037d7c90
4
- data.tar.gz: 4871ae55efa6ff785ce3abd82b10791ebc36c999
2
+ SHA256:
3
+ metadata.gz: 178cde6a23ffc12e5074df16e0c8b2f5503ce460727607fc3af824c98a92bce1
4
+ data.tar.gz: 0e3ebd525d0e55ffeabe3565f811ed3ff57ea272d042a3b72386ae6a627ba03c
5
5
  SHA512:
6
- metadata.gz: a9c10741ab43ea1a58413fb131041b304d2d4f4da46c22211eca01b7346dca225711f6768afabf8c1f5cd1600e43ebb1ebe51cfe1fa68498064a99e83c3dbcf4
7
- data.tar.gz: 20676d206a60b67c9aaa92a56dd567941dd6021d00e7639cde2db60f6656114e7f3321d4ba2f983530e1df79c65c7e80067cfa8028a911f87dc9fc0385c74067
6
+ metadata.gz: bc7a499baac225c7f3e11467f84c44eae41a2af3ef6c016b3a8b674fdd177c53930efb86ec5951da2ce5b220fb697ff87faa62ba557a3de14767293a10a71371
7
+ data.tar.gz: 6d07aad5e40d68ac72c240f39875e2686416c1d2c38e1fb7555fe18626a47dbdc510116d51e6c19776ed5c22a3ef4e3bcc77b20b5c3672ed94098768dffdd35c
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "daily"
@@ -0,0 +1,59 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ build:
10
+ name: Build
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v2
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ bundler-cache: true
18
+ - run: bundle exec rake
19
+
20
+ release:
21
+ needs: build
22
+ name: Release
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - name: Checkout
26
+ uses: actions/checkout@v2
27
+
28
+ - name: Generate Changelog
29
+ run: |
30
+ # Get version from github ref (remove 'refs/tags/' and prefix 'v')
31
+ version="${GITHUB_REF#refs/tags/v}"
32
+ npx changelog-parser CHANGELOG.md | jq -cr ".versions | .[] | select(.version == \"$version\") | .body" > ${{ github.workflow }}-CHANGELOG.txt
33
+
34
+ - name: Release
35
+ uses: softprops/action-gh-release@v1
36
+ with:
37
+ body_path: ${{ github.workflow }}-CHANGELOG.txt
38
+ env:
39
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40
+
41
+ publish:
42
+ needs: [build, release]
43
+ name: Publish
44
+ runs-on: ubuntu-latest
45
+
46
+ steps:
47
+ - uses: actions/checkout@v2
48
+ - uses: ruby/setup-ruby@v1
49
+
50
+ - name: Publish to RubyGems
51
+ run: |
52
+ mkdir -p $HOME/.gem
53
+ touch $HOME/.gem/credentials
54
+ chmod 0600 $HOME/.gem/credentials
55
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
56
+ gem build *.gemspec
57
+ gem push *.gem
58
+ env:
59
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -0,0 +1,16 @@
1
+ name: Build and Test
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ ruby: ["2.6", "2.7", "3.0"]
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v2
12
+ - uses: ruby/setup-ruby@v1
13
+ with:
14
+ ruby-version: ${{ matrix.ruby }}
15
+ bundler-cache: true
16
+ - run: bundle exec rake
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  /vendor
3
3
  /coverage
4
4
  /*.gem
5
+ Gemfile.lock
@@ -1 +1 @@
1
- 2.2.7
1
+ 3.0.0
@@ -1,5 +1,27 @@
1
1
  # Synchronised Migration
2
2
 
3
+ ## 2.2.0
4
+
5
+ - [TT-8617] Update to build with github actions / ruby 3.0
6
+
7
+ ## 2.1.2
8
+
9
+ * [TT-7511] Use the correct `ex` option for key value expiry times instead of `ttl`
10
+
11
+ ## 2.1.1
12
+
13
+ * [TT-5896] Early exit from migration inside lock if already completed
14
+
15
+ ## 2.1.0
16
+
17
+ * [TT-5827] Add "success key" when REDLOCK_VERSION_SUFFIX is set, preventing repeat runs
18
+ * [TT-5830] Add rake and Rakefile for 'rake release'
19
+
20
+ ## 2.0.0
21
+
22
+ * [DO-168] Removed requirement for defining RedisConfig, now set on
23
+ SynchronisedMigration module
24
+
3
25
  ## 1.0.2
4
26
 
5
27
  * [DO-105] Use the `original` environment instead
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Synchronised Migration
2
2
 
3
- [![Build Status](https://travis-ci.org/sealink/synchronised-migration-rb.svg?branch=master)](https://travis-ci.org/sealink/synchronised-migration-rb)
3
+ [![Gem Version](https://badge.fury.io/rb/synchronised_migration.svg)](http://badge.fury.io/rb/synchronised_migration)
4
+ [![Build Status](https://github.com/sealink/synchronised-migration-rb/workflows/Build%20and%20Test/badge.svg?branch=master)](https://github.com/sealink/synchronised-migration-rb/actions)
4
5
 
5
6
  This gem makes it possible to deploy multiple instances with data migration
6
7
  simultaneously. It uses Redis to ensure that there will be only one migration
@@ -15,13 +16,18 @@ Docker](https://github.com/sealink/craft-docker) project.
15
16
 
16
17
  ## Usage
17
18
 
18
- Class `RedisConfig` needs to be provided as follow.
19
+ Module `SynchronisedMigration` needs to be configured as below.
19
20
 
21
+ ```ruby
22
+ SynchronisedMigration.configure do |config|
23
+ config.host = 'example.com'
24
+ config.port = 6379
25
+ config.db = 0
26
+ end
20
27
  ```
21
- RedisConfig.get[:host] # example.com
22
- RedisConfig.get[:port] # 6379
23
- RedisConfig.get[:db] # 0
24
- ```
28
+
29
+ Configuration can be called by using
30
+ ```SynchronisedMigration.redis_config.host``` or similar.
25
31
 
26
32
  You may override these settings through environment variables.
27
33
 
@@ -40,6 +46,14 @@ Run this before you launch the application during deployment.
40
46
  $ rake synchronised_migrate:execute
41
47
  ```
42
48
 
43
- ## Testing
49
+ ## Release
50
+
51
+ To publish a new version of this gem the following steps must be taken.
44
52
 
45
- Please refer to `.travis.yml` for testing.
53
+ * Update the version in the following files
54
+ ```
55
+ CHANGELOG.md
56
+ lib/synchronised_migration/version.rb
57
+ ````
58
+ * Create a tag using the format v0.1.0
59
+ * Follow build progress in GitHub actions
@@ -0,0 +1,12 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ desc 'Default: run specs.'
4
+ task :default => :spec
5
+
6
+ require 'rspec/core/rake_task'
7
+
8
+ desc "Run specs"
9
+ RSpec::Core::RakeTask.new do |t|
10
+ t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
11
+ # Put spec opts in a file named .rspec in root
12
+ end
@@ -1,4 +1,22 @@
1
1
  module SynchronisedMigration
2
+ class << self
3
+ attr_accessor :redis_config
4
+ end
5
+
6
+ def self.configure
7
+ self.redis_config ||= Configuration.new
8
+ yield(redis_config)
9
+ end
10
+
11
+ class Configuration
12
+ attr_accessor :host, :port, :db
13
+
14
+ def initialize
15
+ @host = ''
16
+ @port = 0
17
+ @db = 0
18
+ end
19
+ end
2
20
  end
3
21
 
4
22
  require 'synchronised_migration/railtie' if defined?(Rails)
@@ -15,11 +15,16 @@ class SynchronisedMigration::Main
15
15
  end
16
16
 
17
17
  def call
18
- lock_and_execute
18
+ done_or_execute
19
19
  end
20
20
 
21
21
  private
22
22
 
23
+ def done_or_execute
24
+ return Result.ok if migration_already_completed?
25
+ lock_and_execute
26
+ end
27
+
23
28
  def lock_and_execute
24
29
  redlock.lock! lock_key, timeout do
25
30
  execute
@@ -27,12 +32,26 @@ class SynchronisedMigration::Main
27
32
  end
28
33
 
29
34
  def execute
30
- return Result.new 'Halting the script because the previous migration failed.' if previous_failed?
35
+ return Result.ok if migration_already_completed?
36
+ return Result.fail 'Halting the script because the previous migration failed.' if previous_failed?
31
37
  mark_failed
32
- migrate
33
- return Result.new 'Migration failed.' if migration_failed?
38
+ migration_success = migrate
39
+ return Result.fail 'Migration failed.' unless migration_success
40
+ mark_successful
34
41
  remove_fail_marker
35
- Result.new
42
+ return Result.ok
43
+ end
44
+
45
+ def migration_already_completed?
46
+ return false if !success_key
47
+ value = redis.get(success_key)
48
+ not value.nil? and not value.empty?
49
+ end
50
+
51
+ def mark_successful
52
+ if success_key
53
+ redis.set success_key, timestamp, ex: 3600*24*30
54
+ end
36
55
  end
37
56
 
38
57
  def previous_failed?
@@ -41,7 +60,7 @@ class SynchronisedMigration::Main
41
60
  end
42
61
 
43
62
  def mark_failed
44
- redis.set fail_key, 1
63
+ redis.set fail_key, timestamp, ex: 3600
45
64
  end
46
65
 
47
66
  def remove_fail_marker
@@ -49,20 +68,20 @@ class SynchronisedMigration::Main
49
68
  end
50
69
 
51
70
  def migrate
52
- return Kernel.system target_command unless with_clean_env?
53
- Bundler.with_original_env do
54
- Kernel.system target_command
71
+ if with_clean_env?
72
+ Bundler.with_original_env do
73
+ Kernel.system target_command
74
+ end
75
+ else
76
+ Kernel.system target_command
55
77
  end
78
+ $?.success?
56
79
  end
57
80
 
58
81
  def with_clean_env?
59
82
  not ENV.fetch('WITH_CLEAN_BUNDLER_ENV', '').empty?
60
83
  end
61
84
 
62
- def migration_failed?
63
- not $?.success?
64
- end
65
-
66
85
  def target_command
67
86
  ENV.fetch 'SYNCHRONISED_COMMAND', 'bin/launch/migrate'
68
87
  end
@@ -83,18 +102,22 @@ class SynchronisedMigration::Main
83
102
  def redis_url
84
103
  sprintf(
85
104
  'redis://%s:%s/%s',
86
- RedisConfig.get[:host],
87
- RedisConfig.get[:port],
88
- RedisConfig.get[:db]
105
+ SynchronisedMigration.redis_config.host,
106
+ SynchronisedMigration.redis_config.port,
107
+ SynchronisedMigration.redis_config.db
89
108
  )
90
109
  end
91
110
 
111
+ def timestamp
112
+ Time.now.to_i
113
+ end
114
+
92
115
  def timeout
93
116
  ENV.fetch('REDLOCK_TIMEOUT_MS', 3_600_000).to_i
94
117
  end
95
118
 
96
119
  def retry_delay
97
- ENV.fetch('REDLOCK_RETRY_DELAY_MS', 200).to_i
120
+ ENV.fetch('REDLOCK_RETRY_DELAY_MS', 3000).to_i
98
121
  end
99
122
 
100
123
  def retry_count
@@ -106,6 +129,16 @@ class SynchronisedMigration::Main
106
129
  end
107
130
 
108
131
  def fail_key
109
- ENV.fetch 'REDLOCK_FAIL_KEY', 'migration-failed'
132
+ ENV.fetch 'REDLOCK_FAIL_KEY', 'migration-failed' + version_suffix
133
+ end
134
+
135
+ def success_key
136
+ return false if version_suffix.empty?
137
+ 'migration-success' + version_suffix
138
+ end
139
+
140
+ def version_suffix
141
+ suffix = ENV.fetch 'REDLOCK_VERSION_SUFFIX', false
142
+ suffix ? '-' + suffix : ''
110
143
  end
111
144
  end
@@ -10,4 +10,12 @@ class SynchronisedMigration::Result
10
10
  def success?
11
11
  error.nil?
12
12
  end
13
+
14
+ def self.ok
15
+ self.new
16
+ end
17
+
18
+ def self.fail(error)
19
+ self.new error
20
+ end
13
21
  end
@@ -1,3 +1,3 @@
1
1
  module SynchronisedMigration
2
- VERSION = '1.0.2'
2
+ VERSION = '2.2.0'
3
3
  end
@@ -9,19 +9,43 @@ describe SynchronisedMigration::Main do
9
9
  let(:redis) { double }
10
10
  let(:redlock) { double }
11
11
  let(:fail_marker_value) { nil }
12
+ let(:success_marker_value) { nil }
13
+ let(:version_suffix) { 'bork' }
14
+ let(:set_version_suffix) { ENV['REDLOCK_VERSION_SUFFIX'] = version_suffix }
15
+ let(:time_value) { double(to_i: 123456789) }
12
16
 
13
17
  before do
18
+ set_version_suffix
19
+
14
20
  subject.instance.instance_variable_set :@redis, nil
15
21
  subject.instance.instance_variable_set :@redlock, nil
16
22
 
23
+ allow(subject.instance).to receive(:execute).and_call_original
24
+ allow(subject.instance).to receive(:migrate).and_call_original
25
+
17
26
  allow(Redis).to receive(:new).and_return(redis)
18
- allow(redis).to receive(:get).and_return(fail_marker_value)
27
+ allow(redis).to receive(:get) { |key|
28
+ case key
29
+ when "migration-failed-#{version_suffix}"
30
+ fail_marker_value
31
+ when "migration-failed"
32
+ fail_marker_value
33
+ when "migration-success-#{version_suffix}"
34
+ success_marker_value
35
+ when "migration-success"
36
+ success_marker_value
37
+ else
38
+ raise "invalid key for redis get: #{key}"
39
+ end
40
+ }
19
41
  allow(redis).to receive(:set)
20
42
  allow(redis).to receive(:del)
21
43
 
22
44
  allow(Redlock::Client).to receive(:new).and_return(redlock)
23
45
  allow(redlock).to receive(:lock!) { |lock_key, timeout, &block| block.call }
24
46
 
47
+ allow(Time).to receive(:now).and_return(time_value)
48
+
25
49
  allow(Kernel).to receive(:system).and_wrap_original { |method, *args|
26
50
  next if args == [ 'bin/launch/migrate' ]
27
51
  method.call *args
@@ -29,26 +53,49 @@ describe SynchronisedMigration::Main do
29
53
 
30
54
  allow(Bundler).to receive(:with_original_env).and_call_original
31
55
 
32
- stub_const(
33
- 'RedisConfig', double(
34
- get: {
35
- host: 'example.com',
36
- port: 6379,
37
- db: 0
38
- }
39
- )
40
- )
56
+ SynchronisedMigration.configure do |config|
57
+ config.host = 'example.com'
58
+ config.port = 6379
59
+ config.db = 0
60
+ end
41
61
  end
42
62
 
43
63
  context 'in the happy path' do
44
64
  it 'executes the migration successfully' do
45
65
  expect(result).to be_success
46
66
  expect(redlock).to have_received(:lock!)
47
- expect(redis).to have_received(:get).with('migration-failed')
48
- expect(redis).to have_received(:set).with('migration-failed', 1)
67
+ expect(redis).to have_received(:get).with('migration-failed-bork')
68
+ expect(redis).to have_received(:set).with('migration-failed-bork', 123456789, ex: 3600)
69
+ expect(redis).to have_received(:set).with('migration-success-bork', 123456789, ex: 3600*24*30)
49
70
  expect(Kernel).to have_received(:system)
50
71
  expect(Bundler).not_to have_received(:with_original_env)
51
- expect(redis).to have_received(:del).with('migration-failed')
72
+ expect(redis).to have_received(:del).with('migration-failed-bork')
73
+ end
74
+
75
+ context 'and migration completed previously' do
76
+ let(:success_marker_value) { '1' }
77
+ it 'contines without executing' do
78
+ expect(result).to be_success
79
+ expect(redlock).not_to have_received(:lock!)
80
+ end
81
+ end
82
+
83
+ context 'executing in lock waiter' do
84
+ let(:result2) { subject.call }
85
+
86
+ before do
87
+ # Note: bypasses the first success flag check so it can enter lock.
88
+ expect(result).to be_success
89
+ allow(redis).to receive(:get).and_return(nil, '1')
90
+ end
91
+
92
+ it 'early exits and does not execute again', :aggregate_failures do
93
+ expect(result2).to be_success
94
+ expect(redlock).to have_received(:lock!).exactly(2).times
95
+ expect(Kernel).to have_received(:system).exactly(1).times
96
+ expect(subject.instance).to have_received(:execute).exactly(2).times
97
+ expect(subject.instance).to have_received(:migrate).exactly(1).times
98
+ end
52
99
  end
53
100
  end
54
101
 
@@ -75,15 +122,44 @@ describe SynchronisedMigration::Main do
75
122
  end
76
123
 
77
124
  context 'when the task crashed' do
78
- before do
79
- allow_any_instance_of(Process::Status).to receive(:success?).and_return(false)
80
- end
81
-
82
125
  it 'marks the failure in Redis' do
126
+ fork { exit 1 }
127
+ Process.wait
128
+
83
129
  expect(result).not_to be_success
84
- expect(redis).to have_received(:set).with('migration-failed', 1)
130
+ expect(redis).to have_received(:set).with('migration-failed-bork', 123456789, ex: 3600)
85
131
  expect(redis).not_to have_received(:del)
86
132
  end
87
133
  end
134
+
135
+ context 'without version suffix' do
136
+ let(:set_version_suffix) { ENV.delete 'REDLOCK_VERSION_SUFFIX' }
137
+
138
+ context 'in the happy path' do
139
+ it 'executes the migration successfully' do
140
+ fork { exit 0 }
141
+ Process.wait
142
+
143
+ expect(result).to be_success
144
+ expect(redlock).to have_received(:lock!)
145
+ expect(redis).to have_received(:get).with('migration-failed')
146
+ expect(redis).to have_received(:set).with('migration-failed', 123456789, ex: 3600)
147
+ expect(Kernel).to have_received(:system)
148
+ expect(Bundler).not_to have_received(:with_original_env)
149
+ expect(redis).to have_received(:del).with('migration-failed')
150
+ end
151
+ end
152
+
153
+ context 'when the task crashed' do
154
+ it 'marks the failure in Redis' do
155
+ fork { exit 1 }
156
+ Process.wait
157
+
158
+ expect(result).not_to be_success
159
+ expect(redis).to have_received(:set).with('migration-failed', 123456789, ex: 3600)
160
+ expect(redis).not_to have_received(:del)
161
+ end
162
+ end
163
+ end
88
164
  end
89
165
  end
@@ -5,7 +5,7 @@ require 'synchronised_migration/version'
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'synchronised_migration'
7
7
  spec.version = SynchronisedMigration::VERSION
8
- spec.authors = ['Alvin Yim']
8
+ spec.authors = ['Alvin Yim', 'Stefan Cooper']
9
9
  spec.email = 'support@travellink.com.au'
10
10
  spec.description = 'Use Redis to record the data migration status'
11
11
  spec.summary = 'For deploying to multiple instances simultaneously'
@@ -15,9 +15,12 @@ Gem::Specification.new do |spec|
15
15
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ['lib']
18
+ spec.required_ruby_version = '>= 2.6.0'
18
19
 
19
- spec.add_dependency 'redlock', '~> 0.2'
20
- spec.add_development_dependency 'simplecov-rcov', '~> 0.2'
21
- spec.add_development_dependency 'rspec', '~> 3.6'
22
- spec.add_development_dependency 'pry-byebug', '~> 3.5'
20
+ spec.add_dependency 'redlock', '>= 0.2'
21
+ spec.add_dependency 'redis'
22
+ spec.add_development_dependency 'rake'
23
+ spec.add_development_dependency 'simplecov-rcov', '>= 0.2'
24
+ spec.add_development_dependency 'rspec', '>= 3.6'
25
+ spec.add_development_dependency 'pry-byebug', '>= 3.5'
23
26
  end
metadata CHANGED
@@ -1,69 +1,98 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synchronised_migration
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alvin Yim
8
+ - Stefan Cooper
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2017-11-06 00:00:00.000000000 Z
12
+ date: 2021-01-06 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: redlock
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - "~>"
18
+ - - ">="
18
19
  - !ruby/object:Gem::Version
19
20
  version: '0.2'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - "~>"
25
+ - - ">="
25
26
  - !ruby/object:Gem::Version
26
27
  version: '0.2'
28
+ - !ruby/object:Gem::Dependency
29
+ name: redis
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
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'
27
56
  - !ruby/object:Gem::Dependency
28
57
  name: simplecov-rcov
29
58
  requirement: !ruby/object:Gem::Requirement
30
59
  requirements:
31
- - - "~>"
60
+ - - ">="
32
61
  - !ruby/object:Gem::Version
33
62
  version: '0.2'
34
63
  type: :development
35
64
  prerelease: false
36
65
  version_requirements: !ruby/object:Gem::Requirement
37
66
  requirements:
38
- - - "~>"
67
+ - - ">="
39
68
  - !ruby/object:Gem::Version
40
69
  version: '0.2'
41
70
  - !ruby/object:Gem::Dependency
42
71
  name: rspec
43
72
  requirement: !ruby/object:Gem::Requirement
44
73
  requirements:
45
- - - "~>"
74
+ - - ">="
46
75
  - !ruby/object:Gem::Version
47
76
  version: '3.6'
48
77
  type: :development
49
78
  prerelease: false
50
79
  version_requirements: !ruby/object:Gem::Requirement
51
80
  requirements:
52
- - - "~>"
81
+ - - ">="
53
82
  - !ruby/object:Gem::Version
54
83
  version: '3.6'
55
84
  - !ruby/object:Gem::Dependency
56
85
  name: pry-byebug
57
86
  requirement: !ruby/object:Gem::Requirement
58
87
  requirements:
59
- - - "~>"
88
+ - - ">="
60
89
  - !ruby/object:Gem::Version
61
90
  version: '3.5'
62
91
  type: :development
63
92
  prerelease: false
64
93
  version_requirements: !ruby/object:Gem::Requirement
65
94
  requirements:
66
- - - "~>"
95
+ - - ">="
67
96
  - !ruby/object:Gem::Version
68
97
  version: '3.5'
69
98
  description: Use Redis to record the data migration status
@@ -72,14 +101,16 @@ executables: []
72
101
  extensions: []
73
102
  extra_rdoc_files: []
74
103
  files:
104
+ - ".github/dependabot.yml"
105
+ - ".github/workflows/release.yml"
106
+ - ".github/workflows/ruby.yml"
75
107
  - ".gitignore"
76
108
  - ".ruby-version"
77
- - ".travis.yml"
78
109
  - CHANGELOG.md
79
110
  - Gemfile
80
- - Gemfile.lock
81
111
  - LICENSE
82
112
  - README.md
113
+ - Rakefile
83
114
  - lib/synchronised_migration.rb
84
115
  - lib/synchronised_migration/main.rb
85
116
  - lib/synchronised_migration/railtie.rb
@@ -100,15 +131,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
100
131
  requirements:
101
132
  - - ">="
102
133
  - !ruby/object:Gem::Version
103
- version: '0'
134
+ version: 2.6.0
104
135
  required_rubygems_version: !ruby/object:Gem::Requirement
105
136
  requirements:
106
137
  - - ">="
107
138
  - !ruby/object:Gem::Version
108
139
  version: '0'
109
140
  requirements: []
110
- rubyforge_project:
111
- rubygems_version: 2.4.5.2
141
+ rubygems_version: 3.2.3
112
142
  signing_key:
113
143
  specification_version: 4
114
144
  summary: For deploying to multiple instances simultaneously
@@ -1,3 +0,0 @@
1
- ---
2
- language: ruby
3
- script: bundle && bundle exec rspec
@@ -1,58 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- synchronised_migration (1.0.2)
5
- redlock (~> 0.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- byebug (9.1.0)
11
- coderay (1.1.2)
12
- diff-lcs (1.3)
13
- docile (1.1.5)
14
- json (2.1.0)
15
- method_source (0.8.2)
16
- pry (0.10.4)
17
- coderay (~> 1.1.0)
18
- method_source (~> 0.8.1)
19
- slop (~> 3.4)
20
- pry-byebug (3.5.0)
21
- byebug (~> 9.1)
22
- pry (~> 0.10)
23
- redis (3.3.5)
24
- redlock (0.2.0)
25
- redis (~> 3, >= 3.0.0)
26
- rspec (3.6.0)
27
- rspec-core (~> 3.6.0)
28
- rspec-expectations (~> 3.6.0)
29
- rspec-mocks (~> 3.6.0)
30
- rspec-core (3.6.0)
31
- rspec-support (~> 3.6.0)
32
- rspec-expectations (3.6.0)
33
- diff-lcs (>= 1.2.0, < 2.0)
34
- rspec-support (~> 3.6.0)
35
- rspec-mocks (3.6.0)
36
- diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.6.0)
38
- rspec-support (3.6.0)
39
- simplecov (0.15.0)
40
- docile (~> 1.1.0)
41
- json (>= 1.8, < 3)
42
- simplecov-html (~> 0.10.0)
43
- simplecov-html (0.10.2)
44
- simplecov-rcov (0.2.3)
45
- simplecov (>= 0.4.1)
46
- slop (3.6.0)
47
-
48
- PLATFORMS
49
- ruby
50
-
51
- DEPENDENCIES
52
- pry-byebug (~> 3.5)
53
- rspec (~> 3.6)
54
- simplecov-rcov (~> 0.2)
55
- synchronised_migration!
56
-
57
- BUNDLED WITH
58
- 1.16.0