roodi 1.3.7 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. data/History.txt +4 -0
  2. data/Manifest.txt +1 -1
  3. data/README.txt +1 -1
  4. data/Rakefile +1 -1
  5. data/bin/roodi +1 -1
  6. data/bin/roodi-describe +1 -1
  7. data/lib/roodi.rb +1 -1
  8. data/lib/roodi/checks/check.rb +5 -5
  9. data/lib/roodi/checks/control_coupling_check.rb +1 -2
  10. data/lib/roodi/checks/empty_rescue_body_check.rb +2 -2
  11. data/lib/roodi/checks/line_count_check.rb +1 -4
  12. data/lib/roodi/checks/parameter_number_check.rb +1 -1
  13. data/lib/roodi/core.rb +1 -1
  14. data/lib/roodi/core/checking_visitor.rb +1 -2
  15. data/lib/roodi/core/iterator_visitor.rb +1 -1
  16. data/lib/roodi/core/parser.rb +3 -6
  17. data/lib/roodi/core/{parse_tree_runner.rb → runner.rb} +2 -1
  18. data/lib/roodi/core/visitable_sexp.rb +15 -19
  19. data/lib/roodi_task.rb +1 -1
  20. data/spec/roodi/checks/abc_metric_method_check_spec.rb +1 -1
  21. data/spec/roodi/checks/assignment_in_conditional_check_spec.rb +2 -4
  22. data/spec/roodi/checks/case_missing_else_check_spec.rb +2 -2
  23. data/spec/roodi/checks/class_line_count_check_spec.rb +1 -1
  24. data/spec/roodi/checks/class_name_check_spec.rb +1 -1
  25. data/spec/roodi/checks/class_variable_check_spec.rb +2 -2
  26. data/spec/roodi/checks/control_coupling_check_spec.rb +2 -2
  27. data/spec/roodi/checks/cyclomatic_complexity_block_check_spec.rb +2 -2
  28. data/spec/roodi/checks/cyclomatic_complexity_method_check_spec.rb +1 -1
  29. data/spec/roodi/checks/empty_rescue_body_check_spec.rb +3 -3
  30. data/spec/roodi/checks/for_loop_check_spec.rb +1 -1
  31. data/spec/roodi/checks/method_line_count_check_spec.rb +18 -1
  32. data/spec/roodi/checks/method_name_check_spec.rb +1 -1
  33. data/spec/roodi/checks/module_line_count_check_spec.rb +1 -1
  34. data/spec/roodi/checks/module_name_check_spec.rb +1 -1
  35. data/spec/roodi/checks/parameter_number_check_spec.rb +1 -1
  36. metadata +4 -4
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ = 1.4.0
2
+
3
+ * Upgraded from ParseTree to ruby_parser.
4
+
1
5
  = 1.3.7
2
6
 
3
7
  * Fixed a bug in the rake task where it always failed even if no errors existed.
data/Manifest.txt CHANGED
@@ -30,8 +30,8 @@ lib/roodi/core.rb
30
30
  lib/roodi/core/checking_visitor.rb
31
31
  lib/roodi/core/error.rb
32
32
  lib/roodi/core/iterator_visitor.rb
33
- lib/roodi/core/parse_tree_runner.rb
34
33
  lib/roodi/core/parser.rb
34
+ lib/roodi/core/runner.rb
35
35
  lib/roodi/core/visitable_sexp.rb
36
36
  lib/roodi_task.rb
37
37
  roodi.yml
data/README.txt CHANGED
@@ -29,7 +29,7 @@ Check one controller and all model files in a rails app:
29
29
  Check all ruby files in a rails app with a custom configuration file:
30
30
  roodi -config=my_roodi_config.yml "rails_app/**/*.rb"
31
31
 
32
- If you're writing a check, it is useful to see the structure of a file the way that Roodi tokenizes it (via ParseTree). Use:
32
+ If you're writing a check, it is useful to see the structure of a file the way that Roodi tokenizes it (via ruby_parser). Use:
33
33
  roodi-describe [filename]
34
34
 
35
35
  == CUSTOM CONFIGURATION
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ require 'roodi'
8
8
 
9
9
  Hoe.new('roodi', Roodi::VERSION) do |p|
