stoplight-sentry 0.2.0 → 1.0.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: 216e5cf5caa64afb6275b71f9c1bbd6d234c253eddaba28e9e67ec463ce4cc2f
4
- data.tar.gz: 4c7202447924df8602462398c0b9819ea28487e0717055d3d7019097a92a1b2b
3
+ metadata.gz: e87b4206c4ce27888e5a3cdd74d93bf69fef50ecc1d5ddac52c517e46afe3324
4
+ data.tar.gz: d139bcb9189c6f4283586f2e4f9d0a1505f193d2c39f755027c18950ad917dc4
5
5
  SHA512:
6
- metadata.gz: 398519fb1a514c7cdfc2d4ef05265e9b562ac4337de0148ea3a10b1661dfa5b3160153e8951655be05ca0883f1ee41a234c032d754f41d96c039896fbda7aab2
7
- data.tar.gz: 1472510779c70c53ea762e07ddee41e1c854593931b61f90aa1f837b34612eb944b503b522e4a46eed4a9bb2d3e0940eb4e9419af8de67123725734bd6298906
6
+ metadata.gz: 2b07f61e009db1a58ec8b436d907128cf5bc3672376a54cf28d9db00be3dcc06a7210069dcded65b5ac213be58e2bece90ca6c1c6a96b925bba1059b0e1ca8a8
7
+ data.tar.gz: 67072c6221ddb5c4fdff6d5e40e7025fa1d57150991d8a57e229614e81481d7df54cee5ac76c741f205874b46310ccaa35ff35b76b0f541a2470068d3b34d255
@@ -20,12 +20,19 @@ module Stoplight
20
20
  # @return [Hash]
21
21
  attr_reader :options
22
22
 
23
+ DEFAULT_FORMATTER = lambda do |light, from_color, to_color, error|
24
+ words = ["Switching", light.name, "from", from_color, "to", to_color]
25
+ words += ["because", error.class, error.message] if error
26
+ words.join(" ")
27
+ end
28
+ private_constant :DEFAULT_FORMATTER
29
+
23
30
  # @param sentry [::Sentry]
24
- # @param formatter [Proc, nil] (Stoplight::Default::FORMATTER)
31
+ # @param formatter [Proc, nil]
25
32
  # @param options [Hash] custom options for the +Sentry#capture_message+ method
26
33
  def initialize(sentry, formatter = nil, **options)
27
34
  @sentry = sentry
28
- @formatter = formatter || Stoplight::Default::FORMATTER
35
+ @formatter = formatter || DEFAULT_FORMATTER
29
36
  @options = options
30
37
  end
31
38
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Stoplight
4
4
  module Sentry
5
- VERSION = "0.2.0"
5
+ VERSION = "1.0.0"
6
6
  public_constant :VERSION
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stoplight-sentry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tëma Bolshakov
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '4.0'
18
+ version: '5'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '4.0'
25
+ version: '5'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: sentry-ruby
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -30,9 +30,6 @@ dependencies:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: '5'
33
- - - "<"
34
- - !ruby/object:Gem::Version
35
- version: '6.0'
36
33
  type: :runtime
37
34
  prerelease: false
38
35
  version_requirements: !ruby/object:Gem::Requirement
@@ -40,9 +37,6 @@ dependencies:
40
37
  - - ">="
41
38
  - !ruby/object:Gem::Version
42
39
  version: '5'
43
- - - "<"
44
- - !ruby/object:Gem::Version
45
- version: '6.0'
46
40
  description: Sentry notifier for Stoplight
47
41
  email:
48
42
  - either.free@gmail.com