spaceborne 0.1.44 → 0.1.50
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -6
- data/lib/spaceborne/version.rb +1 -1
- data/spaceborne.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9066ebab10c0a5ab92c8279cb265fd45c38f426defafcbe36fa023a52469a7f
|
4
|
+
data.tar.gz: 23954aaacc68cd241a39c90c84eab78079fe5a418ddd05ebd6ea41f49e1ec20f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52dfa18783fa89a45205aaa9864d4a365181ca21b7c8d27eb3641ca4d1fa0b3ef882de2079492f5e20e6e1f2224df7281d5311ec903a5067a06a179ebacb839c
|
7
|
+
data.tar.gz: aadd857339992a3eb8819ec92945d9366c993af21f401dd84f1bfe3d69105281bc279b01016a8e5a601546821a3139f080cedcc0662aea0e9374f3a423f5ef4d
|
data/README.md
CHANGED
@@ -26,19 +26,19 @@ $ gem install spaceborne
|
|
26
26
|
|
27
27
|
### Making a request
|
28
28
|
|
29
|
-
Spaceborne/airborne use curlyrest/rest-client to make the API requests. These are done in the manner that you actually think about the request, the http action verb, the url,
|
29
|
+
Spaceborne/airborne use curlyrest/rest-client to make the API requests. These are done in the manner that you actually think about the request, the http action verb, the url, body(optional depending on the verb) and headers. When creating a test, you can call any of the following methods: get, post, put, patch, delete, head, options.
|
30
30
|
|
31
31
|
#### Parts of a request
|
32
32
|
|
33
33
|
| part | description | restrictions |
|
34
34
|
|:--- |:----|:----|
|
35
35
|
|url|uri describing destination of the request|not including query/fragment|
|
36
|
-
|headers|hash of request headers|*optional request modifiers*|
|
37
36
|
|body|data being passed in the request|not on head/get requests|
|
37
|
+
|headers|hash of request headers|*optional request modifiers*|
|
38
38
|
|query|data passed on url after '?'|added as a 'params' hash in headers|
|
39
39
|
|
40
40
|
#### Optional request modifiers
|
41
|
-
These are passed as headers, but will be removed from the actual request,
|
41
|
+
These are passed as headers, but will be removed from the actual request, having the desired effect.
|
42
42
|
|
43
43
|
| modifier | values | effect|
|
44
44
|
|:---|:---|:---|
|
@@ -89,7 +89,7 @@ describe 'simple get sample' do
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
```
|
92
|
-
The parts of the example outside of the `wrap_request` block are typical rspec. The `wrap_request` is a spaceborne concept, saying that if anything fails inside of that block, then the failure contains the request, response, as well as why it failed. This is to work around the issue of an expectation failing, and having good info about why, but having no idea what the request or response were that caused the failure. The actual request is done on the `get` line. Validation of the response is the following `expect_*` lines.
|
92
|
+
The parts of the example outside of the `wrap_request` block are typical rspec. The `wrap_request` is a spaceborne concept, saying that if anything fails inside of that block, then the failure contains the last request, response, as well as why it failed. This is to work around the issue of an expectation failing, and having good info about why, but having no idea what the request or response were that caused the failure. The actual request is done on the `get` line. Validation of the response is the following `expect_*` lines.
|
93
93
|
|
94
94
|
#### Parts of response to validate
|
95
95
|
|
@@ -198,8 +198,8 @@ Validation for headers follows the same pattern as above, although nesting of mu
|
|
198
198
|
## Extensions to Airborne
|
199
199
|
|
200
200
|
1. Uses curlyrest to allow extension of rest-client with curl requests
|
201
|
-
2. Uses wrap_request to bundle groups of expectations so that if any fail, the failure will contain the request and response, rather than just seeing the expectation that failed
|
202
|
-
3. json_body is only parsed once after a request rather than on each expect call (spaceborne resets the
|
201
|
+
2. Uses wrap_request to bundle groups of expectations so that if any fail, the failure will contain the last request and response, rather than just seeing the expectation that failed
|
202
|
+
3. json_body is only parsed once after a request rather than on each expect call (spaceborne resets the json_body on a new http request).
|
203
203
|
4. Expectations for headers use the same form as the expectations for json bodies.
|
204
204
|
* `expect_header same arguments/handling as expect_json`
|
205
205
|
* `expect_header_types same arguments/handling as expect_json_types`
|
data/lib/spaceborne/version.rb
CHANGED
data/spaceborne.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_runtime_dependency 'activesupport'
|
25
25
|
spec.add_runtime_dependency 'airborne', '~> 0.3'
|
26
26
|
spec.add_runtime_dependency 'curlyrest', '~> 0.1.30'
|
27
|
-
spec.add_runtime_dependency 'rack'
|
27
|
+
spec.add_runtime_dependency 'rack', '~> 2.2.3.1'
|
28
28
|
spec.add_runtime_dependency 'rack-test', '~> 1.1', '<= 2.0'
|
29
29
|
spec.add_runtime_dependency 'rest-client', '< 3.0', '>= 1.7.3'
|
30
30
|
spec.add_runtime_dependency 'rspec', '~> 3.8'
|
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.50
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keith Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: rack
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 2.2.3.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 2.2.3.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rack-test
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|