stoplight 2.2.0 → 2.2.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: b66bb764bd763618206249ec2f6942377ccdd3d9f61dd98c96ddfa27f4020c63
4
- data.tar.gz: a0b78e0231f0ae7cd15a41ac749ebb4bccec204ca25475cc780b6d45a2dc6f5b
3
+ metadata.gz: e26d25f913bb759dccd62f2b12576cbe51550753c3c6428fb16cdb6052559928
4
+ data.tar.gz: 6cbfd0ccd62da40cb335e671c8ba2d84348652e206520355fa651eb2276e16ea
5
5
  SHA512:
6
- metadata.gz: 95050e149634a50373a73a62a7de560fc2beb97e0dede532dbeb25b45e09c887655e20454604bb3b07c7b4306a13f5b819459c5f1ec03807f1a13d7ed2fc772b
7
- data.tar.gz: 98753fc93435db4bd0b8626e85e84ed37c25e8e4fef5e9cf40d608f24a3c5c4a49b3add526fa0eb918964f949f0087c78c052eec3af9a3e5e18ae93194ee4c4a
6
+ metadata.gz: a186fc199cd54411996a65c369c687dc1165ecb2115699c72e6aa005f1b3d5b0da3b5f90402d2c49b12d73ca708628b09f5b9ba02e57c127ce89a33f8dc16cd2
7
+ data.tar.gz: 7ee5b81cad78ed7aaa7200aedf74cba3af8aff5b1e95940c572ca93bbefa28676ceb507ef04ce63bef28d9b6e7dcb2590653dd06704cf14b561653662c9fa30b
@@ -52,14 +52,18 @@ module Stoplight
52
52
  time == other.time
53
53
  end
54
54
 
55
+ # @param options [Object, nil]
55
56
  # @return [String]
56
- def to_json
57
+ def to_json(options = nil)
57
58
  JSON.generate(
58
- error: {
59
- class: error_class,
60
- message: error_message
59
+ {
60
+ error: {
61
+ class: error_class,
62
+ message: error_message
63
+ },
64
+ time: time.strftime(TIME_FORMAT)
61
65
  },
62
- time: time.strftime(TIME_FORMAT)
66
+ options
63
67
  )
64
68
  end
65
69
  end
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  module Stoplight
4
- VERSION = Gem::Version.new('2.2.0')
4
+ VERSION = Gem::Version.new('2.2.1')
5
5
  end
@@ -89,6 +89,11 @@ RSpec.describe Stoplight::Failure do
89
89
  expect(described_class.new(error_class, error_message, time).to_json)
90
90
  .to eql(json)
91
91
  end
92
+
93
+ it 'generates JSON with options' do
94
+ expect(described_class.new(error_class, error_message, time).to_json({}))
95
+ .to eql(json)
96
+ end
92
97
  end
93
98
 
94
99
  describe '::TIME_FORMAT' do
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stoplight
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Desautels
8
8
  - Taylor Fausak
9
9
  - Justin Steffy
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-10-24 00:00:00.000000000 Z
13
+ date: 2020-07-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: benchmark-ips
@@ -275,7 +275,7 @@ homepage: https://github.com/orgsync/stoplight
275
275
  licenses:
276
276
  - MIT
277
277
  metadata: {}
278
- post_install_message:
278
+ post_install_message:
279
279
  rdoc_options: []
280
280
  require_paths:
281
281
  - lib
@@ -290,8 +290,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  - !ruby/object:Gem::Version
291
291
  version: '0'
292
292
  requirements: []
293
- rubygems_version: 3.0.3
294
- signing_key:
293
+ rubygems_version: 3.1.2
294
+ signing_key:
295
295
  specification_version: 4
296
296
  summary: Traffic control for code.
297
297
  test_files: