rails_migrate_mutex 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tasks/migrate_mutex.rake +1 -7
  3. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e90b0249a724e31ff7b4614e03b2ed362367932a
4
- data.tar.gz: b461921ac5f8b634cc370a48800affb94470f2f7
3
+ metadata.gz: fd4bb2303edf423f905b4f13660d11a0a676abd1
4
+ data.tar.gz: fd0f5383020ab3cf9091a1f2629f653b096e2334
5
5
  SHA512:
6
- metadata.gz: 8aa2122ad763a9ae64854bab0ff979258fbb5ce2cc0fa895c3e477f8d9805cbaf18fde0618c954b4f59648ece714847740d24269d89b1a6d09f096c91743d04d
7
- data.tar.gz: 7b4dfff0112e501d11de53d5362407c8de3d4b1ae38ea2b6887d567c01f299bbb0ee417c12b9814ae86b72433824d76379e2a804f4db61914d77e671496ffaa8
6
+ metadata.gz: 6274410fe3f71ece5173093ad9ac46d3ff966e1421485ee01c28a6938162c5057c774a4e81174ce1cc6afaf700e6d6395ced2c731e9024732f2b22ad80e00402
7
+ data.tar.gz: 872ad59bfa8fba1d093d84f438754fa280801e44a2bd952f7b80b148dcc1a80ef4f4b56c1e274254beecc79cde84073d3ecd1fa8406c0fdca5c023cb9c3eaa44
@@ -5,13 +5,7 @@ namespace :db do
5
5
  task mutex: [:environment] do
6
6
  TIMEOUT = 5 * 60 * 60
7
7
 
8
- # We want to set the redis instance to a sensible default, but only if it has not been set.
9
- # If it has not been set, it will raise an error. It's a bit messy, but works fine.
10
- begin
11
- RedisClassy.redis
12
- rescue RedisClassy::Error
13
- RedisClassy.redis = Redis.current
14
- end
8
+ RedisClassy.redis ||= Redis.current
15
9
 
16
10
  RedisMutex.with_lock('db-migrate-mutex', block: TIMEOUT, expire: TIMEOUT) do
17
11
  Rake::Task['db:migrate'].invoke
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_migrate_mutex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ad2games GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-11 00:00:00.000000000 Z
11
+ date: 2016-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: redis-classy
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 2.3.1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 2.3.1
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rspec
43
57
  requirement: !ruby/object:Gem::Requirement