redis-semaphore 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +21 -0
  2. data/lib/redis/semaphore.rb +2 -2
  3. metadata +1 -1
data/README.md CHANGED
@@ -94,6 +94,27 @@ Testing
94
94
  $ bundle install
95
95
  $ rake
96
96
 
97
+ Changelog
98
+ ---------
99
+
100
+ ###0.1.5 October 1, 2012
101
+ - Add detection of Redis::Namespace definition to avoid potential bug (thanks ruud!).
102
+
103
+ ###0.1.4 October 1, 2012
104
+ - Fixed empty namespaces (thanks ruurd!).
105
+
106
+ ###0.1.3 July 9, 2012
107
+ - Tokens are now identifiable (thanks timgaleckas!).
108
+
109
+ ###0.1.2 June 1, 2012
110
+ - Add redis-namespace support (thanks neovintage!).
111
+
112
+ ### 0.1.1 September 17, 2011
113
+ - When an exception is raised during locked period, ensure it unlocks.
114
+
115
+ ### 0.1.0 August 4, 2011
116
+ - Initial release.
117
+
97
118
  Author
98
119
  ------
99
120
 
@@ -68,11 +68,11 @@ class Redis
68
68
 
69
69
  private
70
70
  def list_name
71
- @redis.is_a?(Redis::Namespace) ? "#{@name}:LIST" : "SEMAPHORE:#{@name}:LIST"
71
+ (defined?(Redis::Namespace) && @redis.is_a?(Redis::Namespace)) ? "#{@name}:LIST" : "SEMAPHORE:#{@name}:LIST"
72
72
  end
73
73
 
74
74
  def exists_name
75
- @redis.is_a?(Redis::Namespace) ? "#{@name}:EXISTS" : "SEMAPHORE:#{@name}:EXISTS"
75
+ (defined?(Redis::Namespace) && @redis.is_a?(Redis::Namespace)) ? "#{@name}:EXISTS" : "SEMAPHORE:#{@name}:EXISTS"
76
76
  end
77
77
 
78
78
  def exists_or_create!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-semaphore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: