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 +4 -4
- data/lib/bolt_rb/socket_mode/client.rb +10 -0
- data/lib/bolt_rb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52fe93311b8c4ca74313bcd5576954cdca034b6aa08c567e4a787a0c9811a3f8
|
|
4
|
+
data.tar.gz: 9baa07f42f2ff72fc7f5a876b4ec1bef04e34074defe5fcd944ca075b7d7f44d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/bolt_rb/version.rb
CHANGED
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.
|
|
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-
|
|
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
|