gurke 3.5.0 → 3.5.1

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: f25197fd297ba62d42f9d4895bd3df3bd556882cd5fc66769b0bb717ebe1c16e
4
- data.tar.gz: fd92245e82302cd497b236ba92bbcb14917dbcee30cbc0923c8ce9c9867de028
3
+ metadata.gz: 710b7c0f7f8ea2be601b05c87d0ab4d8bd82a2a4b823097ec5eee6623dfe716c
4
+ data.tar.gz: a895ccddac2e6124aa876964478d0a47f4b2b0784c343a6d977a6a2996b104c9
5
5
  SHA512:
6
- metadata.gz: 914606fbd5b71e005980a8dec79d0842093d544299282018a2c0b2cbc4cbdce35dcbf6aa30799417ec1fca855a07bfbf958aa7abaf9f737a698b3f99b887426b
7
- data.tar.gz: 0cd6bb85c10f9edcea212902844cc6417c857133584b1f852d31b5ae75707c8c9f2cdbec17b227f7303f90ebfe30e13eae41a54ab8b5fc852464e50e584760e8
6
+ metadata.gz: 5066a5b8feea6cb4be92c8fd3f61ef4a56394dad2f25c51a48015786e1dea66ffddabce74558a85228e1f8463467d72bdc143e659fdc94c9bf40fc537ceeb877
7
+ data.tar.gz: 12186efacb0655f0afa172a74b214c66b6833743c79604fa3c63f34672116be69cf52eccdd0b165575133d24f0a8d5bf86acfe0b5e238cac2c738f310c8adaa4
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.5.1] - 2025-04-10
11
+
12
+ ### Changed
13
+
14
+ - Print spaces on empty lines to improve logging GitLab CI/CD
15
+
10
16
  ## [3.5.0] - 2025-04-09
11
17
 
12
18
  ### Added
@@ -136,7 +142,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
136
142
 
137
143
  ## [1.0.0] - 2013-12-04
138
144
 
139
- [Unreleased]: https://github.com/jgraichen/gurke/compare/v3.5.0...HEAD
145
+ [Unreleased]: https://github.com/jgraichen/gurke/compare/v3.5.1...HEAD
146
+ [3.5.1]: https://github.com/jgraichen/gurke/compare/v3.5.0...v3.5.1
140
147
  [3.5.0]: https://github.com/jgraichen/gurke/compare/v3.4.0...v3.5.0
141
148
  [3.4.0]: https://github.com/jgraichen/gurke/compare/v3.3.5...v3.4.0
142
149
  [3.3.5]: https://github.com/jgraichen/gurke/compare/v3.3.4...v3.3.5
data/lib/gurke/cli.rb CHANGED
@@ -102,8 +102,6 @@ module Gurke
102
102
  options[:tags] << '~wip'
103
103
  end
104
104
 
105
- pp options
106
-
107
105
  call(options, argv)
108
106
  rescue OptionParser::InvalidOption => e
109
107
  warn e.message
@@ -15,10 +15,10 @@ module Gurke::Reporters
15
15
  return unless result.state == :failed
16
16
 
17
17
  io.print red 'E'
18
+ io.puts
18
19
 
19
20
  feature = scenario.feature
20
21
 
21
- io.puts
22
22
  io.print yellow('Feature')
23
23
  io.print ': '
24
24
  io.print scenario.feature.name
@@ -67,7 +67,7 @@ module Gurke::Reporters
67
67
 
68
68
  exout = format_exception(result.exception, backtrace: true, indent: 6)
69
69
  io.puts red exout
70
- io.puts
70
+ io.puts ' '
71
71
  end
72
72
 
73
73
  def after_scenario(scenario)
@@ -78,13 +78,13 @@ module Gurke::Reporters
78
78
  elsif scenario.passed?
79
79
  io.print green '.'
80
80
  elsif scenario.aborted?
81
- io.puts
81
+ io.puts ' '
82
82
  end
83
83
  end
84
84
 
