From e1b96ea0901225ed704434859c0c5b0e62eb5a1f Mon Sep 17 00:00:00 2001 From: Yasuhito Takamiya Date: Tue, 17 Mar 2015 22:06:01 +0900 Subject: [PATCH] Use trema/rake_tasks. --- tasks/cucumber.rake | 8 -------- tasks/flog.rake | 25 ------------------------- tasks/reek.rake | 11 ----------- tasks/rspec.rake | 3 --- tasks/rubocop.rake | 8 -------- 5 files changed, 55 deletions(-) delete mode 100644 tasks/cucumber.rake delete mode 100644 tasks/flog.rake delete mode 100644 tasks/reek.rake delete mode 100644 tasks/rspec.rake delete mode 100644 tasks/rubocop.rake diff --git a/tasks/cucumber.rake b/tasks/cucumber.rake deleted file mode 100644 index 6833904..0000000 --- a/tasks/cucumber.rake +++ /dev/null @@ -1,8 +0,0 @@ -begin - require 'cucumber/rake/task' - Cucumber::Rake::Task.new -rescue LoadError - task :cucumber do - $stderr.puts 'Cucumber is disabled' - end -end diff --git a/tasks/flog.rake b/tasks/flog.rake deleted file mode 100644 index 01b64f6..0000000 --- a/tasks/flog.rake +++ /dev/null @@ -1,25 +0,0 @@ -begin - require 'flog' - - desc 'Analyze for code complexity' - task :flog do - flog = Flog.new(continue: true) - flog.flog(*FileList['*.rb']) - threshold = 0 - - bad_methods = flog.totals.select do |name, score| - !(/##{flog.no_method}$/ =~ name) && score > threshold - end - bad_methods.sort { |a, b| a[1] <=> b[1] }.reverse.each do |name, score| - printf "%8.1f: %s\n", score, name - end - unless bad_methods.empty? - $stderr.puts "#{bad_methods.size} methods "\ - "have a complexity > #{threshold}" - end - end -rescue LoadError - task :flog do - $stderr.puts 'Flog is disabled' - end -end diff --git a/tasks/reek.rake b/tasks/reek.rake deleted file mode 100644 index 8046ecf..0000000 --- a/tasks/reek.rake +++ /dev/null @@ -1,11 +0,0 @@ -begin - require 'reek/rake/task' - Reek::Rake::Task.new do |t| - t.fail_on_error = false - t.verbose = false - end -rescue LoadError - task :reek do - $stderr.puts 'Reek is disabled' - end -end diff --git a/tasks/rspec.rake b/tasks/rspec.rake deleted file mode 100644 index 3c52bf9..0000000 --- a/tasks/rspec.rake +++ /dev/null @@ -1,3 +0,0 @@ -require 'rspec/core/rake_task' - -RSpec::Core::RakeTask.new diff --git a/tasks/rubocop.rake b/tasks/rubocop.rake deleted file mode 100644 index ddbc893..0000000 --- a/tasks/rubocop.rake +++ /dev/null @@ -1,8 +0,0 @@ -begin - require 'rubocop/rake_task' - RuboCop::RakeTask.new -rescue LoadError - task :rubocop do - $stderr.puts 'RuboCop is disabled' - end -end