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 +4 -4
- data/lib/spaceborne.rb +19 -4
- data/lib/spaceborne/version.rb +1 -1
- 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: ef96cf9468ca3c758684d8cd8c6290bfe014fcd9
|
4
|
+
data.tar.gz: 28f6d52112ea5cce9fa3af86846232e121c1eaf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 779ad03d9c73643b403407966d5d22c30e9b44d7b2aa004e942e3b859db627a48f07be4c42c4dba47d3f4cf1700164a51ab5d1f8029c15018596592d019ace7a
|
7
|
+
data.tar.gz: e72b1a9fef03f8e90798be9293ab2b57d97d1fb85c3bb36e71bac7feccdcc126ef2f03f348c064275f0840f96d2be9e9c8354b73ef98a59d9c144b0120b5adfb
|
data/lib/spaceborne.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
180
|
+
exception_path_adder(args[0]) do
|
181
|
+
expect_json_impl(param, body)
|
182
|
+
end
|
168
183
|
end
|
169
184
|
end
|
170
185
|
end
|
data/lib/spaceborne/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|