switch_board 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +20 -1
- data/lib/switch_board/datasets/redis_dataset.rb +1 -1
- data/lib/switch_board/version.rb +1 -1
- data/spec/switch_board_spec.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b148b38dd8f0f3ad64181a3be63d3bd560841b61
|
4
|
+
data.tar.gz: 1501d9f3f35d08da79b409786edaf41d0aaae2b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d33f6e6ba34a026634334bc1acb3d91b884f570d8b1f846705574ae75dd610eede2ed97166176d60c4da2f5e56a85c5bb4cdcb98dcab6ea94fd4576dab9bd05
|
7
|
+
data.tar.gz: e2ddc1e9023de69d40a0a71c42f868449995c0060fce895bf9459e1c7d8b49baca9c5af78e16e12072b9397c59131f12a16ca0b047a234a7638ce4eb8e95d265
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,30 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
switch_board (0.1.
|
4
|
+
switch_board (0.1.5)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
builder (3.2.2)
|
10
|
+
coderay (1.0.9)
|
11
|
+
columnize (0.3.6)
|
12
|
+
debugger (1.6.1)
|
13
|
+
columnize (>= 0.3.1)
|
14
|
+
debugger-linecache (~> 1.2.0)
|
15
|
+
debugger-ruby_core_source (~> 1.2.3)
|
16
|
+
debugger-linecache (1.2.0)
|
17
|
+
debugger-ruby_core_source (1.2.3)
|
10
18
|
diff-lcs (1.2.4)
|
11
19
|
json (1.8.0)
|
20
|
+
method_source (0.8.1)
|
21
|
+
pry (0.9.12.2)
|
22
|
+
coderay (~> 1.0.5)
|
23
|
+
method_source (~> 0.8)
|
24
|
+
slop (~> 3.4)
|
25
|
+
pry-debugger (0.2.2)
|
26
|
+
debugger (~> 1.3)
|
27
|
+
pry (~> 0.9.10)
|
12
28
|
rdoc (4.0.1)
|
13
29
|
json (~> 1.4)
|
14
30
|
redis (3.0.4)
|
@@ -25,11 +41,14 @@ GEM
|
|
25
41
|
diff-lcs (>= 1.1.3, < 2.0)
|
26
42
|
rspec-mocks (2.14.3)
|
27
43
|
rubygems-tasks (0.2.4)
|
44
|
+
slop (3.4.5)
|
28
45
|
|
29
46
|
PLATFORMS
|
30
47
|
ruby
|
31
48
|
|
32
49
|
DEPENDENCIES
|
50
|
+
pry
|
51
|
+
pry-debugger
|
33
52
|
rdoc
|
34
53
|
redis
|
35
54
|
redis-objects
|
data/lib/switch_board/version.rb
CHANGED
data/spec/switch_board_spec.rb
CHANGED
@@ -139,6 +139,16 @@ describe :RedisDataset do
|
|
139
139
|
dataset.get_all_locked_ids.count.should eq 4
|
140
140
|
end
|
141
141
|
|
142
|
+
it "should unlock only the specific id requested getting all the locked IDs" do
|
143
|
+
dataset.register_locker(1, "Pupik")
|
144
|
+
expect { dataset.lock_id(1, "SOME_ID_5") }.not_to raise_error
|
145
|
+
expect { dataset.lock_id(1, "SOME_OTHER_ID") }.not_to raise_error
|
146
|
+
expect { dataset.lock_id(1, "SOME_OTHER_ID_KK") }.not_to raise_error
|
147
|
+
dataset.get_all_locked_ids.count.should eq 3
|
148
|
+
dataset.unlock_id(1, "SOME_ID_5")
|
149
|
+
dataset.get_all_locked_ids.count.should eq 2
|
150
|
+
end
|
151
|
+
|
142
152
|
it "should get clean results when no IDs are locked" do
|
143
153
|
dataset.register_locker(1, "Pupik")
|
144
154
|
dataset.register_locker(2, "Raz")
|
@@ -166,7 +176,7 @@ describe :RedisDataset do
|
|
166
176
|
dataset.get_all_my_locked_ids(2).count.should eq 1
|
167
177
|
end
|
168
178
|
|
169
|
-
it "should unlock id successfully"
|
179
|
+
it "should unlock id successfully" do
|
170
180
|
dataset.register_locker(1, "Pupik")
|
171
181
|
dataset.lock_id(2, "SOME_ID_6", 100)
|
172
182
|
dataset.get_all_my_locked_ids(2).count.should eq 1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switch_board
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Avner Cohen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|