service_contract_webmock 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2f46883b4ec5fe2bdebd19249e0461c52015e9b
|
4
|
+
data.tar.gz: fa761f30620e2c18e2168cfda5b353bc84ac805d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7a4c6db34f1790f5e6ad99496ac19c7a813d2d5fde34baa7b172fe049fb206c852a7b14cb41708b41494a92470a62c788662ec11a0eb29b54a1d381f3ca76ba
|
7
|
+
data.tar.gz: 9843ea2e75a6284db12b32f25db06dbcbb8e44657f2cae321164800d25482f3e79b7b474e10ae22c1b0fb76f310e839d489da70433a570296705fe858afed145
|
@@ -28,10 +28,11 @@ module ServiceContractWebmock
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def stub_show_request
|
31
|
+
key = contract.endpoint("show").parameters.first.name
|
31
32
|
stub_request(:get, "#{name}/\\d+\\.json").
|
32
33
|
to_return do |request|
|
33
34
|
id = request.uri.path.scan(/\/(\d+)\.json/)[0][0].to_i
|
34
|
-
found = resources.select {|r| r[
|
35
|
+
found = resources.select {|r| r[key] == id}
|
35
36
|
|
36
37
|
if found.present?
|
37
38
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: service_contract_webmock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Donald Plummer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avro
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project:
|
139
|
-
rubygems_version: 2.4.
|
139
|
+
rubygems_version: 2.4.5.1
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: A library for generating webmock mocks with ServiceContract schemas
|