85
85
  def after_features(features)
86
- io.puts
87
- io.puts
86
+ io.puts ' '
87
+ io.puts ' '
88
88
 
89
89
  scenarios = features.map(&:scenarios).flatten
90
90
 
@@ -27,7 +27,7 @@ module Gurke::Reporters
27
27
 
28
28
  io.print light_black(feature.description.gsub(/^/, ' '))
29
29
  io.puts
30
- io.puts
30
+ io.puts ' '
31
31
  end
32
32
 
33
33
  def before_scenario(scenario)
@@ -72,18 +72,18 @@ module Gurke::Reporters
72
72
 
73
73
  def retry_scenario(scenario)
74
74
  if scenario.flaky?
75
- io.print "\n Retry flaky scenario due to previous failure:\n\n"
75
+ io.print " \n Retry flaky scenario due to previous failure:\n \n"
76
76
  else
77
- io.print "\n Retry scenario due to previous failure:\n\n"
77
+ io.print " \n Retry scenario due to previous failure:\n \n"
78
78
  end
79
79
  end
80
80
 
81
81
  def after_scenario(*)
82
- io.puts
82
+ io.puts ' '
83
83
  end
84
84
 
85
85
  def after_feature(*)
86
- io.puts
86
+ io.puts ' '
87
87
  end
88
88
 
89
89
  def after_features(features)
@@ -108,7 +108,7 @@ module Gurke::Reporters
108
108
  io.puts green message
109
109
  end
110
110
 
111
- io.puts
111
+ io.puts ' '
112
112
  end
113
113
 
114
114
  protected
@@ -140,6 +140,7 @@ module Gurke::Reporters
140
140
 
141
141
  def print_exception(exception)
142
142
  io.puts red format_exception(exception).gsub(/^/, ' ')
143
+ io.print ' '
143
144
  end
144
145
 
145
146
  def format_location(obj)
data/lib/gurke/version.rb CHANGED
@@ -4,7 +4,7 @@ module Gurke
4
4
  module VERSION
5
5
  MAJOR = 3
6
6
  MINOR = 5
7
- PATCH = 0
7
+ PATCH = 1
8
8
  STAGE = nil
9
9
  STRING = [MAJOR, MINOR, PATCH, STAGE].compact.join('.').freeze
10
10
 
@@ -127,20 +127,20 @@ RSpec.describe Gurke::Reporters::CompactReporter do
127
127
  end
128
128
 
129
129
  it do
130
- expect(out).to eq unindent <<~TEXT
131
- .E
132
- .Feature: Demo feature # features/file.feature:1
133
- . Scenario: Running the scenario # features/file.feature:5
134
- . Given the scenario is passing
135
- . RuntimeError: An error occurred
136
- . /path/to/file.rb:5:in `block (4 levels) in <top (required)>'
137
- . /path/to/file.rb:24:in in `fail_with'
138
- . caused by: IOError: Socket closed
139
- . script.rb:5:in `a'
140
- . script.rb:10:in `b'
141
- .
142
- .
143
- TEXT
130
+ expect(out).to eq text(
131
+ 'E',
132
+ 'Feature: Demo feature # features/file.feature:1',
133
+ ' Scenario: Running the scenario # features/file.feature:5',
134
+ ' Given the scenario is passing',
135
+ ' RuntimeError: An error occurred',
136
+ " /path/to/file.rb:5:in `block (4 levels) in <top (required)>'",
137
+ " /path/to/file.rb:24:in in `fail_with'",
138
+ ' caused by: IOError: Socket closed',
139
+ " script.rb:5:in `a'",
140
+ " script.rb:10:in `b'",
141
+ ' ',
142
+ '',
143
+ )
144
144
  end
145
145
  end
146
146
  end
@@ -187,12 +187,12 @@ RSpec.describe Gurke::Reporters::CompactReporter do
187
187
  let(:action) { [:after_features, []] }
188
188
 
189
189
  it do
