ruby_ci 0.2.19 → 0.2.21

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: a0606b67937f509f240f8272299675ed73dff996d036df02e85182552dfc695d
4
+ data.tar.gz: 4fa0dd1b08e9ba17868936e8988e1327f3115816cc34041b6beb80946af4f6ce
5
5
  SHA512:
6
- metadata.gz: 2efbad4ad63dd25d884bc75f22574e690bdd5d7e220c5d01ad8f2f2e80d1da637c906589662263f19d9aa8d3aa86593f18f31ce51c89486bc077717fac7a1056
7
- data.tar.gz: 5bab9330172e78a1d4cffed42cc44bede634d91314f997efda33b55de57f3ccc2f7b8f0f00800c433b0c5990622274a3453a3b0c7d709c328c6c439b334e3625
6
+ metadata.gz: bb8233550b50d523898ac099feed2a0a8845bf165498c902c6ad300817b1f2850e1803ac5c214616dd4ceafc7537acd575eee179fcfc820408104a373011acb2
7
+ data.tar.gz: 2070c420f621ec531bf8c1c09c6e40f6c2cca277384a10fba3a733db83c08a783ac91e43b17d107ebd617d63ad02e868cb5c22e362264df43d6cd8d5aa7ed62b
@@ -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
+ @events << ['run_minitest'.upcase, { succeed_after: 1 }]
137
+ else
138
+ @events << ['run_minitest'.upcase, { 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.21"
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.21
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