Rakefile in ezmq-0.3.6 vs Rakefile in ezmq-0.3.7
- old
+ new
@@ -1,29 +1,50 @@
# require 'simplecov'
+require 'rubocop/rake_task'
+require 'reek/rake/task'
+require 'rspec/core/rake_task'
+require 'roodi_task'
+
task default: [:test]
-task :test do
- sh 'rspec'
+task test: [:rspec]
+
+desc 'Run Test Suite with RSpec'
+RSpec::Core::RakeTask.new(:rspec) do |task|
+ task.patterns = ['spec/**/*.rb']
+ task.fail_on_error = false
end
task audit: [:style, :complexity, :duplication, :design, :documentation]
-task :style do
- sh 'rubocop'
+task style: [:rubocop]
+
+desc 'Enforce Style Conformance with RuboCop'
+RuboCop::RakeTask.new(:rubocop) do |task|
+ task.patterns = ['lib/**/*.rb']
+ task.fail_on_error = false
end
-task :complexity do
- sh 'flog *.rb **/*.rb'
+task complexity: [:flog]
+
+desc 'Assess Complexity with Flog'
+# FlogTask.new :flog, 9000, ['lib']
+task :flog do
+ sh 'flog lib/**/*.rb'
end
-task :duplication do
+task duplication: [:flay]
+
+task :flay do
sh 'flay'
end
-task :design do
- sh 'roodi'
- sh 'reek *.rb **/*.rb'
+task design: [:roodi, :reek]
+
+desc 'Find Code Smells with Reek'
+Reek::Rake::Task.new(:reek) do |task|
+ task.fail_on_error = false
end
task :rework do
sh 'churn'
end