cucumber-http 0.7.0 → 0.7.1
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 +4 -4
- data/lib/cucumber/http/configuration.rb +7 -0
- data/lib/cucumber/http/http_steps.rb +2 -4
- data/lib/cucumber/http/version.rb +1 -1
- data/lib/cucumber/http.rb +9 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0232a60b32d3567ea573d9d14ed9f20855d73dab6606f0f34f4d99b73c466349
|
4
|
+
data.tar.gz: b7a4607176199b8ec28d08421006cee16c9a87f93550f6022ba0a4eb77130061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faec65815b43fc54d5e99dbfeeb901513d3d8626761f263de337d1f723bbac0283ae7e6fe1b3b93b6c436b4c5c3e7c883921952a5842cf347dcb68187aa9a0e7
|
7
|
+
data.tar.gz: 163dcbabd2c0b8d488ee9f945fa4d56505cc8b32692a3d3d23b906ae3a1bab8b53c12f4321e6d260c743ca2ad2bc51d47c73afccc0d324208cb2362c358672b5
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'json_spec'
|
2
|
-
|
3
1
|
Given /^I set headers?:$/ do |hdrs|
|
4
2
|
hdrs.rows_hash.each { |name, value| add_header(name, value) }
|
5
3
|
end
|
@@ -59,7 +57,7 @@ Given(/^I set the JSON request payload to:$/) do |payload|
|
|
59
57
|
end
|
60
58
|
|
61
59
|
Given(/^I set the JSON request payload from "(.*?)"$/) do |filename|
|
62
|
-
path = "#{
|
60
|
+
path = "#{Cucumber::Http.data_directory}/#{filename}"
|
63
61
|
|
64
62
|
if File.file? path
|
65
63
|
set_payload(JSON.parse(resolve(File.read(path))).to_json)
|
@@ -98,7 +96,7 @@ end
|
|
98
96
|
When 'I upload {string} from path {string} to {string}' do |key, filename, endpoint|
|
99
97
|
method = 'post'
|
100
98
|
payload_key = key
|
101
|
-
path = "#{
|
99
|
+
path = "#{Cucumber::Http.data_directory}/#{filename}"
|
102
100
|
|
103
101
|
request_url = URI.join(url, URI::encode(endpoint)).to_s
|
104
102
|
|
data/lib/cucumber/http.rb
CHANGED
@@ -3,3 +3,12 @@ require 'cucumber/http/hooks'
|
|
3
3
|
require 'cucumber/http/http_steps'
|
4
4
|
require 'cucumber/http/benchmark_steps'
|
5
5
|
require 'cucumber/http/debug_steps'
|
6
|
+
require 'cucumber/http/configuration'
|
7
|
+
require 'json_spec'
|
8
|
+
require 'json_spec/cucumber'
|
9
|
+
|
10
|
+
module Cucumber
|
11
|
+
module Http
|
12
|
+
extend Configuration
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kristof Willaert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- README.md
|
105
105
|
- lib/cucumber/http.rb
|
106
106
|
- lib/cucumber/http/benchmark_steps.rb
|
107
|
+
- lib/cucumber/http/configuration.rb
|
107
108
|
- lib/cucumber/http/debug_steps.rb
|
108
109
|
- lib/cucumber/http/hooks.rb
|
109
110
|
- lib/cucumber/http/http_steps.rb
|