10
10
  p.developer('Marty Andrews', 'marty@cogentconsulting.com.au')
11
- p.extra_deps = ['ParseTree', 'facets']
11
+ p.extra_deps = ['ruby_parser', 'facets']
12
12
  p.remote_rdoc_dir = ''
13
13
  end
14
14
 
data/bin/roodi CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
4
4
 
5
5
  require 'roodi'
6
6
 
7
- runner = Roodi::Core::ParseTreeRunner.new
7
+ runner = Roodi::Core::Runner.new
8
8
 
9
9
  config_param = ARGV.detect {|arg| arg =~ /-config=.*/}
10
10
  runner.config = config_param.split("=")[1] if config_param
data/bin/roodi-describe CHANGED
@@ -3,5 +3,5 @@
3
3
  $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
4
4
  require 'roodi'
5
5
 
6
- roodi = Roodi::Core::ParseTreeRunner.new
6
+ roodi = Roodi::Core::Runner.new
7
7
  roodi.print_file(ARGV[0])
data/lib/roodi.rb CHANGED
@@ -2,5 +2,5 @@ require 'roodi/checks'
2
2
  require 'roodi/core'
3
3
 
4
4
  module Roodi
5
- VERSION = '1.3.7'
5
+ VERSION = '1.4.0'
6
6
  end
@@ -10,16 +10,16 @@ module Roodi
10
10
  def position(offset = 0)
11
11
  "#{@line[2]}:#{@line[1] + offset}"
12
12
  end
13
-
14
- def evaluate_node_at_line(node, line)
15
- @line = line
13
+
14
+ def evaluate_node(node)
15
+ @node = node
16
16
  eval_method = "evaluate_#{node.node_type}"
17
17
  self.send(eval_method, node) if self.respond_to? eval_method
18
18
  evaluate(node) if self.respond_to? :evaluate
19
19
  end
20
20
 
21
- def add_error(error, offset = 0)
22
- @errors << Roodi::Core::Error.new("#{@line[2]}", "#{@line[1] + offset}", error)
21
+ def add_error(error)
22
+ @errors << Roodi::Core::Error.new("#{@node.file}", "#{@node.line}", error)
23
23
  end
24
24
 
25
25
  def errors
@@ -9,8 +9,7 @@ module Roodi
9
9
 
10
10
  def evaluate_defn(node)
11
11
  @method_name = node[1]
12
- @arguments = node[2][1][1]
13
- @arguments.delete_at 0
12
+ @arguments = node[2][1..-1]
14
13
  end
15
14
 
16
15
  def evaluate_lvar(node)
@@ -7,14 +7,14 @@ module Roodi
7
7
  # When the body of a rescue block is empty, exceptions can get caught and swallowed without
8
8
  # any feedback to the user.
9
9
  class EmptyRescueBodyCheck < Check
10
- STATEMENT_NODES = [:fcall, :return, :attrasgn, :vcall, :nil]
10
+ STATEMENT_NODES = [:fcall, :return, :attrasgn, :vcall, :nil, :call]
11
11
 
12
12
  def interesting_nodes
13
13
  [:resbody]
14
14
  end
15
15
 
16
16
  def evaluate(node)
17
- add_error("Rescue block should not be empty.", 1) unless has_statement?(node)
17
+ add_error("Rescue block should not be empty.") unless has_statement?(node)
18
18
  end
19
19
 
20
20
  private
@@ -22,10 +22,7 @@ module Roodi
22
22
  protected
23
23
 
24
24
  def count_lines(node)
25
- count = 0
26
- count = count + 1 if node.node_type == :newline
27
- node.children.each {|node| count += count_lines(node)}
28
- count
25
+ node.last.line - node.line - 1
29
26
  end
30
27
  end
31
28
  end
@@ -21,7 +21,7 @@ module Roodi
21
21
 
22
22
  def evaluate(node)
23
23
  method_name = node[1]
24
- arguments = node[2][1][1]
24
+ arguments = node[2]
25
25
  parameter_count = arguments.inject(-1) { |count, each| count = count + (each.class == Symbol ? 1 : 0) }
26
26
  add_error "Method name \"#{method_name}\" has #{parameter_count} parameters. It should have #{@parameter_count} or less." unless parameter_count <= @parameter_count
