synchronised_migration 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9881480f34d86d8a177756df3a12e3ec54d1f6b9cfa80d2847084101749bca5a
|
4
|
+
data.tar.gz: e79ad9a4ceddcd69a1936789d485c50daa3bbdc95ef74f2052eac8aef08d65b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b921a8a53758ec6a7654c3decd2b86b2e60baf58336ce31a1eaded4cf7a266ad35e1603c2bc81547b94fc4617f7e5175e5bae7e052013c68004c410d6f410263
|
7
|
+
data.tar.gz: 2f934aebd9d2c5978fe368be30e606622861480ed2fd61d1a422c70d33ad8a391b7d19802743c29c3e16cff9e61972bc80051a3a460928d0f195169ce0c8d0de
|
data/CHANGELOG.md
CHANGED
@@ -50,7 +50,7 @@ class SynchronisedMigration::Main
|
|
50
50
|
|
51
51
|
def mark_successful
|
52
52
|
if success_key
|
53
|
-
redis.set success_key, timestamp,
|
53
|
+
redis.set success_key, timestamp, ex: 3600*24*30
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
@@ -60,7 +60,7 @@ class SynchronisedMigration::Main
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def mark_failed
|
63
|
-
redis.set fail_key, timestamp,
|
63
|
+
redis.set fail_key, timestamp, ex: 3600
|
64
64
|
end
|
65
65
|
|
66
66
|
def remove_fail_marker
|
@@ -65,8 +65,8 @@ describe SynchronisedMigration::Main do
|
|
65
65
|
expect(result).to be_success
|
66
66
|
expect(redlock).to have_received(:lock!)
|
67
67
|
expect(redis).to have_received(:get).with('migration-failed-bork')
|
68
|
-
expect(redis).to have_received(:set).with('migration-failed-bork', 123456789,
|
69
|
-
expect(redis).to have_received(:set).with('migration-success-bork', 123456789,
|
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)
|
70
70
|
expect(Kernel).to have_received(:system)
|
71
71
|
expect(Bundler).not_to have_received(:with_original_env)
|
72
72
|
expect(redis).to have_received(:del).with('migration-failed-bork')
|
@@ -128,7 +128,7 @@ describe SynchronisedMigration::Main do
|
|
128
128
|
|
129
129
|
it 'marks the failure in Redis' do
|
130
130
|
expect(result).not_to be_success
|
131
|
-
expect(redis).to have_received(:set).with('migration-failed-bork', 123456789,
|
131
|
+
expect(redis).to have_received(:set).with('migration-failed-bork', 123456789, ex: 3600)
|
132
132
|
expect(redis).not_to have_received(:del)
|
133
133
|
end
|
134
134
|
end
|
@@ -141,7 +141,7 @@ describe SynchronisedMigration::Main do
|
|
141
141
|
expect(result).to be_success
|
142
142
|
expect(redlock).to have_received(:lock!)
|
143
143
|
expect(redis).to have_received(:get).with('migration-failed')
|
144
|
-
expect(redis).to have_received(:set).with('migration-failed', 123456789,
|
144
|
+
expect(redis).to have_received(:set).with('migration-failed', 123456789, ex: 3600)
|
145
145
|
expect(Kernel).to have_received(:system)
|
146
146
|
expect(Bundler).not_to have_received(:with_original_env)
|
147
147
|
expect(redis).to have_received(:del).with('migration-failed')
|
@@ -155,7 +155,7 @@ describe SynchronisedMigration::Main do
|
|
155
155
|
|
156
156
|
it 'marks the failure in Redis' do
|
157
157
|
expect(result).not_to be_success
|
158
|
-
expect(redis).to have_received(:set).with('migration-failed', 123456789,
|
158
|
+
expect(redis).to have_received(:set).with('migration-failed', 123456789, ex: 3600)
|
159
159
|
expect(redis).not_to have_received(:del)
|
160
160
|
end
|
161
161
|
end
|
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.require_paths = ['lib']
|
18
18
|
|
19
19
|
spec.add_dependency 'redlock', '>= 0.2'
|
20
|
+
spec.add_dependency 'redis'
|
20
21
|
spec.add_development_dependency 'rake'
|
21
22
|
spec.add_development_dependency 'simplecov-rcov', '>= 0.2'
|
22
23
|
spec.add_development_dependency 'rspec', '>= 3.6'
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synchronised_migration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alvin Yim
|
8
8
|
- Stefan Cooper
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-06-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redlock
|
@@ -25,6 +25,20 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
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'
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: rake
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,7 +121,7 @@ files:
|
|
107
121
|
homepage: https://github.com/sealink/synchronised-migration-rb
|
108
122
|
licenses: []
|
109
123
|
metadata: {}
|
110
|
-
post_install_message:
|
124
|
+
post_install_message:
|
111
125
|
rdoc_options: []
|
112
126
|
require_paths:
|
113
127
|
- lib
|
@@ -123,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
137
|
version: '0'
|
124
138
|
requirements: []
|
125
139
|
rubygems_version: 3.0.3
|
126
|
-
signing_key:
|
140
|
+
signing_key:
|
127
141
|
specification_version: 4
|
128
142
|
summary: For deploying to multiple instances simultaneously
|
129
143
|
test_files:
|