fast_ci 1.0.8 → 1.0.9
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 +27 -5
- 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: 5a53d5bd3a8c908378d45cf12c8a95e0137e8c4af2d0804797a010054053f66f
|
4
|
+
data.tar.gz: 77d83fa973502e57b4e5a1403c62d24dd5884d16aff87ce40423b099f174f2d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dc289483947b48de22dc8136aa63f8c512b8e454afc0927b9fc49ff8b82e1f02402a72cc4f6576ece038344fce710e5ed36c6c421a27d98f7fefa5f69158b36
|
7
|
+
data.tar.gz: 48515289cbbbccb6cca2635bfd42ad6bd5e7078164bc50fdb3862dbde883de3efb1c292e129dbf488d88fbc326296cf0cf1bad480dbaeb05fefd3a69ba0e6f8d
|
data/Gemfile.lock
CHANGED
data/lib/fast_ci/version.rb
CHANGED
data/lib/fast_ci.rb
CHANGED
@@ -125,11 +125,26 @@ module FastCI
|
|
125
125
|
def connect_to_ws
|
126
126
|
Async do |task|
|
127
127
|
before_start_connection
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
128
|
+
|
129
|
+
begin
|
130
|
+
Async::WebSocket::Client.connect(endpoint) do |connection|
|
131
|
+
after_start_connection
|
132
|
+
self.connection = connection
|
133
|
+
self.task = task
|
134
|
+
yield
|
135
|
+
end
|
136
|
+
rescue Async::WebSocket::ProtocolError => e
|
137
|
+
case e.message
|
138
|
+
when "Failed to negotiate connection: 401"
|
139
|
+
STDERR.puts "Failed to connect: Invalid secret key!"
|
140
|
+
exit 2
|
141
|
+
when "Failed to negotiate connection: 403"
|
142
|
+
STDERR.puts "Failed to connect: Invalid or disabled run key!"
|
143
|
+
exit 2
|
144
|
+
when "Failed to negotiate connection: 500"
|
145
|
+
STDERR.puts "Failed to connect: General connection error!"
|
146
|
+
exit 2
|
147
|
+
end
|
133
148
|
ensure
|
134
149
|
|
135
150
|
leave
|
@@ -152,6 +167,8 @@ module FastCI
|
|
152
167
|
raise("[FastCI] Unexpected error")
|
153
168
|
when "join"
|
154
169
|
handle_join(response)
|
170
|
+
when "failed_join"
|
171
|
+
handle_join_fail(response)
|
155
172
|
when "deq_request"
|
156
173
|
handle_deq_request(response)
|
157
174
|
when "deq"
|
@@ -210,6 +227,11 @@ module FastCI
|
|
210
227
|
send_msg("deq") if response[:state] == "running"
|
211
228
|
end
|
212
229
|
|
230
|
+
def handle_join_fail(response)
|
231
|
+
STDERR.puts "Can't join because of test state being: #{response[:state]}"
|
232
|
+
exit 3
|
233
|
+
end
|
234
|
+
|
213
235
|
def handle_deq_request(_response)
|
214
236
|
send_msg("deq")
|
215
237
|
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.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nesha Zoric
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: console
|