code_statistics 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -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.4"
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-28}
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
- puts " Code LOC: #{code} Test LOC: #{tests} Code to Test Ratio: 1:#{sprintf("%.1f", tests.to_f/code)}"
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
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-28 00:00:00 -04:00
12
+ date: 2009-10-29 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency