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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ruby_ci/version.rb +1 -1
  3. data/lib/ruby_ci.rb +24 -22
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2441626a4b8a03996716c6932e0914bb851eebd62a39b8ce2c8e5282f3abe906
4
- data.tar.gz: 2942c029042f0a38d533b8410e280e0fc94cf18b9a8871012f3a5d5328a0f44d
3
+ metadata.gz: a6400f3cec96d4e4cad018ad111d075613423b27f659a00c96c38b09fc16349f
4
+ data.tar.gz: 45860e320108093009e7420cbe3dea8851ef0caa859aac01c3322b4cede0c986
5
5
  SHA512:
6
- metadata.gz: b2bb8f6a266af27120f648ed3a3225d117a4abea4e0ac1ca5f9453a18389ce388f292aa71bbc2349c7252253d732a07855b37a9751fe28475913973f4a63e5ea
7
- data.tar.gz: b1a433532873916bfe8b0beef1f5e953a77bc69ed143a6bac1e5c018d1c26724f6aa5eed42b39d9334806ab9eeddcd0532210629577ed461022afa865c9d8c6e
6
+ metadata.gz: 3591fa2b255939128e10e7a100d5076f3e23b56a08774dc17d6d5f5aba3d857657bc4fb60ab5995949d19b5e2266eecb3a5aeeb87d19a9dc960c30d075eff063
7
+ data.tar.gz: 61eaf3ad2023d7b2720950a03b24dc1d050d6b3392d498800252ca5404e915c5705a52f3dab2fa7b2bcc378079aab7e3e7be7c6a0dbc9a4cf183af50ae1d54b9
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyCI
4
- VERSION = "0.2.7"
4
+ VERSION = "0.2.8"
5
5
  end
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
- while message = connection.read
125
- RubyCI.debug("ws#msg_received: #{message.inspect}")
126
-
127
- response = message.dig(:payload, :response)
128
-
129
- case response&.dig(:event) || message[:event]
130
- when "phx_error"
131
- raise("[RubyCI] Unexpected error")
132
- when "join"
133
- handle_join(response)
134
- when "deq_request"
135
- handle_deq_request(response)
136
- when "deq"
137
- if (tests = response[:tests]).any?
138
- result = @on[:deq].call(tests)
139
- task.async do
140
- send_msg("deq", result)
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
- break
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ale ∴