spaceborne 0.1.19 → 0.1.20

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: 735d09d9d4e4b735895299add40bf99631e41921
4
- data.tar.gz: 8cbb76bb69faeaad546bff664845396191d14a73
3
+ metadata.gz: ef96cf9468ca3c758684d8cd8c6290bfe014fcd9
4
+ data.tar.gz: 28f6d52112ea5cce9fa3af86846232e121c1eaf4
5
5
  SHA512:
6
- metadata.gz: c3bac0ad5b87a0b84a93c109b21ae216f85d2ffdb3ce65ad0f68d1ce1cb009662fe86d6a9b46908298e3f54cac363b559c0c8ea6b641f254c3b7cf71a56e4df5
7
- data.tar.gz: f553d11bd0a35b85dfc296b2507d8e80d5de88aa3123ba1944d9c9a565d5b8c1fadf6ff280919da7a40bcee8c663bfb2689c2c0443ac29ee48f383d7d66b9ffa
6
+ metadata.gz: 779ad03d9c73643b403407966d5d22c30e9b44d7b2aa004e942e3b859db627a48f07be4c42c4dba47d3f4cf1700164a51ab5d1f8029c15018596592d019ace7a
7
+ data.tar.gz: e72b1a9fef03f8e90798be9293ab2b57d97d1fb85c3bb36e71bac7feccdcc126ef2f03f348c064275f0840f96d2be9e9c8354b73ef98a59d9c144b0120b5adfb
@@ -144,27 +144,42 @@ module Airborne
144
144
  end
145
145
  end
146
146
 
147
+ def exception_path_adder(path)
148
+ yield
149
+ rescue Airborne::ExpectationError => e
150
+ e.message << " at location #{path}"
151
+ raise e
152
+ end
153
+
147
154
  def expect_json_types(*args)
148
155
  call_with_relative_path(json_body, args) do |param, body|
149
- expect_json_types_impl(param, body)
156
+ exception_path_adder(args[0]) do
157
+ expect_json_types_impl(param, body)
158
+ end
150
159
  end
151
160
  end
152
161
 
153
162
  def expect_json(*args)
154
163
  call_with_relative_path(json_body, args) do |param, body|
155
- expect_json_impl(param, body)
164
+ exception_path_adder(args[0]) do
165
+ expect_json_impl(param, body)
166
+ end
156
167
  end
157
168
  end
158
169
 
159
170
  def expect_header_types(*args)
160
171
  call_with_relative_path(response.headers, args) do |param, body|
161
- expect_json_types_impl(param, body)
172
+ exception_path_adder(args[0]) do
173
+ expect_json_types_impl(param, body)
174
+ end
162
175
  end
163
176
  end
164
177
 
165
178
  def expect_header(*args)
166
179
  call_with_relative_path(response.headers, args) do |param, body|
167
- expect_json_impl(param, body)
180
+ exception_path_adder(args[0]) do
181
+ expect_json_impl(param, body)
182
+ end
168
183
  end
169
184
  end
170
185
  end
@@ -1,3 +1,3 @@
1
1
  module Spaceborne
2
- VERSION = '0.1.19'.freeze
2
+ VERSION = '0.1.20'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spaceborne
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Williams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-16 00:00:00.000000000 Z
11
+ date: 2018-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport