brokepoint 0.0.14 → 0.0.15

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: 6cf11d8f0f32504b01580ce69e04bebcd1af5943d9bc8dae32865165f3022044
4
- data.tar.gz: dee42b9885239ddad452fe8e4300d9763aa2d58702efff6c39c8dc4d7902beec
3
+ metadata.gz: 5958c3522308d329a94487f67f3c0d493d461d966f7de088421d094961b6c350
4
+ data.tar.gz: 86f4871cd95f7a4b754897f689e6f9733a576cd71dc55db2be3ae52418755a39
5
5
  SHA512:
6
- metadata.gz: 698e8bb9bca1c13df716939b35e89811fc6f41370eae1071346dce232fbc33dfddcb29133f6144178c37d0c4d8471337d2bf3bacc0f228404370f913fc606e27
7
- data.tar.gz: ae178ca7c924093a6f39e13ca48a57aff1e92f1c7a5a876e212afd68618bac7a95456897e32c992bd226523f0513348993ce3e5cbaba67d7a7598907afb1961e
6
+ metadata.gz: 9b39caa85f38de5ffccb03cbf858a418800fd25cb4bc20d7bbf47171bcf425bf4d69dcf60a53c4c9112dfb361a323bba0d5fdb57afbb49debf5bd4eb7e417393
7
+ data.tar.gz: 607b3270f42ce6288f9e7135b447b6c1cfb3fdf11fcac20463a16d96c912e3fd3691001284104493ccae5711a0be5b1cff3e58f88e1430a27e68af2cd5dcf5cf
@@ -5,15 +5,18 @@ module Brokepoint
5
5
  attr_reader :brokepoint_events_endpoint
6
6
 
7
7
  def initialize
8
- @brokepoint_events_endpoint = URI.parse("#{ENV['BROKEPOINT_URL']}/events")
8
+ @brokepoint_events_endpoint = URI.parse("#{brokepoint_url}/events")
9
9
  end
10
10
 
11
11
  def should_notify?
12
- ENV.key?('BROKEPOINT_URL')
12
+ brokepoint_url.present?
13
13
  end
14
14
 
15
15
  def notify(name:, raw_body:, url:, grouping_hash: nil)
16
- return unless should_notify?
16
+ unless should_notify?
17
+ Rails.logger.error('Brokepoint is installed, but not configured with a BROKEPOINT_URL, so cannot report event.')
18
+ return
19
+ end
17
20
 
18
21
  event = { name:, raw_body:, url:,
19
22
  project_id: ENV['BROKEPOINT_PROJECT_ID'],
@@ -40,5 +43,9 @@ module Brokepoint
40
43
  def default_headers
41
44
  {'Content-Type': 'application/json'}
42
45
  end
46
+
47
+ def brokepoint_url
48
+ ENV['BROKEPOINT_URL_INTERNAL'] || ENV['BROKEPOINT_URL']
49
+ end
43
50
  end
44
51
  end
@@ -1,3 +1,3 @@
1
1
  module Brokepoint
2
- VERSION = '0.0.14'
2
+ VERSION = '0.0.15'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brokepoint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane P
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-05 00:00:00.000000000 Z
11
+ date: 2026-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk