Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix fallback reek task to be within the metrics namespace
- Loading branch information
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
# encoding: utf-8 | ||
|
||
begin | ||
require 'reek/rake/task' | ||
namespace :metrics do | ||
begin | ||
require 'reek/rake/task' | ||
|
||
RBX_18_MODE = RUBY_VERSION < '1.9' && defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx' | ||
RBX_18_MODE = RUBY_VERSION < '1.9' && defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx' | ||
|
||
namespace :metrics do | ||
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 | ||
end | ||
rescue LoadError | ||
task :reek do | ||
$stderr.puts 'Reek is not available. In order to run reek, you must: gem install reek' | ||
rescue LoadError | ||
task :reek do | ||
$stderr.puts 'Reek is not available. In order to run reek, you must: gem install reek' | ||
end | ||
end | ||
end |