metric_fu-roodi 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -6
- data/TODO.md +3 -0
- data/lib/roodi/checks/line_count_check.rb +8 -2
- data/lib/roodi/version.rb +1 -1
- metadata +9 -2
data/Rakefile
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require 'bundler/setup'
|
2
3
|
require 'bundler/gem_tasks'
|
3
4
|
begin
|
4
5
|
require 'spec/rake/spectask'
|
@@ -21,11 +22,6 @@ def roodi(ruby_files)
|
|
21
22
|
puts "\nFound #{roodi.errors.size} errors."
|
22
23
|
end
|
23
24
|
|
24
|
-
desc "Run all specs"
|
25
|
-
Spec::Rake::SpecTask.new('spec') do |t|
|
26
|
-
t.spec_files = FileList['spec/**/*spec.rb']
|
27
|
-
end
|
28
|
-
|
29
25
|
desc "Run Roodi against all source files"
|
30
26
|
task :roodi do
|
31
27
|
pattern = File.join(File.dirname(__FILE__), "**", "*.rb")
|
data/TODO.md
ADDED
@@ -3,7 +3,7 @@ require 'roodi/checks/check'
|
|
3
3
|
module Roodi
|
4
4
|
module Checks
|
5
5
|
class LineCountCheck < Check
|
6
|
-
|
6
|
+
|
7
7
|
attr_accessor :line_count
|
8
8
|
|
9
9
|
def evaluate_start(node)
|
@@ -12,9 +12,15 @@ module Roodi
|
|
12
12
|
end
|
13
13
|
|
14
14
|
protected
|
15
|
-
|
15
|
+
|
16
16
|
def count_lines(node)
|
17
17
|
node.last.line - node.line - 1
|
18
|
+
rescue NoMethodError => e
|
19
|
+
if ENV['DEBUG'] =~ /true/i
|
20
|
+
STDERR.puts "!! line counting error #{e.message}\t #{node.inspect}"
|
21
|
+
STDERR.puts "!! Does the node have any lines?"
|
22
|
+
end
|
23
|
+
0
|
18
24
|
end
|
19
25
|
|
20
26
|
end
|
data/lib/roodi/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metric_fu-roodi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby_parser
|
@@ -42,6 +42,7 @@ files:
|
|
42
42
|
- Manifest.txt
|
43
43
|
- README.txt
|
44
44
|
- Rakefile
|
45
|
+
- TODO.md
|
45
46
|
- bin/metric_fu-roodi
|
46
47
|
- bin/metric_fu-roodi-describe
|
47
48
|
- lib/roodi.rb
|
@@ -113,12 +114,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
113
114
|
- - ! '>='
|
114
115
|
- !ruby/object:Gem::Version
|
115
116
|
version: '0'
|
117
|
+
segments:
|
118
|
+
- 0
|
119
|
+
hash: 2672130625479100514
|
116
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
121
|
none: false
|
118
122
|
requirements:
|
119
123
|
- - ! '>='
|
120
124
|
- !ruby/object:Gem::Version
|
121
125
|
version: '0'
|
126
|
+
segments:
|
127
|
+
- 0
|
128
|
+
hash: 2672130625479100514
|
122
129
|
requirements: []
|
123
130
|
rubyforge_project:
|
124
131
|
rubygems_version: 1.8.24
|