27
27
  end
data/lib/roodi/core.rb CHANGED
@@ -1 +1 @@
1
- require 'roodi/core/parse_tree_runner'
1
+ require 'roodi/core/runner'
@@ -14,9 +14,8 @@ module Roodi
14
14
  end
15
15
 
16
16
  def visit(node)
17
- @last_newline = node if node.node_type == :newline
18
17
  checks = @checks[node.node_type]
19
- checks.each {|check| check.evaluate_node_at_line(node, @last_newline)} unless checks.nil?
18
+ checks.each {|check| check.evaluate_node(node)} unless checks.nil?
20
19
  nil
21
20
  end
22
21
  end
@@ -9,7 +9,7 @@ module Roodi
9
9
  visited.accept(@payload)
10
10
  visitable_nodes = visited.is_language_node? ? visited.sexp_body : visited
11
11
  visitable_nodes.each do |child|
12
- if child.class == VisitableSexp then
12
+ if child.class == Sexp then
13
13
  child.accept(self)
14
14
  end
15
15
  end
@@ -1,5 +1,5 @@
1
1
  require 'rubygems'
2
- require 'parse_tree'
2
+ require 'ruby_parser'
3
3
  require 'facets'
4
4
 
5
5
 
@@ -15,11 +15,8 @@ module Roodi
15
15
  private
16
16
 
17
17
  def silent_parse(content, filename)
18
- @parser ||= ParseTree.new(true)
19
- node = @parser.parse_tree_for_string(content, filename)
20
- sexp = VisitableSexp.from_array node
21
- sexp.filename = filename
22
- sexp
18
+ @parser ||= RubyParser.new
19
+ @parser.parse(content, filename)
23
20
  end
24
21
  end
25
22
  end
@@ -8,7 +8,7 @@ require 'roodi/core/visitable_sexp'
8
8
 
9
9
  module Roodi
10
10
  module Core
11
- class ParseTreeRunner
11
+ class Runner
12
12
  DEFAULT_CONFIG = File.join(File.dirname(__FILE__), "..", "..", "..", "roodi.yml")
13
13
 
14
14
  attr_writer :config
@@ -35,6 +35,7 @@ module Roodi
35
35
 
36
36
  def print(filename, content)
37
37
  node = @parser.parse(content, filename)
38
+ puts "Line: #{node.line}"
38
39
  pp node
39
40
  end
40
41
 
@@ -1,24 +1,20 @@
1
1
  require 'rubygems'
2
2
  require 'sexp'
3
3
 
4
- module Roodi
5
- module Core
6
- class VisitableSexp < Sexp
7
- def accept(visitor)
8
- visitor.visit(self)
9
- end
10
-
11
- def node_type
12
- first
13
- end
14
-
15
- def children
16
- sexp_body.select {|each| each.class == VisitableSexp }
17
- end
18
-
19
- def is_language_node?
20
- first.class == Symbol
21
- end
22
- end
4
+ class Sexp
5
+ def accept(visitor)
6
+ visitor.visit(self)
7
+ end
8
+
9
+ def node_type
10
+ first
11
+ end
12
+
13
+ def children
14
+ find_all { | sexp | Sexp === sexp }
15
+ end
16
+
17
+ def is_language_node?
18
+ first.class == Symbol
23
19
  end
24
20
  end
data/lib/roodi_task.rb CHANGED
@@ -18,7 +18,7 @@ class RoodiTask < Rake::TaskLib
18
18
  def define
19
19
  desc "Check for design issues in: #{patterns.join(', ')}"
20
20
  task name do
21
- runner = Roodi::Core::ParseTreeRunner.new
21
+ runner = Roodi::Core::Runner.new
22
22
 
23
23
  runner.config = config if config
24
24
 
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::AbcMetricMethodCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::AbcMetricMethodCheck.new({'score' => 0}))
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::AbcMetricMethodCheck.new({'score' => 0}))
6
6
  end
7
7
 
8
8
  def verify_content_score(content, a, b, c)
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::AssignmentInConditionalCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::AssignmentInConditionalCheck.new)
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::AssignmentInConditionalCheck.new)
6
6
  end
7
7
 
8
8
  it "should accept an assignment before an if clause" do
