Sha256: 421128b44f708bd259b2b3bbd6bab851442dd0e10237c59ff5bcae4573613755

Contents?: true

Size: 693 Bytes

Versions: 4

Compression:

Stored size: 693 Bytes

Contents

# encoding: utf-8

namespace :metrics do
  begin
    require 'reek/rake/task'

    RBX_18_MODE = RUBY_VERSION < '1.9' && defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'

    Reek::Rake::Task.new do |t|
      # reek has some problems under rbx in 1.8 mode that cause the underlying
      # script to raise an exception. Rather than halt the "rake ci" process due
      # to one bug, we choose to ignore it in this specific case until reek can be
      # fixed.
      t.fail_on_error = ! RBX_18_MODE  # always true, except under rbx 18 mode
    end
  rescue LoadError
    task :reek do
      $stderr.puts 'Reek is not available. In order to run reek, you must: gem install reek'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yardstick-0.9.6 tasks/metrics/reek.rake
yardstick-0.9.5 tasks/metrics/reek.rake
yardstick-0.9.4 tasks/metrics/reek.rake
yardstick-0.9.3 tasks/metrics/reek.rake