redis-mutex 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,9 +1,9 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "redis-classy", "~> 0.9.0"
3
+ gem "redis-classy", "~> 1.0.0"
4
4
 
5
5
  group :development do
6
- gem "rspec", "~> 2.5.0"
6
+ gem "rspec", "~> 2.6.0"
7
7
  gem "bundler", "~> 1.0.0"
8
- gem "jeweler", "~> 1.5.2"
8
+ gem "jeweler", "~> 1.6.0"
9
9
  end
data/Gemfile.lock CHANGED
@@ -3,30 +3,30 @@ GEM
3
3
  specs:
4
4
  diff-lcs (1.1.2)
5
5
  git (1.2.5)
6
- jeweler (1.5.2)
6
+ jeweler (1.6.0)
7
7
  bundler (~> 1.0.0)
8
8
  git (>= 1.2.5)
9
9
  rake
10
- rake (0.8.7)
11
- redis (2.1.1)
12
- redis-classy (0.9.0)
13
- redis-namespace (~> 0.10.0)
14
- redis-namespace (0.10.0)
10
+ rake (0.9.0)
11
+ redis (2.2.0)
12
+ redis-classy (1.0.0)
13
+ redis-namespace (~> 1.0.0)
14
+ redis-namespace (1.0.3)
15
15
  redis (< 3.0.0)
16
- rspec (2.5.0)
17
- rspec-core (~> 2.5.0)
18
- rspec-expectations (~> 2.5.0)
19
- rspec-mocks (~> 2.5.0)
20
- rspec-core (2.5.1)
21
- rspec-expectations (2.5.0)
16
+ rspec (2.6.0)
17
+ rspec-core (~> 2.6.0)
18
+ rspec-expectations (~> 2.6.0)
19
+ rspec-mocks (~> 2.6.0)
20
+ rspec-core (2.6.2)
21
+ rspec-expectations (2.6.0)
22
22
  diff-lcs (~> 1.1.2)
23
- rspec-mocks (2.5.0)
23
+ rspec-mocks (2.6.0)
24
24
 
25
25
  PLATFORMS
26
26
  ruby
27
27
 
28
28
  DEPENDENCIES
29
29
  bundler (~> 1.0.0)
30
- jeweler (~> 1.5.2)
31
- redis-classy (~> 0.9.0)
32
- rspec (~> 2.5.0)
30
+ jeweler (~> 1.6.0)
31
+ redis-classy (~> 1.0.0)
32
+ rspec (~> 2.6.0)
data/Rakefile CHANGED
@@ -7,7 +7,8 @@ rescue Bundler::BundlerError => e
7
7
  $stderr.puts "Run `bundle install` to install missing gems"
8
8
  exit e.status_code
9
9
  end
10
- require 'rake'
10
+ require 'rake/file_utils'
11
+ include FileUtils
11
12
 
12
13
  require 'jeweler'
13
14
  Jeweler::Tasks.new do |gem|
@@ -21,28 +22,14 @@ Jeweler::Tasks.new do |gem|
21
22
  end
22
23
  Jeweler::RubygemsDotOrgTasks.new
23
24
 
24
- require 'rspec/core'
25
- require 'rspec/core/rake_task'
26
- RSpec::Core::RakeTask.new(:spec) do |spec|
27
- spec.pattern = FileList['spec/**/*_spec.rb']
28
- end
29
-
30
25
  desc "Flush the test database"
31
26
  task :flushdb do
32
27
  require 'redis-classy'
33
- Redis::Classy.db = Redis.new
34
- Redis::Classy.select 1
28
+ Redis::Classy.db = Redis.new(:db => 15)
35
29
  Redis::Classy.flushdb
36
30
  end
37
31
 
38
32
  task :default => :spec
39
-
40
- require 'rake/rdoctask'
41
- Rake::RDocTask.new do |rdoc|
42
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
43
-
44
- rdoc.rdoc_dir = 'rdoc'
45
- rdoc.title = "redis-mutex #{version}"
46
- rdoc.rdoc_files.include('README*')
47
- rdoc.rdoc_files.include('lib/**/*.rb')
33
+ task :spec do
34
+ exec "rspec spec/redis_mutex_spec.rb"
48
35
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
data/redis-mutex.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{redis-mutex}
8
- s.version = "1.0.0"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kenn Ejima"]
12
- s.date = %q{2011-03-01}
12
+ s.date = %q{2011-05-21}
13
13
  s.description = %q{Distrubuted non-blocking mutex in Ruby using Redis}
