cucumber-http 0.4.0 → 0.5.0

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
2
  SHA256:
3
- metadata.gz: 760307f677ade8fcdc3a4b6629f7143e311377f2856d57664f0a4ccfed60fa24
4
- data.tar.gz: 68e7faacc18737c3ef9ceb560ae4f362610dfeaf92a4fa08dd0723c2ef36827b
3
+ metadata.gz: 3f1be1b47ea1c0772213878f14f19516aa3b6479905e3f82a8e77b12798a6076
4
+ data.tar.gz: efa78abf389fdf1c32d2e7bd5b48dbfabcd44acb7a90f20dd8c0cfff5fbfaee0
5
5
  SHA512:
6
- metadata.gz: 8500cc4964f737ee94d3a28ceb1f10c1b2996e29171f04219ba7e0ed0039b996190a4d1ec57bbaae56d5bdf1eb8ae5a0422440f69561b6398cb1ab645651967d
7
- data.tar.gz: 9373aad646952bac2bb998744238f5ff7f143531c385df8e4cf391f429fe2560af3c37f6c60ad66b985cd99f0ecf2366701b2c3d284ea2438c4c5951be205e2f
6
+ metadata.gz: 54ebb323e49b717a1780eba422d971eddaa42a0140cd77858af510f60da0c43788d7dc65bc85e3e8b8bac2f322074acf3ba7b98c0930c296009527e17320950e
7
+ data.tar.gz: df4ac0a1b5dae08baa6adcb9cc6155ce7fb1ccac4b6cadebc7f1ee3bed0458d622b95935e7a6fd370a4b5459b19c5e35c14404926dc8583e1063909f4f8b626b
data/README.md CHANGED
@@ -83,11 +83,11 @@ Given /^I send "(.*?)" and accept "(.*?)"$/
83
83
  ```
84
84
 
85
85
  ```ruby
86
- Given /^I send "(.*?)" and accept (XML|JSON)$/
86
+ Given /^I send "(.*?)" and accept JSON$/
87
87
  ```
88
88
 
89
89
  ```ruby
90
- Given /^I send and accept (XML|JSON)$/
90
+ Given /^I send and accept JSON$/
91
91
  ```
92
92
 
93
93
  ```ruby
@@ -107,7 +107,7 @@ Then /^the response status should( not)? be "(#{CAPTURE_INTEGER})"$/
107
107
  ```
108
108
 
109
109
  ```ruby
110
- Then /^the response body should be valid (XML|JSON)$/
110
+ Then /^the response body should be valid JSON$/
111
111
  ```
112
112
 
113
113
  #### Debugging
@@ -12,8 +12,6 @@ Then /^show me the( unparsed)? response$/ do |unparsed|
12
12
  if unparsed.nil?
13
13
  if response[:headers]['content-type'][0] =~ /json/
14
14
  body = JSON.pretty_generate(JSON.parse(response[:body]))
15
- elsif response[:headers]['content-type'][0] =~ /xml/
16
- body = Nokogiri::XML(response[:body])
17
15
  end
18
16
  end
19
17
 
@@ -1,4 +1,3 @@
1
- require 'nokogiri'
2
1
  require 'json_spec'
3
2
 
4
3
  Given /^I set headers?:$/ do |hdrs|
@@ -35,7 +34,7 @@ Given /^I send "(.*?)" and accept "(.*?)"$/ do |content_type, accept_type|
35
34
  }
36
35
  end
37
36
 
38
- Given /^I send "(.*?)" and accept (XML|JSON)$/ do |content_type, accept_type|
37
+ Given /^I send "(.*?)" and accept JSON$/ do |content_type, accept_type|
39
38
  steps %Q{
40
39
  Given I set headers:
41
40
  | Content-Type | #{content_type} |
@@ -43,7 +42,7 @@ Given /^I send "(.*?)" and accept (XML|JSON)$/ do |content_type, accept_type|
43
42
  }
44
43
  end
45
44
 
46
- Given /^I send and accept (XML|JSON)$/ do |type|
45
+ Given /^I send and accept JSON$/ do |type|
47
46
  steps %Q{
48
47
  Given I set headers:
49
48
  | Content-Type | application/#{type.downcase} |
@@ -101,11 +100,6 @@ Then /^the response status should( not)? be "(#{CAPTURE_INTEGER})"$/ do |negativ
101
100
  end
102
101
  end
103
102
 
104
- Then /^the response body should be valid (XML|JSON)$/ do |type|
105
- case type
106
- when 'XML'
107
- expect { Nokogiri::XML(response[:body]) { |config| config.strict } }.not_to raise_error
108
- when 'JSON'
109
- expect { JSON.parse(response[:body]) }.not_to raise_error
110
- end
103
+ Then /^the response body should be valid JSON$/ do |type|
104
+ expect { JSON.parse(response[:body]) }.not_to raise_error
111
105
  end
@@ -1,5 +1,5 @@
1
1
  module Cucumber
2
2
  module Http
3
- VERSION = "0.4.0"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  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.4.0
4
+ version: 0.5.0
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-01-21 00:00:00.000000000 Z
11
+ date: 2022-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.0'
55
- - !ruby/object:Gem::Dependency
56
- name: nokogiri
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.6'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.6'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: faker
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +94,7 @@ dependencies:
108
94
  - - "~>"
109
95
  - !ruby/object:Gem::Version
110
96
  version: '1.9'
111
- description: Cucumber steps to easily test external XML and JSON APIs
97
+ description: Cucumber steps to easily test external JSON APIs
112
98
  email:
113
99
  - kristof.willaert@publiq.be
114
100
  executables: []
@@ -153,5 +139,5 @@ requirements: []
153
139
  rubygems_version: 3.1.2
154
140
  signing_key:
155
141
  specification_version: 4
156
- summary: Cucumber steps to easily test XML and JSON APIs
142
+ summary: Cucumber steps to easily test JSON APIs
157
143
  test_files: []