Module: FastCI::Brakeman
- Defined in:
- lib/fast_ci/brakeman.rb,
lib/fast_ci/brakeman/commandline.rb
Defined Under Namespace
Classes: Commandline
Class Method Summary collapse
Class Method Details
.start ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fast_ci/brakeman.rb', line 8 def self.start FastCI.start_report('brakeman') events = [] events << ['brakeman_run'.upcase, {}] FastCI::Brakeman::Commandline.start(output_files: ['tmp/brakeman.json'], ensure_ignore_notes: false) content = File.read('tmp/brakeman.json') compressed_data = ::Base64.strict_encode64(Zlib::Deflate.deflate(content, 9)) events << ['brakeman_exit_status'.upcase, ['0', { exitstatus: 0, stderr: '', output: '', compressed_data: compressed_data }]] if ENV['FSCI_REMOTE_TESTS'] == 'true' json_events = { build_id: FastCI.configuration.orig_build_id, compressed_data: Base64.strict_encode64(Zlib::Deflate.deflate(JSON.fast_generate(events), 9)), } FastCI.send_events(json_events) else FastCI.report_brakeman(compressed_data, 'passed') end end |