cucumber-api 0.8 → 0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/lib/cucumber-api/helpers.rb +1 -1
- data/lib/cucumber-api/steps.rb +2 -2
- data/lib/cucumber-api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb9862462c5142f231325c27317b186d462e5f0c06655e8f429459b34b822585
|
4
|
+
data.tar.gz: 6d2c5f53a30b2c55c6694211d57b7af194f4ed560d1a3dcf171c4fca70fb57f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec7eff4ad9c6713ee2a215202aeec1f4415c6d0a9730b1b4c20d5ee86501d2f62e27612694a0e731bd71dd58ce2866027122ee18ac2081e19c7aaf0aa60fe432
|
7
|
+
data.tar.gz: 3858d5dc859df864a60629c9cf7f66f3f97f4d24a7ee8ee38057c1325e1cce4c80547f29b52a47389260dafb359160b37bc59e836472da987a34caf76a65777f
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
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.9...master)
|
4
|
+
|
5
|
+
## [0.9](https://github.com/hidroh/cucumber-api/compare/0.9...0.8) (Mar 25, 2021)
|
6
|
+
* Replace URI.encode with CGI.escape #33
|
7
|
+
|
8
|
+
## [0.8](https://github.com/hidroh/cucumber-api/compare/0.8...0.7) (Mar 23, 2021)
|
9
|
+
* Raise error when schema is expected but missing #32
|
4
10
|
|
5
11
|
## [0.7](https://github.com/hidroh/cucumber-api/compare/0.6...0.7) (Aug 29, 2018)
|
6
12
|
* Allow clearing GET response cache #25
|
data/lib/cucumber-api/helpers.rb
CHANGED
@@ -8,7 +8,7 @@ module CucumberApi
|
|
8
8
|
url.gsub!(/\{([a-zA-Z0-9_]+)\}/) do |s|
|
9
9
|
s.gsub!(/[\{\}]/, '')
|
10
10
|
if instance_variable_defined?("@#{s}")
|
11
|
-
instance_variable_get("@#{s}")
|
11
|
+
CGI.escape %/#{instance_variable_get("@#{s}")}/
|
12
12
|
else
|
13
13
|
raise 'Did you forget to "grab" ' + s + '?'
|
14
14
|
end
|
data/lib/cucumber-api/steps.rb
CHANGED
@@ -92,7 +92,7 @@ end
|
|
92
92
|
|
93
93
|
When(/^I send a (GET|POST|PATCH|PUT|DELETE) request to "(.*?)" with:$/) do |method, url, params|
|
94
94
|
unless params.hashes.empty?
|
95
|
-
query = params.hashes.first.map{|key, value|
|
95
|
+
query = params.hashes.first.map{|key, value| %/CGI.escape #{key}=#{value}/}.join("&")
|
96
96
|
url = url.include?('?') ? %/#{url}&#{query}/ : %/#{url}?#{query}/
|
97
97
|
end
|
98
98
|
steps %Q{
|
@@ -101,7 +101,7 @@ When(/^I send a (GET|POST|PATCH|PUT|DELETE) request to "(.*?)" with:$/) do |meth
|
|
101
101
|
end
|
102
102
|
|
103
103
|
When(/^I send a (GET|POST|PATCH|PUT|DELETE) request to "(.*?)"$/) do |method, url|
|
104
|
-
request_url =
|
104
|
+
request_url = resolve(url)
|
105
105
|
if 'GET' == %/#{method}/ and $cache.has_key? %/#{request_url}/
|
106
106
|
@response = $cache[%/#{request_url}/]
|
107
107
|
@headers = nil
|
data/lib/cucumber-api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.9'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ha Duy Trung
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|