ruby_ci 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby_ci/version.rb +1 -1
- data/lib/ruby_ci.rb +24 -22
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6400f3cec96d4e4cad018ad111d075613423b27f659a00c96c38b09fc16349f
|
4
|
+
data.tar.gz: 45860e320108093009e7420cbe3dea8851ef0caa859aac01c3322b4cede0c986
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3591fa2b255939128e10e7a100d5076f3e23b56a08774dc17d6d5f5aba3d857657bc4fb60ab5995949d19b5e2266eecb3a5aeeb87d19a9dc960c30d075eff063
|
7
|
+
data.tar.gz: 61eaf3ad2023d7b2720950a03b24dc1d050d6b3392d498800252ca5404e915c5705a52f3dab2fa7b2bcc378079aab7e3e7be7c6a0dbc9a4cf183af50ae1d54b9
|
data/lib/ruby_ci/version.rb
CHANGED
data/lib/ruby_ci.rb
CHANGED
@@ -121,31 +121,33 @@ module RubyCI
|
|
121
121
|
connect_to_ws do
|
122
122
|
send_msg("phx_join")
|
123
123
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
124
|
+
begin
|
125
|
+
while message = connection.read
|
126
|
+
RubyCI.debug("ws#msg_received: #{message.inspect}")
|
127
|
+
|
128
|
+
response = message.dig(:payload, :response)
|
129
|
+
|
130
|
+
case response&.dig(:event) || message[:event]
|
131
|
+
when "phx_error"
|
132
|
+
raise("[RubyCI] Unexpected error")
|
133
|
+
when "join"
|
134
|
+
handle_join(response)
|
135
|
+
when "deq_request"
|
136
|
+
handle_deq_request(response)
|
137
|
+
when "deq"
|
138
|
+
if (tests = response[:tests]).any?
|
139
|
+
result = @on[:deq].call(tests)
|
140
|
+
task.async do
|
141
|
+
send_msg("deq", result)
|
142
|
+
end
|
143
|
+
else
|
144
|
+
break
|
141
145
|
end
|
146
|
+
when "error"
|
147
|
+
raise(response.inspect)
|
142
148
|
else
|
143
|
-
|
149
|
+
puts response
|
144
150
|
end
|
145
|
-
when "error"
|
146
|
-
raise(response.inspect)
|
147
|
-
else
|
148
|
-
puts response
|
149
151
|
end
|
150
152
|
rescue => e
|
151
153
|
puts e.message
|