ruby_ci 0.2.19 → 0.2.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4808f622b194c8e3c6ed456e64c0d1e5faae0e98349b5c9bca925aeb2e9a8a8f
4
- data.tar.gz: 991c4bec198a2ff64aef1e4bcb57d3e081b67b811b314c1de55f86e96a8ec7c8
3
+ metadata.gz: ae20ec2e3fbf789900df5a4c40a3de99c19916c0e63fc16bd2f7fea39e46db79
4
+ data.tar.gz: 5ab6e34ea20ddd882665e30d685fea42334ff5f0de64a0e8929f1bd186c0965a
5
5
  SHA512:
6
- metadata.gz: 2efbad4ad63dd25d884bc75f22574e690bdd5d7e220c5d01ad8f2f2e80d1da637c906589662263f19d9aa8d3aa86593f18f31ce51c89486bc077717fac7a1056
7
- data.tar.gz: 5bab9330172e78a1d4cffed42cc44bede634d91314f997efda33b55de57f3ccc2f7b8f0f00800c433b0c5990622274a3453a3b0c7d709c328c6c439b334e3625
6
+ metadata.gz: c56a5e7347ddc0933398c651b948587745e19f091cac80d7f1e6f1569be0652893a1c85fee144d349a63f846e2e150b62087e8380852798c8a3338457cd13ec7
7
+ data.tar.gz: 077d952ead2a6f11ba32d7897778e70f01f74b7240d7bd1e2db8f99e2ebfd90778eeb9f7eb0845baeba78cd6306e9a05ef3bebe5e198c7142bb7050fefc1a3ea
@@ -48,6 +48,7 @@ module Minitest
48
48
  def start
49
49
  test_count = Runnable.runnables.sum { |s| s.runnable_methods.count }
50
50
  msg('start', { test_count: test_count })
51
+ send_events if ENV['RBCI_REMOTE_TESTS'] == 'true'
51
52
  end
52
53
 
53
54
  def get_output
@@ -109,7 +110,6 @@ module Minitest
109
110
  test_results[path][:file_status] = file_status
110
111
  end
111
112
 
112
-
113
113
  if ENV['RBCI_REMOTE_TESTS'] == 'true'
114
114
  send_events
115
115
  else
@@ -117,6 +117,31 @@ module Minitest
117
117
  end
118
118
  end
119
119
 
120
+ def passed?
121
+ results = []
122
+ test_results.map do |path, file_results|
123
+ file_results['1'].each do |id, test_result|
124
+ next if id == :description
125
+ if test_result[:status] == 'failed'
126
+ results << false
127
+ else
128
+ results << true
129
+ end
130
+ end
131
+ end
132
+
133
+ pass = results.any? {|reult| !result }
134
+
135
+ if pass
136
+ msg('run_minitest', { succeed_after: 1 })
137
+ else
138
+ msg('run_minitest', { failed_after: 1 })
139
+ end
140
+ send_events if ENV['RBCI_REMOTE_TESTS'] == 'true'
141
+
142
+ return pass
143
+ end
144
+
120
145
  def method_missing(method, *args)
121
146
  return
122
147
  end
@@ -225,7 +250,7 @@ module Minitest
225
250
 
226
251
  def send_events
227
252
  return unless @events.length > 0
228
-
253
+
229
254
  json_events = {
230
255
  build_id: RubyCI.configuration.orig_build_id,
231
256
  compressed_data: Base64.strict_encode64(Zlib::Deflate.deflate(JSON.fast_generate(@events), 9)),
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyCI
4
- VERSION = "0.2.19"
4
+ VERSION = "0.2.20"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.19
4
+ version: 0.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ale ∴
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-09 00:00:00.000000000 Z
11
+ date: 2024-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: console