ruby_ci 0.2.18 → 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: f4643ba52ad374cc4bbfd756981c8cb38d2d0201970f8c43aace65dd8f492c16
4
- data.tar.gz: 0e2585adbb72a1dcfc7acfcac0e1e48b0b423d0139e1f9a2038d88ad0a5306df
3
+ metadata.gz: ae20ec2e3fbf789900df5a4c40a3de99c19916c0e63fc16bd2f7fea39e46db79
4
+ data.tar.gz: 5ab6e34ea20ddd882665e30d685fea42334ff5f0de64a0e8929f1bd186c0965a
5
5
  SHA512:
6
- metadata.gz: 44c0fe8680c7a7d918e88981fb3f2833be710ced43f5e7ab2388b9171ce6d6afaee3ec85d76019249b89b1f5b43be12cecd062b459effc63173a2999f8231965
7
- data.tar.gz: 772fd485dfe1593d5cf84c7695e15f3198152829d6201d8e5d2c6713d9a01d1e1f1fcddccdf7def4219e324e247016621e5541defa02be9591fa40cfb49b88c1
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.18"
4
+ VERSION = "0.2.20"
5
5
  end
data/lib/ruby_ci.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require_relative "ruby_ci/version"
4
4
  require_relative "ruby_ci/configuration"
5
5
  require_relative "ruby_ci/exceptions"
6
+ require_relative "minitest/reporters/rubyci_reporter"
6
7
 
7
8
  require "async"
8
9
  require "async/http/endpoint"
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.18
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-08 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