code_statistics 0.1.4 → 0.1.5
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/VERSION +1 -1
- data/code_statistics.gemspec +2 -2
- data/lib/code_statistics/code_statistics.rb +6 -1
- metadata +2 -2
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.5
|
data/code_statistics.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{code_statistics}
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.5"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Dan Mayer"]
|
|
12
|
-
s.date = %q{2009-10-
|
|
12
|
+
s.date = %q{2009-10-29}
|
|
13
13
|
s.description = %q{"This is a port of the rails 'rake stats' method so it can be made more robust and work for non rails projects. New features may eventually be added as well."}
|
|
14
14
|
s.email = %q{dan@devver.net}
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -130,7 +130,12 @@ module CodeStatistics
|
|
|
130
130
|
code = calculate_code
|
|
131
131
|
tests = calculate_tests
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
ratio = if code!=0
|
|
134
|
+
#{sprintf("%.1f", tests.to_f/code)}
|
|
135
|
+
else
|
|
136
|
+
"0"
|
|
137
|
+
end
|
|
138
|
+
puts " Code LOC: #{code} Test LOC: #{tests} Code to Test Ratio: 1:#{ratio}"
|
|
134
139
|
puts ""
|
|
135
140
|
end
|
|
136
141
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: code_statistics
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dan Mayer
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-10-
|
|
12
|
+
date: 2009-10-29 00:00:00 -04:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|