ruby_ci 0.2.25 → 0.2.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rubyci_bundle_audit +55 -0
- data/lib/ruby_ci/version.rb +1 -1
- data/lib/ruby_ci.rb +4 -0
- data/ruby_ci.gemspec +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72ea634cddf556e3f3ed56212cf09fdb141597776d00e2a2119f60dee132b31f
|
4
|
+
data.tar.gz: 4e9114bd8a9ac673d489b29426f1df059e1162fe7baf115959591f3fbb0bce2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/ruby_ci/version.rb
CHANGED
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.
|
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-
|
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
|