-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'tasks/' from commit 'f0555ee5b63855bbd24102d92325844a5c1e4e7e'
- Loading branch information
Showing
10 changed files
with
797 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
*.gem | ||
*.rbc | ||
/.config | ||
/coverage/ | ||
/InstalledFiles | ||
/pkg/ | ||
/spec/reports/ | ||
/test/tmp/ | ||
/test/version_tmp/ | ||
/tmp/ | ||
|
||
## Specific to RubyMotion: | ||
.dat* | ||
.repl_history | ||
build/ | ||
|
||
## Documentation cache and generated files: | ||
/.yardoc/ | ||
/_yardoc/ | ||
/doc/ | ||
/rdoc/ | ||
|
||
## Environment normalisation: | ||
/.bundle/ | ||
/lib/bundler/man/ | ||
|
||
# for a library or gem, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# Gemfile.lock | ||
# .ruby-version | ||
# .ruby-gemset | ||
|
||
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: | ||
.rvmrc |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Rake Tasks | ||
========== | ||
|
||
A collection of rake tasks for use with [Trema][trema] and Trema apps. | ||
|
||
[trema]: https://github.com/trema/trema_ruby |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
begin | ||
require 'cucumber/rake/task' | ||
Cucumber::Rake::Task.new | ||
rescue LoadError | ||
task :cucumber do | ||
$stderr.puts 'Cucumber is disabled' | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
begin | ||
require 'rake/tasklib' | ||
require 'flay' | ||
require 'flay_task' | ||
FlayTask.new do |t| | ||
t.dirs = FileList['lib/**/*.rb'].map do |each| | ||
each[/[^\/]+/] | ||
end.uniq | ||
t.verbose = true | ||
end | ||
rescue LoadError | ||
task :flay do | ||
$stderr.puts 'Flay is disabled' | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
begin | ||
require 'flog' | ||
|
||
desc 'Analyze for code complexity' | ||
task :flog do | ||
flog = Flog.new(continue: true) | ||
flog.flog(*FileList['lib/**/*.rb']) | ||
threshold = 10 | ||
|
||
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 |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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 |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
require 'rspec/core/rake_task' | ||
|
||
RSpec::Core::RakeTask.new |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
begin | ||
require 'rubocop/rake_task' | ||
RuboCop::RakeTask.new | ||
rescue LoadError | ||
task :rubocop do | ||
$stderr.puts 'RuboCop is disabled' | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
begin | ||
require 'yard' | ||
YARD::Rake::YardocTask.new do |t| | ||
t.files = ['lib/**/*.rb'] | ||
t.options = ['--no-private'] | ||
t.options << '--debug' << '--verbose' if verbose == true | ||
end | ||
rescue LoadError | ||
task :yard do | ||
$stderr.puts 'YARD is disabled' | ||
end | ||
end |