Sha256: a52f8029d7ffb8c9583964affb8be04231c20ff6260d175605bd5b8f6a9b582e

Contents?: true

Size: 564 Bytes

Versions: 9

Compression:

Stored size: 564 Bytes

Contents

if Rails.env.development? || Rails.env.test?
  namespace :brakeman do
    desc "Run Brakeman"
    task :run, :output_files do |_t, args|
      require 'brakeman'

      files = args[:output_files].split(' ') if args[:output_files]
      Brakeman.run app_path: ".", output_files: files, print_report: true
    end

    desc "Check your code with Brakeman"
    task :check do
      require 'brakeman'
      result = Brakeman.run app_path: '.', print_report: true
      exit Brakeman::Warnings_Found_Exit_Code unless result.filtered_warnings.empty?
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
welaika-suspenders-2.26.0 templates/brakeman.rake
welaika-suspenders-2.25.0 templates/brakeman.rake
welaika-suspenders-2.24.0 templates/brakeman.rake
welaika-suspenders-2.23.0 templates/brakeman.rake
welaika-suspenders-2.22.0 templates/brakeman.rake
welaika-suspenders-2.21.0 templates/brakeman.rake
welaika-suspenders-2.20.0 templates/brakeman.rake
welaika-suspenders-2.19.0 templates/brakeman.rake
welaika-suspenders-2.17.0 templates/brakeman.rake