Sha256: 28a6a24e9362cff0faddf8102763c5444e1305d6ee1446bca9a6561f7b94980c

Contents?: true

Size: 919 Bytes

Versions: 16

Compression:

Stored size: 919 Bytes

Contents

begin
  require 'cane/rake_task'
  require 'morecane'

  desc "Run cane to check quality metrics"
  Cane::RakeTask.new(:quality) do |cane|
    cane.add_threshold 'coverage/covered_percent', :>=, 95

    cane.no_style      = false # Change to true to skip style checks
    cane.style_measure = 120   # Maximum line length
    cane.style_exclude = %w{
      lib/templates/rspec/scaffold/controller_spec.rb
    }

    cane.no_doc = true # Change to false to enable documentation checks

    cane.abc_max = 15 # Fail the build if complexity is too high.
    # cane.abc_exclude = %w(
    #   User#bad_code_rising
    # )

    # Fail the build if the code includes debugging statements
    cane.use Morecane::MustNotMatchCheck,
      must_not_match_glob: "{app,lib,config,spec}/**/*.rb",
      must_not_match_regexp: /binding\.pry|debugger/
  end

rescue LoadError
  warn "cane not available, quality task not provided."
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
raygun-0.0.34 rails_32/lib/tasks/cane.rake
raygun-0.0.34.pre2 rails_32/lib/tasks/cane.rake
raygun-0.0.33 rails_32/lib/tasks/cane.rake
raygun-0.0.32 rails_32/lib/tasks/cane.rake
raygun-0.0.31 rails_32/lib/tasks/cane.rake
raygun-0.0.30 rails_32/lib/tasks/cane.rake
raygun-0.0.29 rails_32/lib/tasks/cane.rake
raygun-0.0.28 rails_32/lib/tasks/cane.rake
raygun-0.0.27 app_prototype/lib/tasks/cane.rake
raygun-0.0.26 app_prototype/lib/tasks/cane.rake
raygun-0.0.25 app_prototype/lib/tasks/cane.rake
raygun-0.0.24 app_prototype/lib/tasks/cane.rake
raygun-0.0.23 app_prototype/lib/tasks/cane.rake
raygun-0.0.22 app_prototype/lib/tasks/cane.rake
raygun-0.0.21 app_prototype/lib/tasks/cane.rake
raygun-0.0.18 app_prototype/lib/tasks/cane.rake