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: 59e4650bf65a0018ea8b8efcab72e01cb81a60c9
4
- data.tar.gz: 6cf0fa47ae94be22429ea8b48430c510315caf9a
3
+ metadata.gz: c2f46883b4ec5fe2bdebd19249e0461c52015e9b
4
+ data.tar.gz: fa761f30620e2c18e2168cfda5b353bc84ac805d
5
5
  SHA512:
6
- metadata.gz: 5f38f725beafa855ca724e5103160a6730044b89f3ddf179f66c3f281801623c7a252c1e3d824800cdc7f0863f435e3962ec09963cd3f28e2a99d54aaa5de605
7
- data.tar.gz: 272ded90a1937744f125d8554c86a99aa9e5122bc4ad0508385d3ff970abf91c11a5cf7aeddfb7f4863eadf598b7ce2b9607e07c45b0d3759cbeab4018d02655
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['id'] == id}
35
+ found = resources.select {|r| r[key] == id}
35
36
 
36
37
  if found.present?
37
38
  {
@@ -1,3 +1,3 @@
1
1
  module ServiceContractWebmock
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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 00:00:00.000000000 Z
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.6
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