cucumber-http 0.7.0 → 0.7.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 505a70f70933a819f67d4fa163985fe75115233481959ff1742cffc61cac4adb
4
- data.tar.gz: 2ae449691aa78c1008fedf802b5309cf0f74b29b75d08fa1e274335b0e0630e0
2
+ SHA1:
3
+ metadata.gz: ad029283d163bcff1a85fa26cdeb79a6adc8fb6e
4
+ data.tar.gz: 99361e0d01175c116e4576a8a4009ffbd1c90393
5
5
  SHA512:
6
- metadata.gz: 46653d3f35be042a2f0c10333e241cffc4c4ae64e10731b6e6b10769d9809e764eb8ebf4932b1ab402eb598781cde0531f55d0e16acde1d6bd34b5a5b2199d88
7
- data.tar.gz: 17d7bbabe915ec23ca015a39806f275e4ae44f0d90d6b65b4f71a92666f6fb406f310bbdd6df69a2b9147bb738f4b76bbb102b2c0e4ee3f6ca01c5fb7a3cf77c
6
+ metadata.gz: 667aa9ec423d499a1c7cc8cbbc85a13f03cff79188e835f30b3fe72c9d013f4110e2006a64c3226fc1f789e6f980d36978a7bdac68743e85cf4ef6b2a7fa4eda
7
+ data.tar.gz: b85ef6db88edefad989d85b7a662e0ca8bbb7a14ede2641d8f61dc45f07dbdac1cb383106ac56914f0b3f8ca00b25445ec4813948acb30d51437af9259cdedf7
@@ -0,0 +1,7 @@
1
+ module Cucumber
2
+ module Http
3
+ module Configuration
4
+ attr_accessor :data_directory
5
+ end
6
+ end
7
+ end
@@ -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 = "#{Dir.pwd}/features/support/data/#{filename}"
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)
@@ -89,7 +87,7 @@ When /^I send a (GET|POST|PATCH|PUT|DELETE) request to "([^"]*)"(?: with paramet
89
87
  params_hash = Hash[params.split('&').inject([]) { |result, param| result << param.split('=') }]
90
88
  end
91
89
 
92
- params_hash.each { |name, value| add_parameter(name, value) }
90
+ params_hash.each { |name, value| add_parameter(name, resolve(value)) }
93
91
  end
94
92
 
95
93
  perform_request(method, request_url)
@@ -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 = "#{Dir.pwd}/features/support/data/#{filename}"
99
+ path = "#{Cucumber::Http.data_directory}/#{filename}"
102
100
 
103
101
  request_url = URI.join(url, URI::encode(endpoint)).to_s
104
102
 
@@ -1,5 +1,5 @@
1
1
  module Cucumber
2
2
  module Http
3
- VERSION = "0.7.0"
3
+ VERSION = "0.7.2"
4
4
  end
5
5
  end
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.0
4
+ version: 0.7.2
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-02-22 00:00:00.000000000 Z
11
+ date: 2022-10-04 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
@@ -136,7 +137,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
137
  - !ruby/object:Gem::Version
137
138
  version: '0'
138
139
  requirements: []
139
- rubygems_version: 3.1.2
140
+ rubyforge_project:
141
+ rubygems_version: 2.6.8
140
142
  signing_key:
141
143
  specification_version: 4
142
144
  summary: Cucumber steps to easily test JSON APIs