cucumber 5.1.2 → 5.1.3
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/formatter/http_io.rb +27 -31
- data/lib/cucumber/glue/dsl.rb +1 -1
- data/lib/cucumber/version +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e1477c70b949106c7f0a7f30f5b387cfa8a86ed41180d791d3bed792dde0c38
|
4
|
+
data.tar.gz: d0aa04c7c51cd100d2419684f4b7e8c4d245a68567588fe6cf5e1e4c2a301ac6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d32e30dca15261c3f1aca9e0393c7a75ef2d044cae7bd209861a0d32580dc3ba59fc334269a6fe66fd29c792041552806c2fb3670670586c3cf27bf969795aa
|
7
|
+
data.tar.gz: a17f70e4b4731c13b700be8e2ff3a9c8e97e8075531938a351d9a9df711fbbd1a1911f88903953e9c387079767b3efb9cfe647a0e3c658aca7be3ac9a70b444d
|
data/CHANGELOG.md
CHANGED
@@ -10,7 +10,7 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
10
10
|
|
11
11
|
----
|
12
12
|
|
13
|
-
## [In GIT](https://github.com/cucumber/cucumber-ruby/compare/v5.1.
|
13
|
+
## [In GIT](https://github.com/cucumber/cucumber-ruby/compare/v5.1.3...master)
|
14
14
|
|
15
15
|
### Added
|
16
16
|
|
@@ -24,6 +24,12 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
24
24
|
|
25
25
|
### Security fixes
|
26
26
|
|
27
|
+
## [In GIT](https://github.com/cucumber/cucumber-ruby/compare/v5.1.2...v5.1.3)
|
28
|
+
|
29
|
+
### Fixed
|
30
|
+
|
31
|
+
* The `CUCUMBER_PUBLISH_TOKEN` now sets the correct HTTP header, following a fix in the curl option parser.
|
32
|
+
|
27
33
|
## [5.1.2](https://github.com/cucumber/cucumber-ruby/compare/v5.1.1...v5.1.2)
|
28
34
|
|
29
35
|
### Fixed
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'net/http'
|
2
2
|
require 'tempfile'
|
3
|
+
require 'shellwords'
|
3
4
|
|
4
5
|
module Cucumber
|
5
6
|
module Formatter
|
@@ -18,48 +19,43 @@ module Cucumber
|
|
18
19
|
|
19
20
|
class CurlOptionParser
|
20
21
|
def self.parse(options)
|
21
|
-
|
22
|
-
http_method = 'PUT'
|
23
|
-
url = chunks[0]
|
24
|
-
headers = ''
|
25
|
-
|
26
|
-
last_flag = nil
|
27
|
-
chunks.each do |chunk|
|
28
|
-
if ['-X', '--request'].include?(chunk)
|
29
|
-
last_flag = '-X'
|
30
|
-
next
|
31
|
-
end
|
22
|
+
args = Shellwords.split(options)
|
32
23
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
24
|
+
url = nil
|
25
|
+
http_method = 'PUT'
|
26
|
+
headers = {}
|
27
|
+
|
28
|
+
until args.empty?
|
29
|
+
arg = args.shift
|
30
|
+
case arg
|
31
|
+
when '-X', '--request'
|
32
|
+
http_method = remove_arg_for(args, arg)
|
33
|
+
when '-H'
|
34
|
+
header_arg = remove_arg_for(args, arg)
|
35
|
+
headers = headers.merge(parse_header(header_arg))
|
36
|
+
else
|
37
|
+
raise StandardError, "#{options} was not a valid curl command. Can't set url to #{arg} it is already set to #{url}" if url
|
38
|
+
url = arg
|
41
39
|
end
|
42
|
-
|
43
|
-
headers += chunk if last_flag == '-H'
|
44
40
|
end
|
41
|
+
raise StandardError, "#{options} was not a valid curl command" unless url
|
45
42
|
|
46
43
|
[
|
47
44
|
url,
|
48
45
|
http_method,
|
49
|
-
|
46
|
+
headers
|
50
47
|
]
|
51
48
|
end
|
52
49
|
|
53
|
-
def self.
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
headers.scan(str_scanner) do |header|
|
58
|
-
header = header.compact!
|
59
|
-
hash_headers[header[0]] = header[1]&.strip
|
60
|
-
end
|
50
|
+
def self.remove_arg_for(args, arg)
|
51
|
+
return args.shift unless args.empty?
|
52
|
+
raise StandardError, "Missing argument for #{arg}"
|
53
|
+
end
|
61
54
|
|
62
|
-
|
55
|
+
def self.parse_header(header_arg)
|
56
|
+
parts = header_arg.split(':', 2)
|
57
|
+
raise StandardError, "#{header_arg} was not a valid header" unless parts.length == 2
|
58
|
+
{ parts[0].strip => parts[1].strip }
|
63
59
|
end
|
64
60
|
end
|
65
61
|
|
data/lib/cucumber/glue/dsl.rb
CHANGED
data/lib/cucumber/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.1.
|
1
|
+
5.1.3
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aslak Hellesøy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-10-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: builder
|
@@ -381,7 +381,7 @@ dependencies:
|
|
381
381
|
version: '1.6'
|
382
382
|
- - ">="
|
383
383
|
- !ruby/object:Gem::Version
|
384
|
-
version: 1.6.
|
384
|
+
version: 1.6.1
|
385
385
|
type: :development
|
386
386
|
prerelease: false
|
387
387
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -391,7 +391,7 @@ dependencies:
|
|
391
391
|
version: '1.6'
|
392
392
|
- - ">="
|
393
393
|
- !ruby/object:Gem::Version
|
394
|
-
version: 1.6.
|
394
|
+
version: 1.6.1
|
395
395
|
- !ruby/object:Gem::Dependency
|
396
396
|
name: octokit
|
397
397
|
requirement: !ruby/object:Gem::Requirement
|
@@ -642,5 +642,5 @@ requirements: []
|
|
642
642
|
rubygems_version: 3.1.2
|
643
643
|
signing_key:
|
644
644
|
specification_version: 4
|
645
|
-
summary: cucumber-5.1.
|
645
|
+
summary: cucumber-5.1.3
|
646
646
|
test_files: []
|