forked from lostisland/faraday_middleware
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
28 lines (23 loc) · 646 Bytes
/
Rakefile
File metadata and controls
28 lines (23 loc) · 646 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
ruby_19 = RUBY_VERSION > '1.9'
ruby_mri = !defined?(RUBY_ENGINE) || 'ruby' == RUBY_ENGINE
default_gemfile = ENV['BUNDLE_GEMFILE'] =~ /Gemfile$/
if ruby_19 && ruby_mri && default_gemfile
task :default => [:enable_coverage, :spec, :quality]
else
task :default => [:spec]
end
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task :enable_coverage do
ENV['COVERAGE'] = 'yes'
end
desc %(Check code quality metrics with Cane)
task :quality do
sh 'cane',
'--abc-max=15',
'--style-measure=110',
'--gte=coverage/covered_percent,98.5',
'--max-violations=0'
end