lhc 1.1.0 → 1.2.0
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/lib/lhc/endpoint.rb +1 -0
- data/lib/lhc/version.rb +1 -1
- data/spec/endpoint/match_spec.rb +7 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 433be6f02c1ccf13d4371eb4ce4f494459f95bda
|
4
|
+
data.tar.gz: 1d1f479f03152e50798da81183673c6adc0b15d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 334d1f083f02164608ea72a104c2b749510525eb405346b11923f7ca154250d8e9fba5f69b9bad8d2f184839c60a892bf071317d56696c4666d292ff96ccc3e4
|
7
|
+
data.tar.gz: 363288f5578543311ba1f00c886cc64cca9ea1fe170946946f9adca8bc394169d8e79055f6ee06a4d4585858ce0aba0d145efec8f3c5184b653203141f26f4d0
|
data/lib/lhc/endpoint.rb
CHANGED
data/lib/lhc/version.rb
CHANGED
data/spec/endpoint/match_spec.rb
CHANGED
@@ -7,13 +7,13 @@ describe LHC::Endpoint do
|
|
7
7
|
context 'matching' do
|
8
8
|
it 'checks if a url matches a template' do
|
9
9
|
{
|
10
|
-
':datastore/v2/places' => 'http://
|
11
|
-
':datastore/v2/places/:id' => 'http://
|
12
|
-
':datastore/v2/places/:namespace/:id' => 'http://
|
10
|
+
':datastore/v2/places' => 'http://local.ch:8082/v2/places',
|
11
|
+
':datastore/v2/places/:id' => 'http://local.ch:8082/v2/places/ZW9OJyrbt4OZE9ueu80w-A',
|
12
|
+
':datastore/v2/places/:namespace/:id' => 'http://local.ch:8082/v2/places/switzerland/ZW9OJyrbt'
|
13
13
|
}.each do |template, url|
|
14
14
|
expect(
|
15
15
|
LHC::Endpoint.match?(url, template)
|
16
|
-
).to be
|
16
|
+
).to be, "#{url} should match #{template}!"
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -21,11 +21,12 @@ describe LHC::Endpoint do
|
|
21
21
|
context 'not matching' do
|
22
22
|
it 'checks if a url matches a template' do
|
23
23
|
{
|
24
|
-
':datastore/v2/places' => 'http://
|
24
|
+
':datastore/v2/places' => 'http://local.ch:8082/v2/places/ZW9OJyrbt4OZE9ueu80w-A',
|
25
|
+
':datastore/:campaign_id/feedbacks' => 'http://datastore.local.ch/feedbacks'
|
25
26
|
}.each do |template, url|
|
26
27
|
expect(
|
27
28
|
LHC::Endpoint.match?(url, template)
|
28
|
-
).not_to be
|
29
|
+
).not_to be, "#{url} should not match #{template}!"
|
29
30
|
end
|
30
31
|
end
|
31
32
|
end
|