ruby_ci 0.2.24 → 0.2.26

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: a78ded01a27962a7569f39e3308cce64cfe00e2c56573d573fd34d04e1b2ef2d
4
- data.tar.gz: 18852805b52eb06375c35fcfb72ac6135e6b55fa029ba5b23cb110a816f72179
3
+ metadata.gz: 72ea634cddf556e3f3ed56212cf09fdb141597776d00e2a2119f60dee132b31f
4
+ data.tar.gz: 4e9114bd8a9ac673d489b29426f1df059e1162fe7baf115959591f3fbb0bce2a
5
5
  SHA512:
6
- metadata.gz: 1815b528081e389f753f693f29b157b6dc00bbf57f3860ad628423229539f41ecd23c62093a7c395dec493271e50bec0e64959b58f522d72a1f50ff00fc8c5a6
7
- data.tar.gz: 700d92e85b339839dd1f465924b5a26c0d71a46569cbee88c4172f2e1f63c66713c2d27fb12a7ae40125492ca9957110b757e9ac2464585593ea4c916b967014
6
+ metadata.gz: e58ee08a62c44c11878b9919801e499b80824fd4a2eeea3baaba7acdeee1088ebb3f01b55489e10e7462bc7b1e82f5fb3e4d02e034f23d615c96c5230e0a45ef
7
+ data.tar.gz: c91aa1c67b8821e9292b9a37299db8b5eaad4197cc7766332c96a9ac5e15b5d47021312e026d02b06f394ee84b1bc6ee8e4ed90d9c0c8c9ef1d8344fc677b94b
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # Always look in the lib directory of this gem
5
+ # first when searching the load path
6
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
7
+
8
+ require 'bundler/audit/cli'
9
+ require 'ruby_ci'
10
+ require 'base64'
11
+ require 'zlib'
12
+
13
+ $stdout = StringIO.new()
14
+ def $stdout.tty?
15
+ true
16
+ end
17
+
18
+ events = []
19
+
20
+ at_exit do
21
+ output = $stdout.string
22
+ $stdout = STDOUT
23
+
24
+ if $!.nil? || ($!.is_a?(SystemExit) && $!.success?)
25
+ code = 0
26
+ else
27
+ code = $!.is_a?(SystemExit) ? $!.status : 1
28
+ end
29
+
30
+ data = {
31
+ exitstatus: code,
32
+ output: "$ bundle-audit --update\n\n" + output,
33
+ key: 'bundler_audit',
34
+ index: 0,
35
+ title: 'Perform',
36
+ }
37
+ events << ['custom_exit_status'.upcase, ['0', data]]
38
+
39
+ if ENV['RBCI_REMOTE_TESTS'] == 'true'
40
+ json_events = {
41
+ build_id: RubyCI.configuration.orig_build_id,
42
+ compressed_data: Base64.strict_encode64(Zlib::Deflate.deflate(JSON.fast_generate(events), 9)),
43
+ }
44
+
45
+ RubyCI.send_events(json_events)
46
+ else
47
+ compressed_data = ::Base64.strict_encode64(Zlib::Deflate.deflate(output, 9))
48
+ RubyCI.report_bundler_audit(compressed_data, (code == 0) ? 'passed' : 'failed')
49
+ end
50
+
51
+ output
52
+ end
53
+
54
+ events << ['custom_started'.upcase, ['0', { key: 'bundler_audit' }]]
55
+ Bundler::Audit::CLI.start
@@ -12,11 +12,11 @@ module RubyCI
12
12
  self.commit = guess_commit
13
13
  self.commit_msg = `git log -1 --pretty=%B`.chomp
14
14
  self.branch = guess_branch
15
- self.api_url = ENV["RUBY_CI_API_URL"] || "api.fast.ci"
15
+ self.api_url = ENV["RUBY_CI_API_URL"] || "apx.ruby.ci"
16
16
  self.secret_key = ENV.fetch("RUBY_CI_SECRET_KEY")
17
17
  self.author = guess_author
18
18
  self.rubyci_main_url = ENV.fetch('RUBYCI_MAIN_URL', 'https://events.ruby.ci')
19
- self.rubyci_api_url = ENV.fetch('RUBYCI_API_RB_URL', 'https://fast.ruby.ci')
19
+ self.rubyci_api_url = ENV.fetch('RUBYCI_API_RB_URL', 'https://cloud-api.ruby.ci')
20
20
  self.orig_build_id = ENV['RBCI_ORIG_BUILD_ID']
21
21
  end
22
22
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyCI
4
- VERSION = "0.2.24"
4
+ VERSION = "0.2.26"
5
5
  end
data/lib/ruby_ci.rb CHANGED
@@ -42,6 +42,10 @@ module RubyCI
42
42
  post_report(report_options('brakeman', compressed_data).merge({ status: status }))
43
43
  end
44
44
 
45
+ def report_bundler_audit(compressed_data, status)
46
+ post_report(report_options('bundler_audit', compressed_data).merge({ status: status }))
47
+ end
48
+
45
49
  def rspec_await
46
50
  rspec_ws.await
47
51
  end
data/ruby_ci.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
24
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
25
25
  end
26
- spec.executables = ["rubyci_rubycritic", "rubyci_brakeman"]
26
+ spec.executables = ["rubyci_rubycritic", "rubyci_brakeman", "rubyci_bundle_audit"]
27
27
  spec.require_paths = ["lib"]
28
28
 
29
29
  spec.add_dependency "console", "~> 1.26.0"
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.24
4
+ version: 0.2.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nesha Zoric
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-04 00:00:00.000000000 Z
11
+ date: 2024-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: console
@@ -100,6 +100,7 @@ email:
100
100
  executables:
101
101
  - rubyci_rubycritic
102
102
  - rubyci_brakeman
103
+ - rubyci_bundle_audit
103
104
  extensions: []
104
105
  extra_rdoc_files: []
105
106
  files:
@@ -115,6 +116,7 @@ files:
115
116
  - Rakefile
116
117
  - bin/console
117
118
  - bin/rubyci_brakeman
119
+ - bin/rubyci_bundle_audit
118
120
  - bin/rubyci_rubycritic
119
121
  - bin/setup
120
122
  - lib/minitest/reporters/rubyci_reporter.rb