cucumber-messages 31.0.0 → 31.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: fd0a93c4d13523afd890d12c6be3248ced718bb6d8fcf5a02b309bbaab163c3d
4
- data.tar.gz: d0ead6390a48c2745a97f0cc07912c4bdde02c9b8d2c15ee2dfef238ac4c2d24
3
+ metadata.gz: c823c6a44a707a4f904397895606f4a62b511fe5ea4580a1d71f8960e9f99911
4
+ data.tar.gz: 9db59188fb60f2a4a4599e8f130190e917f223d8d66e88617ef7ed3dfad794e7
5
5
  SHA512:
6
- metadata.gz: e1ae8c482e8aadaa3051c9923f07502669ea5c94ca5820e7947149cd8035ba3eb715dfeda9befa56f902a6227c4f6c49bc2fd660a611e97d688f65426e8a8068
7
- data.tar.gz: 9d225ae50140877aab97453c92813c46fe880c21e77ee32282ff525c8f3fe06b2211282d56febc4dfaf2bf21f974f1d0c4ad367e11e6f52894c0f76ad524a0fc
6
+ metadata.gz: 62f152ab3b73cc83acdae8552b91dc0035002bd02359d9271fcb56edbeabf18233d1a12d33f97103bb8d5b39afce9bb3d7ef835007cab96848f30c9e749e286c
7
+ data.tar.gz: 138a0f93f315fc45c7c6460d0317526f99416f0f44eee01365ef119e772bdff84329a43f020f28eadc312f58b2dc18a0e15fc5e61863618ad1aba598de52e8c6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 31.0.0
1
+ 31.1.0
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cucumber
4
+ module Messages
5
+ module Helpers
6
+ module TestStepResultComparator
7
+ def test_step_result_rankings
8
+ {
9
+ TestStepResultStatus::UNKNOWN => 0,
10
+ TestStepResultStatus::PASSED => 1,
11
+ TestStepResultStatus::SKIPPED => 2,
12
+ TestStepResultStatus::PENDING => 3,
13
+ TestStepResultStatus::UNDEFINED => 4,
14
+ TestStepResultStatus::AMBIGUOUS => 5,
15
+ TestStepResultStatus::FAILED => 6
16
+ }
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -7,23 +7,11 @@ module Cucumber
7
7
  NANOSECONDS_PER_SECOND = 1_000_000_000
8
8
 
9
9
  def time_to_timestamp(time)
10
- { 'seconds' => time.to_i, 'nanos' => time.nsec }
10
+ Cucumber::Messages::Timestamp.new(seconds: time.to_i, nanos: time.nsec)
11
11
  end
12
12
 
13
13
  def timestamp_to_time(timestamp)
14
- Time.at(timestamp['seconds'] + (timestamp['nanos'].to_f / NANOSECONDS_PER_SECOND))
15
- end
16
-
17
- def seconds_to_duration(seconds_float)
18
- seconds, second_modulus = seconds_float.divmod(1)
19
- nanos = second_modulus * NANOSECONDS_PER_SECOND
20
- { 'seconds' => seconds, 'nanos' => nanos.to_i }
21
- end
22
-
23
- def duration_to_seconds(duration)
24
- seconds_part = duration['seconds']
25
- nanos_part = duration['nanos'].to_f / NANOSECONDS_PER_SECOND
26
- seconds_part + nanos_part
14
+ Time.at(timestamp.seconds, timestamp.nanos, :nanosecond)
27
15
  end
28
16
  end
29
17
  end
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'cucumber/messages/helpers/id_generator'
3
4
  require 'cucumber/messages/helpers/ndjson_to_message_enumerator'
5
+ require 'cucumber/messages/helpers/test_step_result_comparator'
4
6
  require 'cucumber/messages/helpers/time_conversion'
5
- require 'cucumber/messages/helpers/id_generator'
7
+
6
8
  require 'cucumber/messages/message'
7
9
 
8
10
  Dir["#{File.dirname(__FILE__)}/messages/*.rb"].each { |file| require file }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-messages
3
3
  version: !ruby/object:Gem::Version
4
- version: 31.0.0
4
+ version: 31.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aslak Hellesøy
@@ -9,20 +9,6 @@ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: cucumber-compatibility-kit
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: '15.0'
19
- type: :development
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - "~>"
24
- - !ruby/object:Gem::Version
25
- version: '15.0'
26
12
  - !ruby/object:Gem::Dependency
27
13
  name: rake
28
14
  requirement: !ruby/object:Gem::Requirement
@@ -137,6 +123,7 @@ files:
137
123
  - lib/cucumber/messages/helpers/id_generator/incrementing.rb
138
124
  - lib/cucumber/messages/helpers/id_generator/uuid.rb
139
125
  - lib/cucumber/messages/helpers/ndjson_to_message_enumerator.rb
126
+ - lib/cucumber/messages/helpers/test_step_result_comparator.rb
140
127
  - lib/cucumber/messages/helpers/time_conversion.rb
141
128
  - lib/cucumber/messages/hook.rb
142
129
  - lib/cucumber/messages/hook_type.rb
@@ -215,5 +202,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
202
  requirements: []
216
203
  rubygems_version: 3.6.9
217
204
  specification_version: 4
218
- summary: cucumber-messages-31.0.0
205
+ summary: cucumber-messages-31.1.0
219
206
  test_files: []