roodi 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Manifest.txt +1 -0
- data/lib/roodi.rb +1 -1
- data/lib/roodi_task.rb +37 -0
- metadata +5 -4
data/Manifest.txt
CHANGED
data/lib/roodi.rb
CHANGED
data/lib/roodi_task.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
class RoodiTask < Rake::TaskLib
|
2
|
+
attr_accessor :name
|
3
|
+
attr_accessor :patterns
|
4
|
+
attr_accessor :config
|
5
|
+
attr_accessor :verbose
|
6
|
+
|
7
|
+
def initialize name = :roodi, patterns = nil, config nil
|
8
|
+
@name = name
|
9
|
+
@patterns = patterns || %w(app/**/*.rb lib/**/*.rb spec/**/*.rb test/**/*.rb)
|
10
|
+
@config = config
|
11
|
+
@verbose = Rake.application.options.trace
|
12
|
+
|
13
|
+
yield self if block_given?
|
14
|
+
|
15
|
+
@dirs.reject! { |f| ! File.directory? f }
|
16
|
+
|
17
|
+
define
|
18
|
+
end
|
19
|
+
|
20
|
+
def define
|
21
|
+
desc "Check for design issues in: #{patterns.join(', ')}"
|
22
|
+
task name do
|
23
|
+
runner = Roodi::Core::ParseTreeRunner.new
|
24
|
+
|
25
|
+
runner.config = config if config
|
26
|
+
|
27
|
+
patterns.each do |pattern|
|
28
|
+
Dir.glob(pattern).each { |file| runner.check_file(file) }
|
29
|
+
end
|
30
|
+
|
31
|
+
runner.errors.each {|error| puts error}
|
32
|
+
|
33
|
+
raise "Found #{runner.errors.size} errors." if runner.errors
|
34
|
+
end
|
35
|
+
self
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roodi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marty Andrews
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-04-10 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.
|
43
|
+
version: 1.11.0
|
44
44
|
version:
|
45
45
|
description: Roodi stands for Ruby Object Oriented Design Inferometer. It parses your Ruby code and warns you about design issues you have based on the checks that is has configured.
|
46
46
|
email:
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- bin/roodi
|
63
63
|
- bin/roodi-describe
|
64
64
|
- lib/roodi.rb
|
65
|
+
- lib/roodi_task.rb
|
65
66
|
- lib/roodi/checks.rb
|
66
67
|
- lib/roodi/checks/abc_metric_method_check.rb
|
67
68
|
- lib/roodi/checks/assignment_in_conditional_check.rb
|
@@ -131,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
132
|
requirements: []
|
132
133
|
|
133
134
|
rubyforge_project: roodi
|
134
|
-
rubygems_version: 1.
|
135
|
+
rubygems_version: 1.3.1
|
135
136
|
signing_key:
|
136
137
|
specification_version: 2
|
137
138
|
summary: Roodi stands for Ruby Object Oriented Design Inferometer
|