db_lock 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/database.yml +0 -0
- data/lib/db_lock.rb +1 -1
- data/lib/db_lock/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7230e5421d955e3ed7e9903b2a730bcde5200bb4
|
4
|
+
data.tar.gz: 551309356ff9e36e28a657f5d981d5dd5fd8cec0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a4778d48baed0e2cd1c80e7473c8a5146cf3a9376a1635568b115bc69e8d687407e2ab5aae8d2ccffd2ce6e1c87208ba8f3e08cff0ddd27042289175e07ed68
|
7
|
+
data.tar.gz: 8e16aa30a9f515abe1f4628642e30495dbc0fc6dde3a74ec7e14dfd501e640e7fb198412ef658451c611d7293696b8b19a2d610dc7e8b3d4bd975aa60ac2299f
|
data/config/database.yml
CHANGED
File without changes
|
data/lib/db_lock.rb
CHANGED
@@ -4,7 +4,7 @@ module DBLock
|
|
4
4
|
class Lock
|
5
5
|
class << self
|
6
6
|
def get(name, timeout=0)
|
7
|
-
timeout = timeout.
|
7
|
+
timeout = timeout.to_f # catches nil
|
8
8
|
timeout = 0 if timeout < 0
|
9
9
|
raise "Invalid lock name: #{name.inspect}" if name.empty?
|
10
10
|
raise AlreadyLocked.new("Already lock in progress") if locked?
|
data/lib/db_lock/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: db_lock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mkon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|