cucumber-api 0.3 → 0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.travis.yml +13 -1
- data/CHANGELOG.md +22 -1
- data/README.md +41 -7
- data/cucumber-api.gemspec +7 -6
- data/features/sample.feature +24 -3
- data/lib/cucumber-api/helpers.rb +21 -0
- data/lib/cucumber-api/response.rb +17 -4
- data/lib/cucumber-api/steps.rb +44 -23
- data/lib/cucumber-api/version.rb +2 -2
- metadata +30 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fbd5a42ce1e58be266e72a9ef14c57050a3095badf920e0de6ac12f411e35a72
|
4
|
+
data.tar.gz: 9eac80341c0eadaf45d5adfa87b72ce2852a8e02201851055f74d750b106257f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 802f90159a95ac6bdaf0adfc82cdaf6fdb5d18da457aba8fbf9d61e7b78a39b1cabe7ee4523eab0526544c1be8642ba3cf2c16b28a23b5f16ff1fd2e9f45c17b
|
7
|
+
data.tar.gz: da591efd35bb2a4480cac6d638b45d6ba6689737480938f2d618e07bb7f168b0e6ae7aa416f44a9ed074a318cc275829a783949911efb73f218de4d697bd1307
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,27 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [Current](https://github.com/hidroh/cucumber-api/compare/0.
|
3
|
+
## [Current](https://github.com/hidroh/cucumber-api/compare/0.7...master)
|
4
|
+
|
5
|
+
## [0.7](https://github.com/hidroh/cucumber-api/compare/0.6...0.7) (Aug 29, 2018)
|
6
|
+
* Allow clearing GET response cache #25
|
7
|
+
|
8
|
+
## [0.6](https://github.com/hidroh/cucumber-api/compare/0.5...0.6) (May 08, 2018)
|
9
|
+
* Allow headers to use grabbed values #24
|
10
|
+
|
11
|
+
## [0.5](https://github.com/hidroh/cucumber-api/compare/0.4...0.5) (January 26, 2018)
|
12
|
+
* Bump up dependencies, requires min Ruby version 2.3.0
|
13
|
+
* Fix bug where grabbed values are not shared #11
|
14
|
+
|
15
|
+
## [0.4](https://github.com/hidroh/cucumber-api/compare/0.3...0.4) (November 03, 2016)
|
16
|
+
* Support additional request headers
|
17
|
+
* Allow specifying JSON request body with docstring
|
18
|
+
* Support simple JSON response value verification
|
19
|
+
* Grabbed values now persist until overridden within scenario, or when scenario exits
|
20
|
+
|
21
|
+
## [0.3](https://github.com/hidroh/cucumber-api/compare/0.2...0.3) (March 27, 2015)
|
22
|
+
|
23
|
+
* Bumped up gem dependencies, relax to minor versions
|
24
|
+
* Added gem license
|
4
25
|
|
5
26
|
## [0.2](https://github.com/hidroh/cucumber-api/compare/0.1...0.2) (March 07, 2015)
|
6
27
|
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
[](https://travis-ci.org/hidroh/cucumber-api) [](http://badge.fury.io/rb/cucumber-api) [](https://gemnasium.com/hidroh/cucumber-api)
|
3
3
|
[](https://codeclimate.com/github/hidroh/cucumber-api) [](https://rubygems.org/gems/cucumber-api)
|
4
4
|
|
5
|
-
API validator in
|
5
|
+
API validator in BDD style with [Cucumber](https://cukes.info/). **cucumber-api** lets one validate public APIs JSON response in blazingly fast time.
|
6
6
|
|
7
7
|
Inspired by [cucumber-api-steps](https://github.com/jayzes/cucumber-api-steps).
|
8
8
|
|
@@ -44,6 +44,15 @@ Given I send and accept JSON
|
|
44
44
|
Given I send "(.*?)" and accept JSON
|
45
45
|
```
|
46
46
|
|
47
|
+
You could also others header's information like:
|
48
|
+
|
49
|
+
```gherkin
|
50
|
+
Given I send and accept JSON
|
51
|
+
And I add Headers:
|
52
|
+
| name1 | value |
|
53
|
+
| name2 | other |
|
54
|
+
```
|
55
|
+
|
47
56
|
Specify POST body
|
48
57
|
|
49
58
|
```gherkin
|
@@ -52,6 +61,13 @@ When I set form request body to:
|
|
52
61
|
| key1 | value1 |
|
53
62
|
| key2 | {value2} |
|
54
63
|
| key3 | file://path-to-file |
|
64
|
+
When I set JSON request body to:
|
65
|
+
"""
|
66
|
+
{
|
67
|
+
"key1": "jsonString",
|
68
|
+
"key2": 1
|
69
|
+
}
|
70
|
+
"""
|
55
71
|
```
|
56
72
|
|
57
73
|
Or from YAML/JSON file
|
@@ -83,13 +99,20 @@ When I send a (GET|POST|PATCH|PUT|DELETE) request to "(.*?)" with:
|
|
83
99
|
| value1 | value2 | ... |
|
84
100
|
```
|
85
101
|
|
86
|
-
Temporarily save values from the last request to use in
|
102
|
+
Temporarily save values from the last request to use in subsequent steps in the same scenario:
|
87
103
|
|
88
104
|
```gherkin
|
89
105
|
When I grab "(.*?)" as "(.*?)"
|
90
106
|
```
|
91
107
|
|
92
|
-
|
108
|
+
Optionally, auto infer placeholder from grabbed JSON path:
|
109
|
+
|
110
|
+
```gherkin
|
111
|
+
# Grab and auto assign {id} as placeholder
|
112
|
+
When I grab "$..id"
|
113
|
+
```
|
114
|
+
|
115
|
+
The saved value can then be used to replace `{placeholder}` in the subsequent steps.
|
93
116
|
|
94
117
|
Example:
|
95
118
|
|
@@ -97,16 +120,19 @@ Example:
|
|
97
120
|
When I send a POST request to "http://example.com/token"
|
98
121
|
And I grab "$..request_token" as "token"
|
99
122
|
And I grab "$..access_type" as "type"
|
100
|
-
And I
|
123
|
+
And I grab "$..id"
|
124
|
+
And I send a GET request to "http://example.com/{token}" with:
|
101
125
|
| type | pretty |
|
102
126
|
| {type} | true |
|
127
|
+
Then the JSON response should have required key "id" of type string and value "{id}"
|
103
128
|
```
|
104
129
|
|
105
|
-
Assume that [http://example.com/token](http://example.com/token) have an element `{"request_token": 1, "access_type": "full"}`, **cucumber-api** will execute the followings:
|
130
|
+
Assume that [http://example.com/token](http://example.com/token) have an element `{"request_token": 1, "access_type": "full", "id": "user1"}`, **cucumber-api** will execute the followings:
|
106
131
|
|
107
132
|
* POST [http://example.com/token](http://example.com/token)
|
108
|
-
* Extract the first `request_token` and `
|
133
|
+
* Extract the first `request_token`, `access_type` and `id` from JSON response and save it for subsequent steps
|
109
134
|
* GET [http://example.com/1?type=full&pretty=true](http://example.com/1?type=full&pretty=true)
|
135
|
+
* Verify that JSON response has a pair of JSON key-value: `"id": "user1"`
|
110
136
|
* Clear all saved values
|
111
137
|
|
112
138
|
This will be handy when one needs to make a sequence of calls to authenticate/authorize API access.
|
@@ -123,7 +149,8 @@ Then the response status should be "(\d+)"
|
|
123
149
|
Then the JSON response should follow "(.*?)"
|
124
150
|
Then the JSON response root should be (object|array)
|
125
151
|
Then the JSON response should have key "([^\"]*)"
|
126
|
-
Then the JSON response should have (required|optional) key "(.*?)" of type (numeric|string|
|
152
|
+
Then the JSON response should have (required|optional) key "(.*?)" of type (numeric|string|boolean|numeric_string|object|array|any)( or null)
|
153
|
+
Then the JSON response should have (required|optional) key "(.*?)" of type (numeric|string|boolean|numeric_string|object|array|any)( or null) and value "(.*?)"
|
127
154
|
```
|
128
155
|
|
129
156
|
Example:
|
@@ -134,6 +161,7 @@ Then the JSON response should follow "features/schemas/example_all.json"
|
|
134
161
|
Then the JSON response root should be array
|
135
162
|
Then the JSON response should have key "id"
|
136
163
|
Then the JSON response should have optional key "format" of type string or null
|
164
|
+
Then the JSON response should have required key "status" of type string and value "foobar"
|
137
165
|
```
|
138
166
|
|
139
167
|
Also checkout [sample](/features/sample.feature) for real examples. Run sample with the following command:
|
@@ -148,6 +176,12 @@ Response caching is provided for GET requests by default. This is useful when yo
|
|
148
176
|
|
149
177
|
Only the first request to that endpoint is made, subsequent requests will use cached response. Response caching is only available for GET method.
|
150
178
|
|
179
|
+
The response cache can also be cleared if needed:
|
180
|
+
|
181
|
+
```gherkin
|
182
|
+
Given I clear the response cache
|
183
|
+
```
|
184
|
+
|
151
185
|
## Dependencies
|
152
186
|
* [cucumber](https://github.com/cucumber/cucumber) for BDD style specs
|
153
187
|
* [jsonpath](https://github.com/joshbuddy/jsonpath) for traversal of JSON response via [JSON path](http://goessner.net/articles/JsonPath/)
|
data/cucumber-api.gemspec
CHANGED
@@ -13,11 +13,12 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.description = %q{cucumber-api allows API JSON response validation and verification in BDD style.}
|
14
14
|
s.files = `git ls-files`.split("\n")
|
15
15
|
s.require_paths = ["lib"]
|
16
|
-
s.required_ruby_version = '>=
|
16
|
+
s.required_ruby_version = '>= 2.3.0'
|
17
17
|
s.license = 'Apache-2.0'
|
18
18
|
|
19
|
-
s.add_dependency('
|
20
|
-
s.add_dependency('
|
21
|
-
s.add_dependency('
|
22
|
-
s.add_dependency('
|
23
|
-
|
19
|
+
s.add_dependency('addressable', '2.5')
|
20
|
+
s.add_dependency('cucumber', '~> 3.1.0')
|
21
|
+
s.add_dependency('jsonpath', '~> 0.8')
|
22
|
+
s.add_dependency('rest-client', '~> 2.0.2')
|
23
|
+
s.add_dependency('json-schema', '~> 2.8.0')
|
24
|
+
end
|
data/features/sample.feature
CHANGED
@@ -1,15 +1,18 @@
|
|
1
1
|
# https://github.com/HackerNews/API
|
2
2
|
Feature: Hacker News REST API validation
|
3
3
|
|
4
|
+
Background:
|
5
|
+
Given I send and accept JSON
|
6
|
+
|
4
7
|
Scenario: Verify top stories JSON schema
|
5
|
-
When I
|
8
|
+
When I add Headers:
|
9
|
+
| Cache-Control | no-cache |
|
6
10
|
And I send a GET request to "https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty"
|
7
11
|
Then the response status should be "200"
|
8
12
|
And the JSON response should follow "features/schemas/topstories.json"
|
9
13
|
|
10
14
|
Scenario Outline: Verify item JSON schema
|
11
|
-
When I send
|
12
|
-
And I send a GET request to "https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty"
|
15
|
+
When I send a GET request to "https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty"
|
13
16
|
Then the response status should be "200"
|
14
17
|
And the JSON response root should be array
|
15
18
|
When I grab "$[0]" as "id"
|
@@ -19,9 +22,27 @@ Feature: Hacker News REST API validation
|
|
19
22
|
Then the response status should be "200"
|
20
23
|
And the JSON response root should be object
|
21
24
|
And the JSON response should have <optionality> key "<key>" of type <value type>
|
25
|
+
And the JSON response should have "id" of type numeric and value "{id}"
|
22
26
|
|
23
27
|
Examples:
|
24
28
|
| key | value type | optionality |
|
25
29
|
| id | numeric | required |
|
26
30
|
| score | numeric | required |
|
27
31
|
| url | string | optional |
|
32
|
+
|
33
|
+
Scenario: Demonstrate setting the JSON body with a docstring
|
34
|
+
When I set JSON request body to:
|
35
|
+
"""
|
36
|
+
{
|
37
|
+
"title": "foo",
|
38
|
+
"body": "bar",
|
39
|
+
"userId": 1
|
40
|
+
}
|
41
|
+
"""
|
42
|
+
And I send a POST request to "http://jsonplaceholder.typicode.com/posts"
|
43
|
+
Then the response status should be "201"
|
44
|
+
And the JSON response should have "id" of type numeric and value "101"
|
45
|
+
And the JSON response should have "title" of type string and value "foo"
|
46
|
+
And the JSON response should have "body" of type string and value "bar"
|
47
|
+
And the JSON response should have "userId" of type numeric and value "1"
|
48
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module CucumberApi
|
2
|
+
module Helpers
|
3
|
+
# Bind grabbed values into placeholders in given URL
|
4
|
+
# Ex: http://example.com?id={id} with {id => 1} becomes http://example.com?id=1
|
5
|
+
# @param url [String] parameterized URL with placeholders
|
6
|
+
# @return [String] binded URL or original URL if no placeholders
|
7
|
+
def resolve url
|
8
|
+
url.gsub!(/\{([a-zA-Z0-9_]+)\}/) do |s|
|
9
|
+
s.gsub!(/[\{\}]/, '')
|
10
|
+
if instance_variable_defined?("@#{s}")
|
11
|
+
instance_variable_get("@#{s}")
|
12
|
+
else
|
13
|
+
raise 'Did you forget to "grab" ' + s + '?'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
url
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
World(CucumberApi::Helpers)
|
@@ -6,9 +6,6 @@ module CucumberApi
|
|
6
6
|
|
7
7
|
# Extension of {RestClient::Response} with support for JSON path traversal and validation
|
8
8
|
module Response
|
9
|
-
|
10
|
-
include RestClient::Response
|
11
|
-
|
12
9
|
# Create a Response with JSON path support
|
13
10
|
# @param response [RestClient::Response] original response
|
14
11
|
# @return [Response] self
|
@@ -91,6 +88,21 @@ module CucumberApi
|
|
91
88
|
value.nil? ? value : get_as_type(json_path, type, json)
|
92
89
|
end
|
93
90
|
|
91
|
+
# Retrieve value of the first JSON element with given JSON path as given type, and check for a given value
|
92
|
+
# @param json_path [String] a valid JSON path expression
|
93
|
+
# @param type [String] required type, possible values are 'numeric', 'string', 'boolean', or 'numeric_string'
|
94
|
+
# @param value [String] value to check for
|
95
|
+
# @param json [String] optional JSON from which to apply JSON path, default to response body
|
96
|
+
# @return [Object] value of first retrieved JSON element in form of given type or nil
|
97
|
+
# @raise [Exception] if JSON path is invalid or no matching JSON element found or matching element does not match
|
98
|
+
# required type or value
|
99
|
+
def get_as_type_and_check_value json_path, type, value, json=nil
|
100
|
+
v = get_as_type json_path, type, json
|
101
|
+
if value != v.to_s
|
102
|
+
raise %/Expect '#{json_path}' to be '#{value}' but was '#{v}'\n#{to_json_s}/
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
94
106
|
# Retrieve pretty JSON response for logging
|
95
107
|
# @return [String] pretty JSON response if verbose setting is true, empty string otherwise
|
96
108
|
def to_json_s
|
@@ -100,5 +112,6 @@ module CucumberApi
|
|
100
112
|
''
|
101
113
|
end
|
102
114
|
end
|
115
|
+
RestClient::Response.send(:include, self)
|
103
116
|
end
|
104
|
-
end
|
117
|
+
end
|
data/lib/cucumber-api/steps.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'cucumber-api/response'
|
2
|
+
require 'cucumber-api/helpers'
|
2
3
|
require 'rest-client'
|
3
4
|
require 'json-schema'
|
4
5
|
|
@@ -8,6 +9,10 @@ end
|
|
8
9
|
|
9
10
|
$cache = {}
|
10
11
|
|
12
|
+
Given(/^I clear the response cache$/) do
|
13
|
+
$cache = {}
|
14
|
+
end
|
15
|
+
|
11
16
|
Given(/^I send and accept JSON$/) do
|
12
17
|
steps %Q{
|
13
18
|
Given I send "application/json" and accept JSON
|
@@ -21,10 +26,44 @@ Given(/^I send "(.*?)" and accept JSON$/) do |content_type|
|
|
21
26
|
}
|
22
27
|
end
|
23
28
|
|
29
|
+
Given(/^I add Headers:$/) do |params|
|
30
|
+
params.rows_hash.each do |key, value|
|
31
|
+
@headers[key.to_sym] = resolve(value)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
When(/^I grab "([^"]+)"$/) do |k|
|
36
|
+
if @response.nil?
|
37
|
+
raise 'No response found.'
|
38
|
+
end
|
39
|
+
|
40
|
+
if k[0] == '$'
|
41
|
+
v = k
|
42
|
+
else
|
43
|
+
v = "$.#{k}"
|
44
|
+
end
|
45
|
+
|
46
|
+
k.gsub!(/[^0-9a-zA-Z_]/, '')
|
47
|
+
instance_variable_set("@#{k}", @response.get(v))
|
48
|
+
end
|
49
|
+
|
50
|
+
When(/^I grab "([^"]+)" as "([^"]+)"$/) do |k, v|
|
51
|
+
if @response.nil?
|
52
|
+
raise 'No response found.'
|
53
|
+
end
|
54
|
+
|
55
|
+
k = "$.#{k}" unless k[0] == '$'
|
56
|
+
instance_variable_set("@#{v}", @response.get(k))
|
57
|
+
end
|
58
|
+
|
24
59
|
When(/^I set JSON request body to '(.*?)'$/) do |body|
|
25
60
|
@body = JSON.parse body
|
26
61
|
end
|
27
62
|
|
63
|
+
When(/^I set JSON request body to:$/) do |body|
|
64
|
+
@body = JSON.dump(JSON.parse(body))
|
65
|
+
end
|
66
|
+
|
28
67
|
When(/^I set form request body to:$/) do |params|
|
29
68
|
@body = {}
|
30
69
|
params.rows_hash.each do |key, value|
|
@@ -51,15 +90,6 @@ When(/^I set request body from "(.*?).(yml|json)"$/) do |filename, extension|
|
|
51
90
|
end
|
52
91
|
end
|
53
92
|
|
54
|
-
When(/^I grab "(.*?)" as "(.*?)"$/) do |json_path, place_holder|
|
55
|
-
if @response.nil?
|
56
|
-
raise 'No response found, a request need to be made first before you can grab response'
|
57
|
-
end
|
58
|
-
|
59
|
-
@grabbed = {} if @grabbed.nil?
|
60
|
-
@grabbed[%/#{place_holder}/] = @response.get json_path
|
61
|
-
end
|
62
|
-
|
63
93
|
When(/^I send a (GET|POST|PATCH|PUT|DELETE) request to "(.*?)" with:$/) do |method, url, params|
|
64
94
|
unless params.hashes.empty?
|
65
95
|
query = params.hashes.first.map{|key, value| %/#{key}=#{value}/}.join("&")
|
@@ -76,7 +106,6 @@ When(/^I send a (GET|POST|PATCH|PUT|DELETE) request to "(.*?)"$/) do |method, ur
|
|
76
106
|
@response = $cache[%/#{request_url}/]
|
77
107
|
@headers = nil
|
78
108
|
@body = nil
|
79
|
-
@grabbed = nil
|
80
109
|
next
|
81
110
|
end
|
82
111
|
|
@@ -100,7 +129,6 @@ When(/^I send a (GET|POST|PATCH|PUT|DELETE) request to "(.*?)"$/) do |method, ur
|
|
100
129
|
@response = CucumberApi::Response.create response
|
101
130
|
@headers = nil
|
102
131
|
@body = nil
|
103
|
-
@grabbed = nil
|
104
132
|
$cache[%/#{request_url}/] = @response if 'GET' == %/#{method}/
|
105
133
|
end
|
106
134
|
|
@@ -118,8 +146,7 @@ Then(/^the JSON response should follow "(.*?)"$/) do |schema|
|
|
118
146
|
$!.fragments, $!.failed_attribute, $!.schema)
|
119
147
|
end
|
120
148
|
else
|
121
|
-
|
122
|
-
pending
|
149
|
+
raise %/Schema not found: '#{file_path}'/
|
123
150
|
end
|
124
151
|
end
|
125
152
|
|
@@ -136,7 +163,7 @@ Then(/^the JSON response should have key "([^\"]*)"$/) do |json_path|
|
|
136
163
|
end
|
137
164
|
|
138
165
|
Then(/^the JSON response should have (required|optional) key "(.*?)" of type \
|
139
|
-
(numeric|string|
|
166
|
+
(numeric|string|boolean|numeric_string|object|array|any)( or null)?$/) do |optionality, json_path, type, null_allowed|
|
140
167
|
next if optionality == 'optional' and not @response.has(json_path) # if optional and no such key then skip
|
141
168
|
if 'any' == type
|
142
169
|
@response.get json_path
|
@@ -147,13 +174,7 @@ Then(/^the JSON response should have (required|optional) key "(.*?)" of type \
|
|
147
174
|
end
|
148
175
|
end
|
149
176
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
# @return [String] binded URL or original URL if no placeholders
|
154
|
-
def resolve url
|
155
|
-
unless @grabbed.nil?
|
156
|
-
@grabbed.each { |key, value| url = url.gsub /\{#{key}\}/, %/#{value}/ }
|
157
|
-
end
|
158
|
-
url
|
177
|
+
Then(/^the JSON response should have "([^"]*)" of type \
|
178
|
+
(numeric|string|boolean|numeric_string) and value "([^"]*)"$/) do |json_path, type, value|
|
179
|
+
@response.get_as_type_and_check_value json_path, type, resolve(value)
|
159
180
|
end
|
data/lib/cucumber-api/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module CucumberApi
|
2
|
-
VERSION = "0.
|
3
|
-
end
|
2
|
+
VERSION = "0.8"
|
3
|
+
end
|
metadata
CHANGED
@@ -1,71 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.8'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ha Duy Trung
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: addressable
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.5'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: cucumber
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
33
|
+
version: 3.1.0
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
40
|
+
version: 3.1.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: jsonpath
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
47
|
+
version: '0.8'
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
54
|
+
version: '0.8'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rest-client
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
61
|
+
version: 2.0.2
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
68
|
+
version: 2.0.2
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: json-schema
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
75
|
+
version: 2.8.0
|
62
76
|
type: :runtime
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
82
|
+
version: 2.8.0
|
69
83
|
description: cucumber-api allows API JSON response validation and verification in
|
70
84
|
BDD style.
|
71
85
|
email:
|
@@ -86,6 +100,7 @@ files:
|
|
86
100
|
- features/schemas/topstories.json
|
87
101
|
- features/support/env.rb
|
88
102
|
- lib/cucumber-api.rb
|
103
|
+
- lib/cucumber-api/helpers.rb
|
89
104
|
- lib/cucumber-api/response.rb
|
90
105
|
- lib/cucumber-api/steps.rb
|
91
106
|
- lib/cucumber-api/version.rb
|
@@ -93,7 +108,7 @@ homepage: https://github.com/hidroh/cucumber-api
|
|
93
108
|
licenses:
|
94
109
|
- Apache-2.0
|
95
110
|
metadata: {}
|
96
|
-
post_install_message:
|
111
|
+
post_install_message:
|
97
112
|
rdoc_options: []
|
98
113
|
require_paths:
|
99
114
|
- lib
|
@@ -101,16 +116,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
116
|
requirements:
|
102
117
|
- - ">="
|
103
118
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
119
|
+
version: 2.3.0
|
105
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
121
|
requirements:
|
107
122
|
- - ">="
|
108
123
|
- !ruby/object:Gem::Version
|
109
124
|
version: '0'
|
110
125
|
requirements: []
|
111
|
-
|
112
|
-
|
113
|
-
signing_key:
|
126
|
+
rubygems_version: 3.2.3
|
127
|
+
signing_key:
|
114
128
|
specification_version: 4
|
115
129
|
summary: API validator with Cucumber
|
116
130
|
test_files: []
|