redlock 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 89b482115278216ae9e620ce8f7430bf4fe36715
4
- data.tar.gz: 75f2da7d8d167fea72815ca9e4ea3242425dfd9a
3
+ metadata.gz: 982a50bb024c832b7371866687c1cb22bfe46221
4
+ data.tar.gz: 63629b88159f7a268f4c6b898745870bf3580de6
5
5
  SHA512:
6
- metadata.gz: 33c9ef53d6833e461ac6c805748fcf20923f29e2fde681c684992cd2ff2fe607d84b5e17b95515331470bce0aa39a7662e5f5dc7a83941a17c9b647072145742
7
- data.tar.gz: 068c9b13201e315d9060ed6e646f1e19a6371a0892ece0d9f2fd719d45dee65aa622324a25d06a290e5e56638079f91da58d97fb2b214eea0c2230c185cc6ca4
6
+ metadata.gz: 7c02c1679c769f0020236541831e8127c99d316286d082e038ef859c6ec668a98aee60d5248ae2f678e53dd0c65fb619bb8be2d609f4a7160920cdd0f0ab2428
7
+ data.tar.gz: ba0dd7f8c2631dd8a6a0633cd2504827fcd678423c8a5d0a4acbee5007de9ba3b0752aba47aad16dfa383ba5c7d8d69f6a1a0e0e48f776277a6be24c623dfbbf
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Redlock - A ruby distributed lock using redis.
2
2
 
3
3
  > Distributed locks are a very useful primitive in many environments where different processes require to operate with shared resources in a mutually exclusive way.
4
- >
4
+ >
5
5
  > There are a number of libraries and blog posts describing how to implement a DLM (Distributed Lock Manager) with Redis, but every library uses a different approach, and many use a simple approach with lower guarantees compared to what can be achieved with slightly more complex designs.
6
6
 
7
7
  This is an implementation of a proposed [distributed lock algorithm with Redis](http://redis.io/topics/distlock). It started as a fork from [antirez implementation.](https://github.com/antirez/redlock-rb)
@@ -61,7 +61,7 @@ end
61
61
 
62
62
  ## Run tests
63
63
 
64
- Make sure you have at least 3 redis instances `redis-server --port 777[7-9]`
64
+ Make sure you have at least 1 redis instances up.
65
65
 
66
66
  $ rspec
67
67
 
@@ -32,6 +32,7 @@ module Redlock
32
32
  # Params:
33
33
  # +resource+:: the resource (or key) string to be locked.
34
34
  # +ttl+:: The time-to-live in ms for the lock.
35
+ # +block+:: an optional block that automatically unlocks the lock.
35
36
  def lock(resource, ttl, &block)
36
37
  lock_info = lock_instances(resource, ttl)
37
38
 
@@ -1,3 +1,3 @@
1
1
  module Redlock
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redlock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Moreira