Class: Quality::Rake::Task
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Quality::Rake::Task
- Defined in:
- lib/quality/rake/task.rb
Overview
A Rake task that run quality tools on a set of source files, and enforce a ratcheting quality level.
Example:
require 'quality/rake/task'
Quality::Rake::Task.new do |t|
end
This will create a task that can be run with:
rake quality
Instance Attribute Summary collapse
-
#name ⇒ Object
Name of quality task.
-
#skip_tools ⇒ Object
Array of strings describing tools to be skipped–e.g., [“cane”].
Instance Method Summary collapse
-
#initialize(args = {}) {|_self| ... } ⇒ Task
constructor
Defines a new task, using the name
name.
Constructor Details
#initialize(args = {}) {|_self| ... } ⇒ Task
Defines a new task, using the name name.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/quality/rake/task.rb', line 42 def initialize(args = {}) @name = args[:name] @name = 'quality' if @name.nil? @skip_tools = [] if @skip_tools.nil? @config_files = nil @source_files = nil @ruby_opts = [] @reek_opts = '' @fail_on_error = true @sort = nil yield self if block_given? @config_files ||= 'config/**/*.reek' @source_files ||= 'lib/**/*.rb' define end |
Instance Attribute Details
#name ⇒ Object
Name of quality task. Defaults to :quality.
34 35 36 |
# File 'lib/quality/rake/task.rb', line 34 def name @name end |
#skip_tools ⇒ Object
Array of strings describing tools to be skipped–e.g., [“cane”]
Defaults to []
39 40 41 |
# File 'lib/quality/rake/task.rb', line 39 def skip_tools @skip_tools end |