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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbd5a42ce1e58be266e72a9ef14c57050a3095badf920e0de6ac12f411e35a72
4
- data.tar.gz: 9eac80341c0eadaf45d5adfa87b72ce2852a8e02201851055f74d750b106257f
3
+ metadata.gz: eb9862462c5142f231325c27317b186d462e5f0c06655e8f429459b34b822585
4
+ data.tar.gz: 6d2c5f53a30b2c55c6694211d57b7af194f4ed560d1a3dcf171c4fca70fb57f6
5
5
  SHA512:
6
- metadata.gz: 802f90159a95ac6bdaf0adfc82cdaf6fdb5d18da457aba8fbf9d61e7b78a39b1cabe7ee4523eab0526544c1be8642ba3cf2c16b28a23b5f16ff1fd2e9f45c17b
7
- data.tar.gz: da591efd35bb2a4480cac6d638b45d6ba6689737480938f2d618e07bb7f168b0e6ae7aa416f44a9ed074a318cc275829a783949911efb73f218de4d697bd1307
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.7...master)
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
@@ -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
@@ -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| %/#{key}=#{value}/}.join("&")
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 = URI.encode resolve(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
@@ -1,3 +1,3 @@
1
1
  module CucumberApi
2
- VERSION = "0.8"
2
+ VERSION = "0.9"
3
3
  end
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.8'
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-23 00:00:00.000000000 Z
11
+ date: 2021-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable