Sha256: 34a09061eda343f7683d8a94c866bdb3b707c9c3d1aa3efbacb7c09c5f16186a

Contents?: true

Size: 537 Bytes

Versions: 2

Compression:

Stored size: 537 Bytes

Contents

# frozen_string_literal: true

module CIHelper
  module Commands
    class BundlerAudit < BaseCommand
      def call
        execute(audit_cmd)
      end

      private

      def audit_cmd
        (+"bundle exec bundler-audit check --update").tap do |audit_cmd|
          if ignored_advisories&.any?
            audit_cmd << " --ignore #{ignored_advisories.join(" ")}"
          end
        end
      end

      def ignored_advisories
        @ignored_advisories ||= options[:ignored_advisories]&.split(",")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ci-helper-0.1.1 lib/ci_helper/commands/bundler_audit.rb
ci-helper-0.1.0 lib/ci_helper/commands/bundler_audit.rb