cucumber-http 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 505a70f70933a819f67d4fa163985fe75115233481959ff1742cffc61cac4adb
4
- data.tar.gz: 2ae449691aa78c1008fedf802b5309cf0f74b29b75d08fa1e274335b0e0630e0
3
+ metadata.gz: 0232a60b32d3567ea573d9d14ed9f20855d73dab6606f0f34f4d99b73c466349
4
+ data.tar.gz: b7a4607176199b8ec28d08421006cee16c9a87f93550f6022ba0a4eb77130061
5
5
  SHA512:
6
- metadata.gz: 46653d3f35be042a2f0c10333e241cffc4c4ae64e10731b6e6b10769d9809e764eb8ebf4932b1ab402eb598781cde0531f55d0e16acde1d6bd34b5a5b2199d88
7
- data.tar.gz: 17d7bbabe915ec23ca015a39806f275e4ae44f0d90d6b65b4f71a92666f6fb406f310bbdd6df69a2b9147bb738f4b76bbb102b2c0e4ee3f6ca01c5fb7a3cf77c
6
+ metadata.gz: faec65815b43fc54d5e99dbfeeb901513d3d8626761f263de337d1f723bbac0283ae7e6fe1b3b93b6c436b4c5c3e7c883921952a5842cf347dcb68187aa9a0e7
7
+ data.tar.gz: 163dcbabd2c0b8d488ee9f945fa4d56505cc8b32692a3d3d23b906ae3a1bab8b53c12f4321e6d260c743ca2ad2bc51d47c73afccc0d324208cb2362c358672b5
@@ -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)
@@ -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.1"
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.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-02-22 00:00:00.000000000 Z
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