Skip to content

Commit

Permalink
Foodcritic travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
laradji committed Oct 12, 2012
1 parent 3a3c075 commit 303e18d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env rake
require 'rake/testtask'

Rake::TestTask.new do |t|
t.libs.push "lib"
t.test_files = FileList['test/**/*_spec.rb']
t.verbose = true
end

desc "Runs foodcritic linter"
task :foodcritic do
if Gem::Version.new("1.9.2") <= Gem::Version.new(RUBY_VERSION.dup)
sh "foodcritic --epic-fail any ."
else
puts "WARN: foodcritic run is skipped as Ruby #{RUBY_VERSION} is < 1.9.2."
end
end

task :default => [ 'test', 'foodcritic' ]

0 comments on commit 303e18d

Please sign in to comment.