raidis 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/raidis/configuration.rb +1 -1
- data/spec/lib/raidis/configuration_spec.rb +15 -0
- metadata +29 -28
data/README.md
CHANGED
@@ -47,7 +47,7 @@ After 15 seconds (or whichever timeout you configure), `Raidis.available?` turns
|
|
47
47
|
|
48
48
|
# Connection Pools
|
49
49
|
|
50
|
-
If you need to maintain a ConnectionPool with multiple connections to Redis (e.g. when you use [Sidekiq](https://github.com/mperham/sidekiq/issues/794)), you may use the something like `ConnectionPool.new { Raidis.redis! }` (note the exclamation mark) to populate your pool. `.
|
50
|
+
If you need to maintain a ConnectionPool with multiple connections to Redis (e.g. when you use [Sidekiq](https://github.com/mperham/sidekiq/issues/794)), you may use the something like `ConnectionPool.new { Raidis.redis! }` (note the exclamation mark) to populate your pool. `.redis!` returns a new connection each time you call it. Note that `Raidis.available?` is a global variable, so if any of the pools fail, Raidis will go into unavailable mode as described above.
|
51
51
|
|
52
52
|
## Configuration
|
53
53
|
|
data/lib/raidis/configuration.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative '../../../lib/raidis/configuration'
|
2
|
+
|
3
|
+
describe Raidis::Configuration do
|
4
|
+
|
5
|
+
let(:config) { Raidis::Configuration.new }
|
6
|
+
|
7
|
+
it "uses /etc/redis_master as default redis info file" do
|
8
|
+
config.info_file_path.to_s.should == '/etc/redis_master'
|
9
|
+
end
|
10
|
+
|
11
|
+
it "uses the given file as redis info file" do
|
12
|
+
config.info_file_path = '/foo/bar'
|
13
|
+
config.info_file_path.to_s.should == '/foo/bar'
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raidis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0
|
5
4
|
prerelease:
|
5
|
+
version: 0.2.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- bukowskis
|
@@ -12,85 +12,85 @@ cert_chain: []
|
|
12
12
|
date: 2013-03-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
20
|
+
none: false
|
21
|
+
name: redis-namespace
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
|
25
|
-
none: false
|
24
|
+
requirement: !ruby/object:Gem::Requirement
|
26
25
|
requirements:
|
27
26
|
- - ! '>='
|
28
27
|
- !ruby/object:Gem::Version
|
29
28
|
version: '0'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: rspec
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
29
|
none: false
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
version_requirements: !ruby/object:Gem::Requirement
|
34
32
|
requirements:
|
35
33
|
- - ! '>='
|
36
34
|
- !ruby/object:Gem::Version
|
37
35
|
version: '0'
|
36
|
+
none: false
|
37
|
+
name: rspec
|
38
38
|
type: :development
|
39
39
|
prerelease: false
|
40
|
-
|
41
|
-
none: false
|
40
|
+
requirement: !ruby/object:Gem::Requirement
|
42
41
|
requirements:
|
43
42
|
- - ! '>='
|
44
43
|
- !ruby/object:Gem::Version
|
45
44
|
version: '0'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: guard-rspec
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
45
|
none: false
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
48
|
requirements:
|
51
49
|
- - ! '>='
|
52
50
|
- !ruby/object:Gem::Version
|
53
51
|
version: '0'
|
52
|
+
none: false
|
53
|
+
name: guard-rspec
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
|
-
|
57
|
-
none: false
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - ! '>='
|
60
59
|
- !ruby/object:Gem::Version
|
61
60
|
version: '0'
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: rb-fsevent
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
61
|
none: false
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
64
|
requirements:
|
67
65
|
- - ! '>='
|
68
66
|
- !ruby/object:Gem::Version
|
69
67
|
version: '0'
|
68
|
+
none: false
|
69
|
+
name: rb-fsevent
|
70
70
|
type: :development
|
71
71
|
prerelease: false
|
72
|
-
|
73
|
-
none: false
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
74
73
|
requirements:
|
75
74
|
- - ! '>='
|
76
75
|
- !ruby/object:Gem::Version
|
77
76
|
version: '0'
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: timecop
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
77
|
none: false
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
80
|
requirements:
|
83
81
|
- - ! '>='
|
84
82
|
- !ruby/object:Gem::Version
|
85
83
|
version: '0'
|
84
|
+
none: false
|
85
|
+
name: timecop
|
86
86
|
type: :development
|
87
87
|
prerelease: false
|
88
|
-
|
89
|
-
none: false
|
88
|
+
requirement: !ruby/object:Gem::Requirement
|
90
89
|
requirements:
|
91
90
|
- - ! '>='
|
92
91
|
- !ruby/object:Gem::Version
|
93
92
|
version: '0'
|
93
|
+
none: false
|
94
94
|
description: See https://github.com/bukowskis/raidis
|
95
95
|
email:
|
96
96
|
executables: []
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- lib/raidis/redis_wrapper.rb
|
103
103
|
- lib/raidis/throttle.rb
|
104
104
|
- lib/raidis.rb
|
105
|
+
- spec/lib/raidis/configuration_spec.rb
|
105
106
|
- spec/lib/raidis/throttle_spec.rb
|
106
107
|
- spec/lib/raidis_spec.rb
|
107
108
|
- spec/lib/redis_wrapper_spec.rb
|
@@ -114,17 +115,17 @@ rdoc_options: []
|
|
114
115
|
require_paths:
|
115
116
|
- lib
|
116
117
|
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
-
none: false
|
118
118
|
requirements:
|
119
119
|
- - ! '>='
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
122
|
none: false
|
123
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
124
|
requirements:
|
125
125
|
- - ! '>='
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
|
+
none: false
|
128
129
|
requirements: []
|
129
130
|
rubyforge_project:
|
130
131
|
rubygems_version: 1.8.23
|