locky 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/locky/version.rb +1 -1
  3. data/lib/locky.rb +5 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05587a5dc71c458b45eefd9f60b3b577a1591449
4
- data.tar.gz: 95c29c4d9b9f56655eaf6fccc7ac1dfcbedaefa1
3
+ metadata.gz: 3175be064223f8910885f31dedef146ee2dcfd6d
4
+ data.tar.gz: 4b60fb8230056e04d5bff8865df94b5408a2e8d8
5
5
  SHA512:
6
- metadata.gz: e682d4bbb1a5e2b317b30ffda730aa2cd4f10c4dfa0c054878052ad3b9e2396caa80a0009b208d364a22fe99bc498486207f853fcdff36cdc8d2867468d7178a
7
- data.tar.gz: d69ddb0aa5aecc76faada8518c1ee9a048b001ad081846fb1e55e6a145e01317cd256b111e00091b5a427553a3c00c1eb14f25b96c60e7c30c99ae64f59d80c2
6
+ metadata.gz: 08efe2542304e3b02a4c55752d9d8520f954a343782c0e1ba97ba58d9167a1298fcb8bd2a41dd8adb2df40d64e645b407085998f4e1fd4ea9c2b8d3362034d55
7
+ data.tar.gz: b92a1f667ff1d26e743397ec50e11fb1db2a9a620384150194c81f0de83da92736f5aaada1a6dc2320647ff35b0578e7626c95842f7b0557172ccfdcdf515fb0
data/lib/locky/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Locky
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
data/lib/locky.rb CHANGED
@@ -12,9 +12,11 @@ class Locky
12
12
  def lock(process)
13
13
  raise Error, "#{name} already locked by #{locked_by}" if locked?
14
14
  adapter[name] = process
15
- yield
16
- ensure
17
- adapter.delete name
15
+ begin
16
+ yield
17
+ ensure
18
+ adapter.delete name
19
+ end
18
20
  end
19
21
 
20
22
  def locked?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Naiman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-05 00:00:00.000000000 Z
11
+ date: 2015-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler