cucumber-messages 12.2.0 → 12.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48ae3eaed81568c35701189b15127d21934580552d5063e7cbcc32f059962fa5
4
- data.tar.gz: e6699bb96d22151781ea71fc4baa8adffc1cb04ead92bfe0a6083a008bc8f8b2
3
+ metadata.gz: c0623b4c0c46da74d9b911553ce4e08a91b41c03f8bc9f0823764560a0b05e99
4
+ data.tar.gz: 3806727003b7cdae1541b32595538e0b879dfde710688f1c9257a7bbce0c3c37
5
5
  SHA512:
6
- metadata.gz: 1b1457c65185ce70a5b3024406dd5361060fddbe2dcbf9990a2560d6b81b760145f352a6d4592dee40dcb27f000a0afcd287f5130cf965182fa54c7a1a0284c6
7
- data.tar.gz: 667075542e0c6096bf5abf1c9cb73fd1aee5bd362affe4dda873b6db5aa9e01eb3247f18de3eb4b630521ae5b502c83871893e01f66ec19f440cabf68839b70c
6
+ metadata.gz: 938017bb1cbda743694b812cf62e967076a8aecaa05f503866f94a3cb61c41a5321c539fa82f3518720b615d91a8b79d1d1e8a58f4921b9d239dca94b2fbe9f0
7
+ data.tar.gz: a5bab767ebb3a89d9cadd2e81edaf4c7fd9641d9a56794aef980627850dd76084b6c77f6adcc2ed6f36d80693134a2816aa947d2331580c54a19c6bdd34f59a9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 12.2.0
1
+ 12.3.1
@@ -27,6 +27,8 @@ module Cucumber
27
27
  class Duration < ::Protobuf::Message; end
28
28
  class Location < ::Protobuf::Message; end
29
29
  class SourceReference < ::Protobuf::Message; end
30
+ class JavaMethod < ::Protobuf::Message; end
31
+ class JavaStackTraceElement < ::Protobuf::Message; end
30
32
  class Source < ::Protobuf::Message; end
31
33
  class GherkinDocument < ::Protobuf::Message
32
34
  class Comment < ::Protobuf::Message; end
@@ -219,9 +221,23 @@ module Cucumber
219
221
 
220
222
  class SourceReference
221
223
  optional :string, :uri, 1
224
+ optional ::Cucumber::Messages::JavaMethod, :java_method, 3
225
+ optional ::Cucumber::Messages::JavaStackTraceElement, :java_stack_trace_element, 4
222
226
  optional ::Cucumber::Messages::Location, :location, 2
223
227
  end
224
228
 
229
+ class JavaMethod
230
+ optional :string, :class_name, 1
231
+ optional :string, :method_name, 2
232
+ repeated :string, :method_parameter_types, 3
233
+ end
234
+
235
+ class JavaStackTraceElement
236
+ optional :string, :class_name, 1
237
+ optional :string, :method_name, 2
238
+ optional :string, :file_name, 3
239
+ end
240
+
225
241
  class Source
226
242
  optional :string, :uri, 1
227
243
  optional :string, :data, 2
@@ -4,12 +4,14 @@ module Cucumber
4
4
  NANOSECONDS_PER_SECOND = 1000000000
5
5
 
6
6
  def time_to_timestamp(time)
7
- rational = time.to_r
8
- Timestamp.new(seconds: rational.numerator, nanos: rational.denominator)
7
+ Timestamp.new(
8
+ seconds: time.to_i,
9
+ nanos: time.nsec
10
+ )
9
11
  end
10
12
 
11
13
  def timestamp_to_time(timestamp)
12
- Time.at(Rational(timestamp.seconds, timestamp.nanos))
14
+ Time.at(timestamp.seconds + timestamp.nanos.to_f / NANOSECONDS_PER_SECOND)
13
15
  end
14
16
 
15
17
  def seconds_to_duration(seconds_float)
@@ -10,7 +10,7 @@ module Cucumber
10
10
  timestamp = time_to_timestamp(time)
11
11
  time_again = timestamp_to_time(timestamp)
12
12
 
13
- expect(time_again).to eq(time)
13
+ expect(time).to be_within(0.000001).of(time_again)
14
14
  end
15
15
 
16
16
  it 'converts to and from seconds duration' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-messages
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.2.0
4
+ version: 12.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aslak Hellesøy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-26 00:00:00.000000000 Z
11
+ date: 2020-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: protobuf-cucumber
@@ -122,7 +122,7 @@ requirements: []
122
122
  rubygems_version: 3.1.2
123
123
  signing_key:
124
124
  specification_version: 4
125
- summary: cucumber-messages-12.2.0
125
+ summary: cucumber-messages-12.3.1
126
126
  test_files:
127
127
  - spec/cucumber/messages/time_conversion_spec.rb
128
128
  - spec/cucumber/messages/ndjson_serialization_spec.rb