190
- expect(out).to eq unindent <<~TEXT
191
- .
192
- .
193
- .0 scenarios: 0 passed, 0 failing, 0 pending
194
- .
195
- TEXT
190
+ expect(out).to eq text(
191
+ ' ',
192
+ ' ',
193
+ '0 scenarios: 0 passed, 0 failing, 0 pending',
194
+ '',
195
+ )
196
196
  end
197
197
  end
198
198
  end
@@ -30,28 +30,28 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
30
30
  end
31
31
 
32
32
  it do
33
- expect(out).to eq unindent <<~TEXT
34
- Feature: Demo feature # features/file.feature:1
35
- As a developer
36
- I would like have this spec passed
37
- In order to work on
38
- .
39
- .
40
- TEXT
33
+ expect(out).to eq text(
34
+ 'Feature: Demo feature # features/file.feature:1',
35
+ ' As a developer',
36
+ ' I would like have this spec passed',
37
+ ' In order to work on',
38
+ ' ',
39
+ '',
40
+ )
41
41
  end
42
42
 
43
43
  context 'with colors' do
44
44
  let(:color) { true }
45
45
 
46
46
  it 'outputs ASCII color codes' do
47
- expect(out).to eq unindent <<~TEXT
48
- \e[0;33;49mFeature\e[0m: Demo feature \e[0;90;49m# features/file.feature:1\e[0m
49
- \e[0;90;49m As a developer
50
- I would like have this spec passed
51
- In order to work on\e[0m
52
- .
53
- .
54
- TEXT
47
+ expect(out).to eq text(
48
+ "\e[0;33;49mFeature\e[0m: Demo feature \e[0;90;49m# features/file.feature:1\e[0m",
49
+ "\e[0;90;49m As a developer",
50
+ ' I would like have this spec passed',
51
+ " In order to work on\e[0m",
52
+ ' ',
53
+ '',
54
+ )
55
55
  end
56
56
  end
57
57
  end
@@ -60,10 +60,10 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
60
60
  let(:action) { [:start_background, feature] }
61
61
 
62
62
  it do
63
- expect(out).to eq unindent <<~TEXT
64
- . Background:
65
- .
66
- TEXT
63
+ expect(out).to eq text(
64
+ ' Background:',
65
+ '',
66
+ )
67
67
  end
68
68
  end
69
69
 
@@ -76,10 +76,10 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
76
76
  end
77
77
 
78
78
  it do
79
- expect(out).to eq unindent <<~TEXT
80
- . Scenario: Running the scenario # features/file.feature:5
81
- .
82
- TEXT
79
+ expect(out).to eq text(
80
+ ' Scenario: Running the scenario # features/file.feature:5',
81
+ '',
82
+ )
83
83
  end
84
84
  end
85
85
 
@@ -91,9 +91,9 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
91
91
  end
92
92
 
93
93
  it do
94
- expect(out).to eq unindent <<~TEXT
95
- . Given the scenario is passing
96
- TEXT
94
+ expect(out).to eq text(
95
+ ' Given the scenario is passing',
96
+ )
97
97
  end
98
98
  end
99
99
 
@@ -109,10 +109,10 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
109
109
  let(:state) { :passed }
110
110
 
111
111
  it do
112
- expect(out).to eq unindent <<~TEXT
113
- . (passed)
114
- .
115
- TEXT
112
+ expect(out).to eq text(
113
+ ' (passed)',
114
+ '',
115
+ )
116
116
  end
117
117
  end
118
118
 
@@ -120,10 +120,10 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
120
120
  let(:state) { :pending }
121
121
 
122
122
  it do
123
- expect(out).to eq unindent <<~TEXT
124
- . (pending)
125
- .
126
- TEXT
123
+ expect(out).to eq text(
124
+ ' (pending)',
125
+ '',
126
+ )
127
127
  end
128
128
  end
129
129
 
@@ -131,10 +131,10 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
131
131
  let(:state) { nil }
132
132
 
133
133
  it do
134
- expect(out).to eq unindent <<~TEXT
135
- . (skipped)
136
- .
137
- TEXT
134
+ expect(out).to eq text(
135
+ ' (skipped)',
136
+ '',
137
+ )
138
138
  end
139
139
  end
140
140
 
@@ -159,17 +159,17 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
159
159
  end
160
160
 
161
161
  it do
162
- expect(out).to eq unindent <<~TEXT
163
- . (failure)
164
- . RuntimeError: An error occurred
165
- . /path/to/file.rb:5:in `block (4 levels) in <top (required)>'
166
- . /path/to/file.rb:24:in in `fail_with'
167
- . caused by: IOError: Socket closed
168
- . script.rb:5:in `a'
169
- . script.rb:10:in `b'
170
- .
171
- .
172
- TEXT
162
+ expect(out).to eq text(
163
+ ' (failure)',
164
+ ' RuntimeError: An error occurred',
165
+ " /path/to/file.rb:5:in `block (4 levels) in <top (required)>'",
166
+ " /path/to/file.rb:24:in in `fail_with'",
167
+ ' caused by: IOError: Socket closed',
168
+ " script.rb:5:in `a'",
169
+ " script.rb:10:in `b'",
170
+ ' ',
171
+ '',
172
+ )
173
173
  end
174
174
  end
175
175
  end
@@ -183,12 +183,12 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
183
183
  end
184
184
 
185
185
  it do
186
- expect(out).to eq unindent <<~TEXT
187
- .
188
- . Retry scenario due to previous failure:
189
- .
190
- .
191
- TEXT
186
+ expect(out).to eq text(
187
+ ' ',
188
+ ' Retry scenario due to previous failure:',
189
+ ' ',
190
+ '',
191
+ )
192
192
  end
193
193
  end
194
194
 
@@ -198,12 +198,12 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
198
198
  end
199
199
 
200
200
  it do
201
- expect(out).to eq unindent <<~TEXT
202
- .
203
- . Retry flaky scenario due to previous failure:
204
- .
205
- .
206
- TEXT
201
+ expect(out).to eq text(
202
+ ' ',
203
+ ' Retry flaky scenario due to previous failure:',
204
+ ' ',
205
+ '',
206
+ )
207
207
  end
208
208
  end
209
209
  end
@@ -212,10 +212,10 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
212
212
  let(:action) { [:after_scenario, scenario] }
213
213
 
214
214
  it do
215
- expect(out).to eq unindent <<~TEXT
216
- .
217
- .
218
- TEXT
215
+ expect(out).to eq text(
216
+ ' ',
217
+ '',
218
+ )
219
219
  end
220
220
  end
221
221
 
@@ -223,10 +223,10 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
223
223
  let(:action) { [:after_feature, feature] }
224
224
 
225
225
  it do
226
- expect(out).to eq unindent <<~TEXT
227
- .
228
- .
229
- TEXT
226
+ expect(out).to eq text(
227
+ ' ',
228
+ '',
229
+ )
230
230
  end
231
231
  end
232
232
 
@@ -234,11 +234,11 @@ RSpec.describe Gurke::Reporters::DefaultReporter do
234
234
  let(:action) { [:after_features, []] }
235
235
 
236
236
  it do
237
- expect(out).to eq unindent <<~TEXT
238
- .0 scenarios: 0 failing, 0 pending
239
- .
240
- .
241
- TEXT
237
+ expect(out).to eq text(
238
+ '0 scenarios: 0 failing, 0 pending',
239
+ ' ',
240
+ '',
241
+ )
242
242
  end
243
243
  end
244
244
  end
data/spec/spec_helper.rb CHANGED
@@ -18,6 +18,10 @@ module Helper
18
18
  def unindent(str)
19
19
  str.rstrip.gsub(/^\./, '')
20
20
  end
21
+
22
+ def text(*args)
23
+ args.join("\n")
24
+ end
21
25
  end
22
26
 
23
27
  RSpec.configure do |config|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gurke
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen