bugwatch-ruby 0.8.1 → 0.8.2

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: f7845d9912f5a403dec979a3457ab7e121a12fb3de870b978d864d8eafb71755
4
- data.tar.gz: cc43de7851a77523328ca61f5e8b0cd0d4aaa0f9867b3229aa9e34fb04e45a1a
3
+ metadata.gz: 4359915525161c69c489758beceaae532ccf3cb0b5169d9839a5773b45e570a6
4
+ data.tar.gz: 6d0383a28fd577cebdbc9c9330935a9e454e5605c721df63010a2259d147f278
5
5
  SHA512:
6
- metadata.gz: 1d5479d1aa4ea0b1060c06328835f8c11b808389d83656a70121ab78e8ff30887caf828433edc27541d39e91ae76e43a568fa08bbf30e014a9c12246d5b88fb3
7
- data.tar.gz: 3eb19a7f384614714730f68b07243d98064c4b90cca61b90a92b84a10a817cceabc1a520cf61ffdfcdc806a7deb64f0d7dc6157a7f9e0a9b0724ac809f243afb
6
+ metadata.gz: 619c58df59ff62528a16fd3543e3a630f784af39ad64d824736de56b0e6632fcf3cb577935fe995d6a78f254d727380b0d8b2795ed98a9bcd5c543a9fe0bdec1
7
+ data.tar.gz: 26f434d1ab6ae0e87288e8282f50cce74d7d83e91b10bcbc6e63b0904dabc4384083c15f2c5f754953ca64260cb66010de333fd1a9aa26b27a2bed5cb6d6a7fd
data/README.md CHANGED
@@ -260,5 +260,5 @@ Sensitive params (`password`, `token`, `secret`, `key`, `auth`, `credit`, `card`
260
260
  cd gems/bugwatch-ruby
261
261
  gem build bugwatch-ruby.gemspec
262
262
  gem signin
263
- gem push bugwatch-ruby-0.8.0.gem
263
+ gem push bugwatch-ruby-0.8.2.gem
264
264
  ```
@@ -96,6 +96,6 @@ module Bugwatch
96
96
  nil
97
97
  end
98
98
 
99
- private_class_method :handle_call, :extract_path, :detect_library, :extract_caller
99
+ private_class_method :extract_path, :detect_library, :extract_caller
100
100
  end
101
101
  end
@@ -1,3 +1,3 @@
1
1
  module Bugwatch
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
data/lib/bugwatch.rb CHANGED
@@ -96,10 +96,19 @@ module Bugwatch
96
96
  end
97
97
 
98
98
  def track_deploy(version:, environment: nil, description: nil, deployed_by: nil)
99
- return unless configuration.api_key
100
- return unless configuration.endpoint
99
+ logger = configuration.logger
100
+
101
+ unless configuration.api_key
102
+ logger&.warn("[bugwatch] track_deploy skipped: configuration.api_key is not set")
103
+ return
104
+ end
105
+ unless configuration.endpoint
106
+ logger&.warn("[bugwatch] track_deploy skipped: configuration.endpoint is not set")
107
+ return
108
+ end
101
109
 
102
110
  env = environment || configuration.release_stage
111
+ logger&.info("[bugwatch] track_deploy posting version=#{version} environment=#{env} endpoint=#{configuration.endpoint}")
103
112
 
104
113
  Thread.new do
105
114
  uri = URI.parse("#{configuration.endpoint.chomp("/")}/api/v1/deploys")
@@ -121,9 +130,17 @@ module Bugwatch
121
130
 
122
131
  request.body = JSON.generate(payload)
123
132
 
124
- http.request(request)
125
- rescue StandardError
126
- # Fire-and-forget: never affect the host app
133
+ response = http.request(request)
134
+ status = response.code.to_i
135
+ if status.between?(200, 299)
136
+ logger&.info("[bugwatch] track_deploy succeeded status=#{status}")
137
+ else
138
+ logger&.warn("[bugwatch] track_deploy rejected status=#{status} body=#{response.body.to_s[0, 500]}")
139
+ end
140
+ response
141
+ rescue StandardError => e
142
+ logger&.error("[bugwatch] track_deploy error: #{e.class}: #{e.message}")
143
+ e
127
144
  end
128
145
  end
129
146
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugwatch-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - BugWatch
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-04-22 00:00:00.000000000 Z
10
+ date: 2026-05-06 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: railties