@@ -55,9 +55,7 @@ describe Roodi::Checks::AssignmentInConditionalCheck do
55
55
  end
56
56
 
57
57
  it "should reject an assignment inside a a ternary operator check clause" do
58
- content = <<-END
59
- call_foo (bar = bam) ? baz : bad
60
- END
58
+ content = 'call_foo (bar = bam) ? baz : bad'
61
59
  @roodi.check_content(content)
62
60
  errors = @roodi.errors
63
61
  errors.should_not be_empty
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::CaseMissingElseCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::CaseMissingElseCheck.new)
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::CaseMissingElseCheck.new)
6
6
  end
7
7
 
8
8
  it "should accept case statements that do have an else" do
@@ -27,6 +27,6 @@ describe Roodi::Checks::CaseMissingElseCheck do
27
27
  @roodi.check_content(content)
28
28
  errors = @roodi.errors
29
29
  errors.should_not be_empty
30
- errors[0].to_s.should eql("dummy-file.rb:1 - Case statement is missing an else clause.")
30
+ errors[0].to_s.should match(/dummy-file.rb:[1-2] - Case statement is missing an else clause./)
31
31
  end
32
32
  end
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::ClassLineCountCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::ClassLineCountCheck.new({'line_count' => 1}))
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::ClassLineCountCheck.new({'line_count' => 1}))
6
6
  end
7
7
 
8
8
  it "should accept classes with less lines than the threshold" do
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::ClassNameCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::ClassNameCheck.new)
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::ClassNameCheck.new)
6
6
  end
7
7
 
8
8
  it "should accept camel case class names starting in capitals" do
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::ClassVariableCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::ClassVariableCheck.new)
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::ClassVariableCheck.new)
6
6
  end
7
7
 
8
8
  it "should reject class variables" do
@@ -12,6 +12,6 @@ describe Roodi::Checks::ClassVariableCheck do
12
12
  @roodi.check_content(content)
13
13
  errors = @roodi.errors
14
14
  errors.should_not be_empty
15
- errors[0].to_s.should eql("dummy-file.rb:1 - Don't use class variables. You might want to try a different design.")
15
+ errors[0].to_s.should match(/dummy-file.rb:[1-2] - Don't use class variables. You might want to try a different design./)
16
16
  end
17
17
  end
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::ControlCouplingCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::ControlCouplingCheck.new)
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::ControlCouplingCheck.new)
6
6
  end
7
7
 
8
8
  it "should reject methods with if checks using a parameter" do
@@ -18,6 +18,6 @@ describe Roodi::Checks::ControlCouplingCheck do
18
18
  @roodi.check_content(content)
19
19
  errors = @roodi.errors
20
20
  errors.should_not be_empty
21
- errors[0].to_s.should eql("dummy-file.rb:2 - Method \"write\" uses the argument \"quoted\" for internal control.")
21
+ errors[0].to_s.should match(/dummy-file.rb:[2-3] - Method \"write\" uses the argument \"quoted\" for internal control./)
22
22
  end
23
23
  end
@@ -2,14 +2,14 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::CyclomaticComplexityBlockCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::CyclomaticComplexityBlockCheck.new({'complexity' => 0}))
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::CyclomaticComplexityBlockCheck.new({'complexity' => 0}))
6
6
  end
7
7
 
8
8
  def verify_content_complexity(content, complexity)
9
9
  @roodi.check_content(content)
10
10
  errors = @roodi.errors
11
11
  errors.should_not be_empty
12
- errors[0].to_s.should eql("dummy-file.rb:2 - Block cyclomatic complexity is #{complexity}. It should be 0 or less.")
12
+ errors[0].to_s.should match(/dummy-file.rb:[2-4] - Block cyclomatic complexity is #{complexity}. It should be 0 or less./)
13
13
  end
14
14
 
15
15
  it "should find a simple block" do
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::CyclomaticComplexityMethodCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::CyclomaticComplexityMethodCheck.new({'complexity' => 0}))
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::CyclomaticComplexityMethodCheck.new({'complexity' => 0}))
6
6
  end
7
7
 
8
8
  def verify_content_complexity(content, complexity)
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::EmptyRescueBodyCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::EmptyRescueBodyCheck.new)
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::EmptyRescueBodyCheck.new)
6
6
  end
