cucumber 5.0.0 → 5.1.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: b3c9c9e718ba5a344adfb97aaebfb58f5c99bb6f8142bb74c115c9b7fe94d0f3
4
- data.tar.gz: 3a70805fa19b0b83393e61853a6803eecc3b5cfd578a3f1e2201c258fa11b107
3
+ metadata.gz: ef0451fffdd6dc7d18e7b75d248e3e75dee4f15bb328b8c313e4b6a5606741eb
4
+ data.tar.gz: 9c14ead4ef9845dc3762d8ffb2d53e9d83c0ad6f66898a104ccd602f207a273b
5
5
  SHA512:
6
- metadata.gz: 81ed3402348bf4882f9e8a3b43e3b926396813d844cb93c00e1bfecac15f3fb7672750e0162c01182bada9aed90aff96d1751d66fe3bcd7ff9a0bb0b10052c29
7
- data.tar.gz: 8f13726940d23325f2f8278dd6c6ddabbbe4cec7fa3b61d7066c2c068b3c326af011bb6eca6b4a18c0cc9ffa00043bb535d2932185259f60baf51ebefbd19087
6
+ metadata.gz: fd5f761cb29cd344974869cb82a4c25f2f648e11418296c3e7fb8a8d91a9934459519c26bdb89ce37ccccfe789965111e513c92a8106c5eccc81eec6b12a9288
7
+ data.tar.gz: 4adff7878c3433ba0cf48a7a15b0e5b1f007ab22b8cc001c5c751c87d0328c9c86124ac3e3e7c7ea2b793052f021feb8be90bbd2a3d6491413e12080ddf5ba64
@@ -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.0.0...master)
13
+ ## [In GIT](https://github.com/cucumber/cucumber-ruby/compare/v5.1.0...master)
14
14
 
15
15
  ### Added
16
16
 
@@ -22,6 +22,25 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
22
22
 
23
23
  ### Fixed
24
24
 
25
+ ## [5.1.0](https://github.com/cucumber/cucumber-ruby/compare/v5.0.0...5.1.0)
26
+
27
+ ### Added
28
+
29
+ * `-X GET` in an `--out` URL will now issue a `GET` request *without* a body. If the response is `202 Accepted` *and*
30
+ the `Location` header is present, a new `PUT` request will be sent *with* the body.
31
+
32
+ The main reason for this added behaviour is to allow request bodies larger than 6Mb to be sent while using `--publish`.
33
+ This also improves performance since the request body is only sent once (previously it would be sent twice).
34
+
35
+ ### Changed
36
+
37
+ * Set banner border color to green when publishing reports
38
+ * Postpone removal of `--format=json`, `embed` and `puts` to version 6.0.0 in deprecation messages
39
+
40
+ ### Fixed
41
+
42
+ * Display banner on stderr when publishing reports [#1462](https://github.com/cucumber/cucumber-ruby/issues/1462)
43
+
25
44
  ## [5.0.0](https://github.com/cucumber/cucumber-ruby/compare/v4.1.0...5.0.0)
26
45
 
27
46
  ### Added
@@ -9,7 +9,7 @@ require 'cucumber/core/test/result'
9
9
  module Cucumber
10
10
  module Cli
11
11
  class Options
12
- CUCUMBER_PUBLISH_URL = ENV['CUCUMBER_PUBLISH_URL'] || 'https://messages.cucumber.io/api/reports'
12
+ CUCUMBER_PUBLISH_URL = ENV['CUCUMBER_PUBLISH_URL'] || 'https://messages.cucumber.io/api/reports -X GET'
13
13
  INDENT = ' ' * 53
14
14
  BUILTIN_FORMATS = {
15
15
  'pretty' => ['Cucumber::Formatter::Pretty', 'Prints the feature as is - in colours.'],
@@ -367,7 +367,7 @@ Specify SEED to reproduce the shuffling from a previous run.
367
367
  end
368
368
 
369
369
  def require_jars(jars)
370
- Dir["#{jars}/**/*.jar"].each { |jar| require jar }
370
+ Dir["#{jars}/**/*.jar"].sort.each { |jar| require jar }
371
371
  end
372
372
 
373
373
  def publisher
@@ -41,7 +41,7 @@ module Cucumber
41
41
 
42
42
  module ForDevelopers
43
43
  def self.call(_message, _method, remove_after_version)
44
- raise "This method is due for removal after version #{remove_after_version}" if Cucumber::VERSION > remove_after_version
44
+ raise "This method is due for removal after version #{remove_after_version}" if Cucumber::VERSION >= remove_after_version
45
45
  end
46
46
  end
47
47
 
@@ -11,7 +11,7 @@ module Cucumber
11
11
  begin
12
12
  raise new(with_prefix(step_name)) # rubocop:disable Style/RaiseArgs
13
13
  rescue StandardError => e
14
- return e
14
+ e
15
15
  end
16
16
  end
17
17
 
@@ -136,7 +136,6 @@ module Cucumber
136
136
 
137
137
  private
138
138
 
139
- # rubocop:disable Metrics/PerceivedComplexity
140
139
  def process_scenario_container(container, original_previous_node)
141
140
  container.children.each do |child|
142
141
  previous_node = original_previous_node
@@ -158,7 +157,6 @@ module Cucumber
158
157
  end
159
158
  end
160
159
  end
161
- # rubocop:enable Metrics/PerceivedComplexity
162
160
  end
163
161
  end
164
162
  end
@@ -97,7 +97,7 @@ module Cucumber
97
97
  private
98
98
 
99
99
  def send_content(uri, method, headers, attempt = 10)
100
- content = @write_io
100
+ content = (method == 'GET' ? StringIO.new : @write_io)
101
101
  http = build_client(uri, @https_verify_mode)
102
102
 
103
103
  raise StandardError, "request to #{uri} failed (too many redirections)" if attempt <= 0
@@ -120,6 +120,10 @@ module Cucumber
120
120
  end
121
121
 
122
122
  case response
123
+ when Net::HTTPAccepted
124
+ return uri unless response['Location']
125
+
126
+ send_content(URI(response['Location']), 'PUT', headers, attempt - 1)
123
127
  when Net::HTTPSuccess
124
128
  uri
125
129
  when Net::HTTPRedirection
@@ -63,10 +63,10 @@ module Cucumber
63
63
  case pipe
64
64
  when :stderr
65
65
  $stderr = new($stderr)
66
- return $stderr
66
+ $stderr
67
67
  when :stdout
68
68
  $stdout = new($stdout)
69
- return $stdout
69
+ $stdout
70
70
  end
71
71
  end
72
72
  end
@@ -15,7 +15,7 @@ module Cucumber
15
15
 
16
16
  io = if url?(path_or_url_or_io)
17
17
  url = path_or_url_or_io
18
- reporter = url.start_with?(Cucumber::Cli::Options::CUCUMBER_PUBLISH_URL) ? URLReporter.new($stdout) : NoReporter.new
18
+ reporter = url.start_with?(Cucumber::Cli::Options::CUCUMBER_PUBLISH_URL) ? URLReporter.new($stderr) : NoReporter.new
19
19
  HTTPIO.open(url, nil, reporter)
20
20
  else
21
21
  File.open(path_or_url_or_io, Cucumber.file_mode('w'))
@@ -19,7 +19,7 @@ module Cucumber
19
19
  '--format=json',
20
20
  "Please use --format=message and stand-alone json-formatter.\n" \
21
21
  'json-formatter homepage: https://github.com/cucumber/cucumber/tree/master/json-formatter#cucumber-json-formatter',
22
- '5.0.0'
22
+ '6.0.0'
23
23
  )
24
24
 
25
25
  @io = ensure_io(config.out_stream)
@@ -106,7 +106,7 @@ module Cucumber
106
106
  write_file(feature_result_filename(feature_data[:uri]), @testsuite.target!)
107
107
  end
108
108
 
109
- def create_output_string(test_case, scenario, result, row_name) # rubocop:disable Metrics/PerceivedComplexity
109
+ def create_output_string(test_case, scenario, result, row_name)
110
110
  scenario_source = @ast_lookup.scenario_source(test_case)
111
111
  keyword = scenario_source.type == :Scenario ? scenario_source.scenario.keyword : scenario_source.scenario_outline.keyword
112
112
  output = "#{keyword}: #{scenario}\n\n"
@@ -7,7 +7,7 @@ module Cucumber
7
7
  class Rerun
8
8
  include Formatter::Io
9
9
 
10
- def initialize(config) # rubocop:disable Metrics/PerceivedComplexity
10
+ def initialize(config)
11
11
  @io = ensure_io(config.out_stream)
12
12
  @config = config
13
13
  @failures = {}
@@ -87,7 +87,7 @@ module Cucumber
87
87
  'If you simply want it in the console, '\
88
88
  'keep using "puts" (or Kernel.puts to avoid this message)',
89
89
  'puts(message)',
90
- '5.0.0'
90
+ '6.0.0'
91
91
  )
