mulder 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mulder/client.rb +1 -1
- data/lib/mulder/version.rb +1 -1
- data/spec/lib/mulder/client_spec.rb +23 -4
- 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: bb924012ddd6660fb1324aaa9a774f9b395199f6
|
4
|
+
data.tar.gz: a021f1092d305af2512e6de228cafc8a6caf7842
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9de11ada5bbd69241eaed4d593b385a13e5da0393b96476ee00ea115ceae987f5e6cc2a405d3b073b895d555c130de5a03904eb18e93835723fa87a032cc23e1
|
7
|
+
data.tar.gz: 400042dafe5c63253f33a2d3062501567bccfd1a2a9cc4ba6f88693586fd97bf44b1fecc842f0c4c35b2c470e1fc289cec7e7b624c14984a0eeb27fbec644d0c
|
data/lib/mulder/client.rb
CHANGED
data/lib/mulder/version.rb
CHANGED
@@ -17,7 +17,7 @@ describe Mulder::Client do
|
|
17
17
|
describe '#group' do
|
18
18
|
it 'finds the correct group based on the given attributes' do
|
19
19
|
mocked_connection = mock
|
20
|
-
mocked_connection.expects(:group_by_id_regexp).with(
|
20
|
+
mocked_connection.expects(:group_by_id_regexp).with(/^foo-bar-(.*-)?WorkerGroup-.*$/i)
|
21
21
|
client = described_class.new(mocked_connection, 'foo', 'bar', 'WorkerGroup')
|
22
22
|
|
23
23
|
client.group
|
@@ -47,9 +47,28 @@ describe Mulder::Client do
|
|
47
47
|
'foo-bar-abc123-worker-3'.should match(client.id_regexp)
|
48
48
|
end
|
49
49
|
|
50
|
-
|
51
|
-
client
|
52
|
-
|
50
|
+
context 'with prefixed id' do
|
51
|
+
let(:client) { described_class.new(mock, 'widget-foo', 'bar', 'worker') }
|
52
|
+
|
53
|
+
it 'matches the prefixed group' do
|
54
|
+
'widget-foo-bar-abd123-worker-8'.should match(client.id_regexp)
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'does not match the non-prefixed group' do
|
58
|
+
'foo-bar-derp456-worker-99'.should_not match(client.id_regexp)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context 'with non-prefixed id' do
|
63
|
+
let(:client) { described_class.new(mock, 'foo', 'bar', 'worker') }
|
64
|
+
|
65
|
+
it 'does not match the prefixed group' do
|
66
|
+
'widget-foo-bar-abd123-worker-8'.should_not match(client.id_regexp)
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'matches the non-prefixed group' do
|
70
|
+
'foo-bar-derp456-worker-99'.should match(client.id_regexp)
|
71
|
+
end
|
53
72
|
end
|
54
73
|
end
|
55
74
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mulder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Duncan Grazier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|