14
14
  s.email = %q{kenn.ejima@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -34,32 +34,28 @@ Gem::Specification.new do |s|
34
34
  s.homepage = %q{http://github.com/kenn/redis-mutex}
35
35
  s.licenses = ["MIT"]
36
36
  s.require_paths = ["lib"]
37
- s.rubygems_version = %q{1.5.3}
37
+ s.rubygems_version = %q{1.6.2}
38
38
  s.summary = %q{Distrubuted non-blocking mutex in Ruby using Redis}
39
- s.test_files = [
40
- "spec/redis_mutex_spec.rb",
41
- "spec/spec_helper.rb"
42
- ]
43
39
 
44
40
  if s.respond_to? :specification_version then
45
41
  s.specification_version = 3
46
42
 
47
43
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
- s.add_runtime_dependency(%q<redis-classy>, ["~> 0.9.0"])
49
- s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
44
+ s.add_runtime_dependency(%q<redis-classy>, ["~> 1.0.0"])
45
+ s.add_development_dependency(%q<rspec>, ["~> 2.6.0"])
50
46
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
51
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
47
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
52
48
  else
53
- s.add_dependency(%q<redis-classy>, ["~> 0.9.0"])
54
- s.add_dependency(%q<rspec>, ["~> 2.5.0"])
49
+ s.add_dependency(%q<redis-classy>, ["~> 1.0.0"])
50
+ s.add_dependency(%q<rspec>, ["~> 2.6.0"])
55
51
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
56
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
52
+ s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
57
53
  end
58
54
  else
59
- s.add_dependency(%q<redis-classy>, ["~> 0.9.0"])
60
- s.add_dependency(%q<rspec>, ["~> 2.5.0"])
55
+ s.add_dependency(%q<redis-classy>, ["~> 1.0.0"])
56
+ s.add_dependency(%q<rspec>, ["~> 2.6.0"])
61
57
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
62
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
58
+ s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
63
59
  end
64
60
  end
65
61
 
@@ -1,6 +1,10 @@
1
- require 'spec_helper'
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe Redis::Mutex do
4
+ before do
5
+ Redis::Classy.flushdb
6
+ end
7
+
4
8
  after do
5
9
  Redis::Classy.flushdb
6
10
  end
data/spec/spec_helper.rb CHANGED
@@ -7,12 +7,11 @@ require 'redis-mutex'
7
7
  # in ./support/ and its subdirectories.
8
8
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
9
 
10
- Redis::Classy.db = Redis.new
11
- Redis::Classy.select 1
12
- unless Redis::Classy.keys.empty?
13
- puts '[ERROR]: Redis database 1 not empty! run "rake flushdb" beforehand.'
14
- exit!
15
- end
16
-
17
10
  RSpec.configure do |config|
11
+ # Use database 15 for testing so we don't accidentally step on you real data.
12
+ Redis::Classy.db = Redis.new(:db => 15)
13
+ unless Redis::Classy.keys.empty?
14
+ puts '[ERROR]: Redis database 15 not empty! run "rake flushdb" beforehand.'
15
+ exit!
16
+ end
18
17
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: redis-mutex
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.0
5
+ version: 1.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kenn Ejima
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-01 00:00:00 -08:00
13
+ date: 2011-05-21 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ~>
22
22
  - !ruby/object:Gem::Version
23
- version: 0.9.0
23
+ version: 1.0.0
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: *id001
@@ -31,7 +31,7 @@ dependencies:
31
31
  requirements:
32
32
  - - ~>
33
33
  - !ruby/object:Gem::Version
34
- version: 2.5.0
34
+ version: 2.6.0
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: *id002
@@ -53,7 +53,7 @@ dependencies:
53
53
  requirements:
54
54
  - - ~>
55
55
  - !ruby/object:Gem::Version
56
- version: 1.5.2
56
+ version: 1.6.0
57
57
  type: :development
58
58
  prerelease: false
59
59
  version_requirements: *id004
@@ -94,7 +94,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - ">="
96
96
  - !ruby/object:Gem::Version
97
- hash: -1194994369925945289
97
+ hash: 3421574840884084281
98
98
  segments:
99
99
  - 0
100
100
  version: "0"
@@ -107,10 +107,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements: []
108
108
 
109
109
  rubyforge_project:
110
- rubygems_version: 1.5.3
110
+ rubygems_version: 1.6.2
111
111
  signing_key:
112
112
  specification_version: 3
113
113
  summary: Distrubuted non-blocking mutex in Ruby using Redis
114
- test_files:
115
- - spec/redis_mutex_spec.rb
116
- - spec/spec_helper.rb
114
+ test_files: []
115
+