7
7
 
8
8
  it "should accept a rescue body with content and no parameter" do
@@ -87,7 +87,7 @@ describe Roodi::Checks::EmptyRescueBodyCheck do
87
87
  @roodi.check_content(content)
88
88
  errors = @roodi.errors
89
89
  errors.should_not be_empty
90
- errors[0].to_s.should eql("dummy-file.rb:3 - Rescue block should not be empty.")
90
+ errors[0].to_s.should match(/dummy-file.rb:[3-4] - Rescue block should not be empty./)
91
91
  end
92
92
 
93
93
  it "should accept a rescue block with an explicit nil" do
@@ -109,6 +109,6 @@ describe Roodi::Checks::EmptyRescueBodyCheck do
109
109
  @roodi.check_content(content)
110
110
  errors = @roodi.errors
111
111
  errors.should_not be_empty
112
- errors[0].to_s.should eql("dummy-file.rb:3 - Rescue block should not be empty.")
112
+ errors[0].to_s.should match(/dummy-file.rb:[3-4] - Rescue block should not be empty./)
113
113
  end
114
114
  end
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::ForLoopCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::ForLoopCheck.new)
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::ForLoopCheck.new)
6
6
  end
7
7
 
8
8
  it "should reject for loops" do
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::MethodLineCountCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::MethodLineCountCheck.new({'line_count' => 1}))
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::MethodLineCountCheck.new({'line_count' => 1}))
6
6
  end
7
7
 
8
8
  it "should accept methods with less lines than the threshold" do
@@ -36,4 +36,21 @@ describe Roodi::Checks::MethodLineCountCheck do
36
36
  errors.should_not be_empty
37
37
  errors[0].to_s.should eql("dummy-file.rb:1 - Method \"two_line_method\" has 2 lines. It should have 1 or less.")
38
38
  end
39
+
40
+ it "should count only lines from the method" do
41
+ content = <<-END
42
+ def first_method
43
+ puts 1
44
+ end
45
+
46
+ def second_method
47
+ puts 1
48
+ puts 2
49
+ end
50
+ END
51
+ @roodi.check_content(content)
52
+ errors = @roodi.errors
53
+ errors.should_not be_empty
54
+ errors[0].to_s.should eql("dummy-file.rb:5 - Method \"second_method\" has 2 lines. It should have 1 or less.")
55
+ end
39
56
  end
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::MethodNameCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::MethodNameCheck.new)
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::MethodNameCheck.new)
6
6
  end
7
7
 
8
8
  it "should accept method names with underscores" do
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::ModuleLineCountCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::ModuleLineCountCheck.new({'line_count' => 1}))
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::ModuleLineCountCheck.new({'line_count' => 1}))
6
6
  end
7
7
 
8
8
  it "should accept modules with less lines than the threshold" do
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::ModuleNameCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::ModuleNameCheck.new)
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::ModuleNameCheck.new)
6
6
  end
7
7
 
8
8
  it "should accept camel case module names starting in capitals" do
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe Roodi::Checks::ParameterNumberCheck do
4
4
  before(:each) do
5
- @roodi = Roodi::Core::ParseTreeRunner.new(Roodi::Checks::ParameterNumberCheck.new({'parameter_count' => 1}))
5
+ @roodi = Roodi::Core::Runner.new(Roodi::Checks::ParameterNumberCheck.new({'parameter_count' => 1}))
6
6
  end
7
7
 
8
8
  it "should accept methods with less lines than the threshold" do
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.7
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marty Andrews
@@ -9,11 +9,11 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-06 00:00:00 +10:00
12
+ date: 2009-05-08 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: ParseTree
16
+ name: ruby_parser
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
@@ -87,8 +87,8 @@ files:
87
87
  - lib/roodi/core/checking_visitor.rb
88
88
  - lib/roodi/core/error.rb
89
89
  - lib/roodi/core/iterator_visitor.rb
90
- - lib/roodi/core/parse_tree_runner.rb
91
90
  - lib/roodi/core/parser.rb
91
+ - lib/roodi/core/runner.rb
92
92
  - lib/roodi/core/visitable_sexp.rb
93
93
  - lib/roodi_task.rb
94
94
  - roodi.yml