cucumber-messages 31.0.1 → 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c823c6a44a707a4f904397895606f4a62b511fe5ea4580a1d71f8960e9f99911
|
|
4
|
+
data.tar.gz: 9db59188fb60f2a4a4599e8f130190e917f223d8d66e88617ef7ed3dfad794e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 62f152ab3b73cc83acdae8552b91dc0035002bd02359d9271fcb56edbeabf18233d1a12d33f97103bb8d5b39afce9bb3d7ef835007cab96848f30c9e749e286c
|
|
7
|
+
data.tar.gz: 138a0f93f315fc45c7c6460d0317526f99416f0f44eee01365ef119e772bdff84329a43f020f28eadc312f58b2dc18a0e15fc5e61863618ad1aba598de52e8c6
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
31.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
|
-
|
|
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
|
|
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
|
data/lib/cucumber/messages.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
|
4
|
+
version: 31.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aslak Hellesøy
|
|
@@ -123,6 +123,7 @@ files:
|
|
|
123
123
|
- lib/cucumber/messages/helpers/id_generator/incrementing.rb
|
|
124
124
|
- lib/cucumber/messages/helpers/id_generator/uuid.rb
|
|
125
125
|
- lib/cucumber/messages/helpers/ndjson_to_message_enumerator.rb
|
|
126
|
+
- lib/cucumber/messages/helpers/test_step_result_comparator.rb
|
|
126
127
|
- lib/cucumber/messages/helpers/time_conversion.rb
|
|
127
128
|
- lib/cucumber/messages/hook.rb
|
|
128
129
|
- lib/cucumber/messages/hook_type.rb
|
|
@@ -201,5 +202,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
201
202
|
requirements: []
|
|
202
203
|
rubygems_version: 3.6.9
|
|
203
204
|
specification_version: 4
|
|
204
|
-
summary: cucumber-messages-31.0
|
|
205
|
+
summary: cucumber-messages-31.1.0
|
|
205
206
|
test_files: []
|