leopard 0.2.1 → 0.2.3

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: 65ca3cd49f50ce6ae1705a531c234731593f7f86bbf4b74e18edddf1dbe4a058
4
- data.tar.gz: 9a3894b0170021820023c12c1e5124610ee7ec4b8b334591b2cb7c8d5a994986
3
+ metadata.gz: b11c29c5faebe2abbe4a266477d181a87e8d357d558766be381d64505727465a
4
+ data.tar.gz: 151af09da3ca8570f5e7f40c522548b244c563ff4b6120eecd99e2ca992a91d5
5
5
  SHA512:
6
- metadata.gz: 35d2bc6ef2ea2f8d19aeae0382a5cf8e47b1a36e3085fd39e63b892831fc142d68d38cc389918f779afd3f93b3a287a5a6c8debb96fe9043aad87a0f3361cdde
7
- data.tar.gz: 782011f1179ffcf345df77516e566c82ed3cbfbb4864b354902093a2db16d5adec2c2da47f516e9d26db1ada3a7c9d04fc23790ec014a01d26160b10b0dbac67
6
+ metadata.gz: 9b4a5ac5c82e1db6b45f5a41045dbb529ffd32bb718a7f8c55c52fc0f6219c079dbf811576aa8ed8ef61919f30de72be25a5cd1fc61607173e2ebe7ce590910b
7
+ data.tar.gz: 87365e6f0865c71d581a4756ffae5cae1d3dda78038287699ca31de201663c7b4b2e0b0c85e0fc1537e6f1c2833a1e69dfdb05959f28811cb5a45414dfdb729a
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.2.1"
2
+ ".": "0.2.3"
3
3
  }
data/.version.txt CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.3](https://github.com/rubyists/leopard/compare/v0.2.2...v0.2.3) (2025-08-16)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * [#35](https://github.com/rubyists/leopard/issues/35) - Limits the backtrace to 4 lines in our exceptions ([#36](https://github.com/rubyists/leopard/issues/36)) ([df0fee8](https://github.com/rubyists/leopard/commit/df0fee8373fc0088cd61abcc3e6d963e957730b6))
9
+
10
+ ## [0.2.2](https://github.com/rubyists/leopard/compare/v0.2.1...v0.2.2) (2025-08-15)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * Ensure we exit after saying Bye Bye ([#33](https://github.com/rubyists/leopard/issues/33)) ([11a7584](https://github.com/rubyists/leopard/commit/11a7584dd88e7c7fb4dbfde613b8186dc4253892))
16
+
3
17
  ## [0.2.1](https://github.com/rubyists/leopard/compare/v0.2.0...v0.2.1) (2025-08-08)
4
18
 
5
19
 
@@ -2,7 +2,24 @@
2
2
 
3
3
  module Rubyists
4
4
  module Leopard
5
- class Error < StandardError; end
5
+ class LeopardError < StandardError
6
+ def initialize(...)
7
+ super
8
+ set_backtrace(caller)
9
+ end
10
+
11
+ def backtrace
12
+ # If the backtrace is nil, return an empty array
13
+ orig = (super || [])[0..3]
14
+ # If the backtrace is less than 4 lines, return it as is
15
+ return orig if orig.size < 4
16
+
17
+ # Otherwise, add a note indicating truncation
18
+ orig + ['... (truncated by Leopard)']
19
+ end
20
+ end
21
+
22
+ class Error < LeopardError; end
6
23
  class ConfigurationError < Error; end
7
24
  class ResultError < Error; end
8
25
  end
@@ -138,7 +138,7 @@ module Rubyists
138
138
  logger.warn 'Pool is shut down, waiting for termination!'
139
139
  pool.wait_for_termination
140
140
  logger.warn 'Bye bye!'
141
- wake_main_thread
141
+ wake_main_thread_and_exit!
142
142
  end
143
143
  end
144
144
 
@@ -162,13 +162,16 @@ module Rubyists
162
162
 
163
163
  # Wakes up the main thread to allow it to continue execution after the server is stopped.
164
164
  # This is useful when the server is running in a blocking mode.
165
- # If the main thread is not blocked, this method does nothing.
165
+ # If the main thread is not blocked, this method does just exits.
166
166
  #
167
167
  # @return [void]
168
- def wake_main_thread
168
+ def wake_main_thread_and_exit!
169
169
  Thread.main.wakeup
170
+ exit 0
170
171
  rescue ThreadError
171
- nil
172
+ exit 0
173
+ rescue StandardError
174
+ exit 1
172
175
  end
173
176
  end
174
177
 
@@ -3,7 +3,7 @@
3
3
  module Rubyists
4
4
  module Leopard
5
5
  # x-release-please-start-version
6
- VERSION = '0.2.1'
6
+ VERSION = '0.2.3'
7
7
  # x-release-please-end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leopard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - bougyman
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-08-08 00:00:00.000000000 Z
10
+ date: 2025-08-16 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: concurrent-ruby