lock-smith 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,15 @@ module Locksmith
14
14
  !env(key).nil?
15
15
  end
16
16
 
17
- def aws_id; env!("AWS_ID"); end
18
- def aws_secret; env!("AWS_SECRET"); end
17
+ def aws_id
18
+ @aws_id ||= env!("AWS_ID")
19
+ end
20
+
21
+ def aws_secret
22
+ @aws_secret ||= env!("AWS_SECRET")
23
+ end
24
+
25
+ def aws_id=(value); @aws_id = value; end
26
+ def aws_secret=(value); @aws_secret = value; end
19
27
  end
20
28
  end
@@ -17,10 +17,10 @@ module Locksmith
17
17
  # Clean up expired locks. Does not grantee that we will
18
18
  # be able to acquire the lock, just a nice thing to do for
19
19
  # the other processes attempting to lock.
20
- rm(name) if expired?(name, opts[:ttl])
20
+ delete(name) if expired?(name, opts[:ttl])
21
21
  if create(name, opts[:attempts])
22
22
  begin Timeout::timeout(opts[:ttl]) {return(yield)}
23
- ensure rm(name)
23
+ ensure delete(name)
24
24
  end
25
25
  end
26
26
  end
@@ -37,7 +37,7 @@ module Locksmith
37
37
  end
38
38
  end
39
39
 
40
- def rm(name)
40
+ def delete(name)
41
41
  locks.at(name).delete
42
42
  end
43
43
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lock-smith
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: