cucumber-messages 22.0.0 → 24.0.0

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: 3bc766d1b3813a86b29e6616ac619ef081524af03bc0b0ca13ee43030a7f58b8
4
- data.tar.gz: 8c59570b04a951846405534ad80f8ff06d93db4bb00ae719d005446e13724fc2
3
+ metadata.gz: 7b085c369dea71ce0fb539c4ee81dac76b95104259f831b61488b07c3cd85f97
4
+ data.tar.gz: 4c79d872aabd5da1fb5bd32865f0f7366d63ceebcfdf050b4102a2b3095d62fd
5
5
  SHA512:
6
- metadata.gz: 6e65adff9ca721a531a29d11a82ddd7a229fb67aca4aec3defa97e08265bd8f64798b8c989c570e8bed2be8a79db51864fbc4040216681879d70b7915ce0e0b5
7
- data.tar.gz: 3a052b3971dbc65aadad22cb7d9a6a903ab9b8fbe2558722e9cbefd558ed5761d23c8859df15dac0219a13dd6ed205c5f1fdd061273c6adf8b93e0157cb55529
6
+ metadata.gz: 0777da94145cac9e323e2977f8d673e3ec96560d9c9ceb58eec4dc3b420fee1c18d534dce2b7ae66ed58201f144c00187e2e46273c1708f45c889fa166c923d7
7
+ data.tar.gz: 2c1f0e69b5a66a6ce338d301a58350d11170777e27b94fd1ee22f9c77db68300f887f65dace19e7c4b4e55010978398faea442ffa1eaaef18ea3c7659f4d3d8d
data/README.md CHANGED
@@ -1,2 +1,3 @@
1
1
  # Cucumber Messages for Ruby (JSON schema)
2
2
 
3
+ See main [README](../README.md)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 22.0.0
1
+ 24.0.0
@@ -12,7 +12,6 @@ module Cucumber
12
12
  end
13
13
 
14
14
  module ClassMethods
15
-
16
15
  ##
17
16
  # Returns a new Message - or messages into an array - deserialized from the given json document.
18
17
  # CamelCased keys are properly converted to snake_cased attributes in the process
@@ -27,8 +26,7 @@ module Cucumber
27
26
  #
28
27
  # json_string = { uri: 'file:///...', comments: [{text: 'text comment'}, {text: 'another comment'}]}.to_json
29
28
  # Cucumber::Messages::GherkinDocument.from_json(json_string) # => #<Cucumber::Messages::GherkinDocument:0x00007efda11e6a90 ... @comments=[#<Cucumber::Messages::Comment:0x00007efda11e6e50 ..., #<Cucumber::Messages::Comment:0x00007efda11e6b58 ...>]>
30
- #
31
-
29
+ ##
32
30
  def from_json(json_string)
33
31
  from_h(JSON.parse(json_string, { symbolize_names: true }))
34
32
  end
@@ -36,4 +34,4 @@ module Cucumber
36
34
  end
37
35
  end
38
36
  end
39
- end
37
+ end
@@ -7,7 +7,6 @@ module Cucumber
7
7
  include Cucumber::Messages::Message::Utils
8
8
 
9
9
  module Serialization
10
-
11
10
  ##
12
11
  # Returns a new Hash formed from the message attributes
13
12
  # If +camelize:+ keyword parameter is set to true, then keys will be camelized
@@ -21,8 +20,7 @@ module Cucumber
21
20
  #
22
21
  # location = Cucumber::Messages::Location.new(line: 2)
23
22
  # Cucumber::Messages::Comment.new(location: location, text: 'comment').to_h # => { location: { line: 2, :column: nil }, text: "comment" }
24
- #
25
-
23
+ ##
26
24
  def to_h(camelize: false, reject_nil_values: false)
27
25
  resulting_hash = self.instance_variables.map do |variable_name|
28
26
  h_key = variable_name[1..-1]
@@ -53,8 +51,7 @@ module Cucumber
53
51
  #
54
52
  # location = Cucumber::Messages::Location.new(line: 2)
55
53
  # Cucumber::Messages::Comment.new(location: location, text: 'comment').to_json # => '{"location":{"line":2,"column":null},"text":"comment"}'
56
- #
57
-
54
+ ##
58
55
  def to_json
59
56
  to_h(camelize: true, reject_nil_values: true).to_json
60
57
  end
@@ -7,7 +7,6 @@ module Cucumber
7
7
  end
8
8
 
9
9
  module ClassMethods
10
-
11
10
  ##
12
11
  # Makes an underscored, lowercase form from the expression in the string.
13
12
  #
@@ -15,7 +14,7 @@ module Cucumber
15
14
  #
16
15
  # This is a simplified version of the Ruby on Rails implementation
17
16
  # https://github.com/rails/rails/blob/v6.1.3.2/activesupport/lib/active_support/inflector/methods.rb#L92
18
-
17
+ ##
19
18
  def underscore(term)
20
19
  return term unless /[A-Z-]/.match?(term)
21
20
 
@@ -33,7 +32,7 @@ module Cucumber
33
32
  #
34
33
  # This is a simplified version of the Ruby on Rails implementation
35
34
  # https://github.com/rails/rails/blob/v6.1.3.2/activesupport/lib/active_support/inflector/methods.rb#L69
36
-
35
+ ##
37
36
  def camelize(term)
38
37
  camelized = term.to_s
39
38
  camelized.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{$1}#{$2.capitalize}" }
@@ -43,4 +42,4 @@ module Cucumber
43
42
  end
44
43
  end
45
44
  end
46
- end
45
+ end
@@ -8,4 +8,4 @@ module Cucumber
8
8
  include Cucumber::Messages::Message::Serialization
9
9
  end
10
10
  end
11
- end
11
+ end
@@ -104,6 +104,7 @@ module Cucumber
104
104
  self.new(
105
105
  type: hash[:type],
106
106
  message: hash[:message],
107
+ stack_trace: hash[:stackTrace],
107
108
  )
108
109
  end
109
110
  end