bolt_rb 0.3.0 → 0.3.1

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: 4e218118e1e764bfe65750f32f82c4671e3c1f777dfe50420889ba51758c179f
4
- data.tar.gz: a39610870555d4bade286a77431583c5944bfbad836854368776e6f236b9ffc7
3
+ metadata.gz: 52fe93311b8c4ca74313bcd5576954cdca034b6aa08c567e4a787a0c9811a3f8
4
+ data.tar.gz: 9baa07f42f2ff72fc7f5a876b4ec1bef04e34074defe5fcd944ca075b7d7f44d
5
5
  SHA512:
6
- metadata.gz: 4cdbcce81133b4e5fb4720ce93e82ac041f1ae84db8b2e17f3bf4bab3a98dafad0a00e26c6def32f51d1709b0641c46de9acc51982acd77a0f6ddd21f123fcb8
7
- data.tar.gz: 35b7cc610cd8ade5ce7900f6ad2d55d548a68c318487388e24f65245619e1f1dc4340b87405de6f2576bd8a9b3b51dbd3606153b873f9b8973813999566f3d1a
6
+ metadata.gz: a9157156be2d39fa0a3d98adef903c13bdb9b030fee4589f776a6b8254ca3d4fa65701edaa5f9a58bb561134148f964e39d0fa2e7fe790052f25035b6546949f
7
+ data.tar.gz: edd9ee321276795d73a96f40a86e2807bd48bb5e3fc012445b19b5c9885e836d501fc4a8969c4b68464e921cf5ac0f2236d9ad0ed6d579e98572070f4d1eb1bc
@@ -96,6 +96,16 @@ module BoltRb
96
96
  @websocket&.open?
97
97
  end
98
98
 
99
+ # Checks if the connection is healthy based on recent message activity
100
+ #
101
+ # @param threshold [Numeric] Maximum seconds since last message to be considered healthy
102
+ # @return [Boolean] True if last message was received within threshold, false otherwise
103
+ def healthy?(threshold)
104
+ return false if @last_message_at.nil?
105
+
106
+ Time.now - @last_message_at <= threshold
107
+ end
108
+
99
109
  private
100
110
 
101
111
  # Main run loop that keeps the connection alive
@@ -1,4 +1,4 @@
1
1
  # lib/bolt_rb/version.rb
2
2
  module BoltRb
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolt_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Whitcraft
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-28 00:00:00.000000000 Z
11
+ date: 2026-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slack-ruby-client