92
92
  messages.each { |message| log(message.to_s) }
93
93
  end
@@ -102,7 +102,7 @@ module Cucumber
102
102
  Cucumber.deprecate(
103
103
  'Please use attach(file, media_type) instead',
104
104
  'embed(file, mime_type, label)',
105
- '5.0.0'
105
+ '6.0.0'
106
106
  )
107
107
  attach(file, mime_type)
108
108
  end
@@ -143,7 +143,7 @@ module Cucumber
143
143
  end
144
144
 
145
145
  # Dynamially generate the API module, closuring the dependencies
146
- def self.for(runtime, language) # rubocop:disable Metrics/MethodLength
146
+ def self.for(runtime, language) # rubocop:disable Metrics/MethodLength,Metrics/AbcSize
147
147
  Module.new do # rubocop:disable Metrics/BlockLength
148
148
  def self.extended(object)
149
149
  # wrap the dynamically generated module so that we can document the methods
@@ -5,9 +5,7 @@ require 'cucumber/gherkin/formatter/ansi_escapes'
5
5
  begin
6
6
  # Support Rake > 0.8.7
7
7
  require 'rake/dsl_definition'
8
- # rubocop:disable Lint/HandleExceptions
9
8
  rescue LoadError
10
- # rubocop:enable Lint/HandleExceptions
11
9
  end
12
10
 
13
11
  module Cucumber
@@ -4,7 +4,7 @@ module Cucumber
4
4
  module Term
5
5
  module Banner
6
6
  def display_banner(lines, io, border_modifiers = nil)
7
- BannerMaker.new.display_banner(lines, io, border_modifiers || [:cyan])
7
+ BannerMaker.new.display_banner(lines, io, border_modifiers || %i[green bold])
8
8
  end
9
9
 
10
10
  class BannerMaker
@@ -1 +1 @@
1
- 5.0.0
1
+ 5.1.0
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.0.0
4
+ version: 5.1.0
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-08-19 00:00:00.000000000 Z
13
+ date: 2020-08-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: builder
@@ -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.0.0
645
+ summary: cucumber-5.1.0
646
646
  test_files: []