File: custom_bundler_audit.rb

package info (click to toggle)
ruby-omniauth-oauth2-generic 0.2.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 172 kB
  • sloc: ruby: 267; makefile: 7; sh: 4
file content (36 lines) | stat: -rw-r--r-- 713 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# frozen_string_literal: true

module Satorix
  module CI
    module Test
      module CustomBundlerAudit

        include Satorix::Shared::Console

        extend self


        def go
          log_bench('Displaying current Ruby version...') { run_command 'ruby -v' }
          log_bench('Installing bundler-audit...') { install_gem }
          log_bench('Auditing Gemfile.lock...') { run_scan }
        end


        private


          def install_gem
            run_command "gem install bundler-audit --no-document --bindir #{ Satorix.bin_dir }"
          end


          def run_scan
            run_command 'bundle-audit check --update  --ignore CVE-2015-9284'
          end


      end
    end
  end
end