fast_ci 1.1.1 → 1.2.0
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/Gemfile.lock +1 -1
- data/lib/fast_ci/version.rb +1 -1
- data/lib/fast_ci.rb +17 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76c1186cf1228f3465acc2228203c51070ac0c80c18f567dec89d7bdcacca0c2
|
4
|
+
data.tar.gz: 15ab92271b656e5020a52f8b98fb1d53f587d7626f3c6035aa426b0cf57707f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bab65efe177bb36d558cd3d50977b11cf2422aed04c70791bac94b1f62d5e533099e7cdf0d3123363da31cbed50c57b472b23e00d67a6b3c474b03999d2fc4b3
|
7
|
+
data.tar.gz: db5e94d7764901155fe12199da461dfd7da3a72155de0a1f918f07fe8897202b6c55e3a92b62e08560e1b462979fc8b4c7842bd3f539f7cf012134506ce9a50e
|
data/Gemfile.lock
CHANGED
data/lib/fast_ci/version.rb
CHANGED
data/lib/fast_ci.rb
CHANGED
@@ -124,9 +124,9 @@ module FastCI
|
|
124
124
|
@on[event] = block
|
125
125
|
end
|
126
126
|
|
127
|
-
def send_msg(event, payload = {})
|
127
|
+
def send_msg(event, payload = {}, custom_topic = nil)
|
128
128
|
FastCI.debug("ws#send_msg: #{event} -> #{payload.inspect}")
|
129
|
-
connection.write({ "topic": topic, "event": event, "payload": payload, "ref": ref })
|
129
|
+
connection.write({ "topic": custom_topic || topic, "event": event, "payload": payload, "ref": ref })
|
130
130
|
connection.flush
|
131
131
|
end
|
132
132
|
|
@@ -159,6 +159,20 @@ module FastCI
|
|
159
159
|
end
|
160
160
|
end
|
161
161
|
|
162
|
+
def start_heartbeat
|
163
|
+
Async do
|
164
|
+
loop do
|
165
|
+
sleep 30
|
166
|
+
send_heartbeat
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
def send_heartbeat
|
172
|
+
FastCI.debug("Sending heartbeat")
|
173
|
+
send_msg("heartbeat", {}, "phoenix")
|
174
|
+
end
|
175
|
+
|
162
176
|
def await(retry_count = 0)
|
163
177
|
connect_to_ws do
|
164
178
|
send_msg("phx_join")
|
@@ -216,6 +230,7 @@ module FastCI
|
|
216
230
|
|
217
231
|
# https://github.com/bblimke/webmock/blob/b709ba22a2949dc3bfac662f3f4da88a21679c2e/lib/webmock/http_lib_adapters/async_http_client_adapter.rb#L8
|
218
232
|
def after_start_connection
|
233
|
+
start_heartbeat
|
219
234
|
if defined?(WebMock::HttpLibAdapters::AsyncHttpClientAdapter)
|
220
235
|
WebMock::HttpLibAdapters::AsyncHttpClientAdapter.enable!
|
221
236
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_ci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nesha Zoric
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: console
|
@@ -174,7 +174,7 @@ metadata:
|
|
174
174
|
homepage_uri: https://github.com/RubyCI/fast_ci_gem
|
175
175
|
source_code_uri: https://github.com/RubyCI/fast_ci_gem
|
176
176
|
changelog_uri: https://github.com/RubyCI/fast_ci_gem
|
177
|
-
post_install_message:
|
177
|
+
post_install_message:
|
178
178
|
rdoc_options: []
|
179
179
|
require_paths:
|
180
180
|
- lib
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '0'
|
191
191
|
requirements: []
|
192
192
|
rubygems_version: 3.2.3
|
193
|
-
signing_key:
|
193
|
+
signing_key:
|
194
194
|
specification_version: 4
|
195
195
|
summary: Ruby wrapper for creating FastCI integrations
|
196
196
|
test_files: []
|