flog 4.1.1 → 4.1.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,10 @@
1
+ === 4.1.2 / 2013-09-05
2
+
3
+ * 2 bug fixes:
4
+
5
+ * Don't even record a score if method stack is empty and user used --methods-only.
6
+ * Fixed Flog task's default method. (jasonrobertfox)
7
+
1
8
  === 4.1.1 / 2013-07-11
2
9
 
3
10
  * 1 minor enhancement:
data/lib/flog.rb CHANGED
@@ -11,7 +11,7 @@ class File
11
11
  end
12
12
 
13
13
  class Flog < SexpProcessor
14
- VERSION = "4.1.1" # :nodoc:
14
+ VERSION = "4.1.2" # :nodoc:
15
15
 
16
16
  ##
17
17
  # Cut off point where the report should stop unless --all given.
@@ -110,6 +110,7 @@ class Flog < SexpProcessor
110
110
  # Spankings!
111
111
 
112
112
  def add_to_score name, score = OTHER_SCORES[name]
113
+ return if option[:methods] and method_stack.empty?
113
114
  @calls[signature][name] += score * @multiplier
114
115
  end
115
116
 
@@ -386,7 +387,6 @@ class Flog < SexpProcessor
386
387
  @totals = Hash.new(0)
387
388
 
388
389
  calls.each do |meth, tally|
389
- next if option[:methods] and meth =~ /##{@@no_method}$/
390
390
  score = score_method(tally)
391
391
 
392
392
  @totals[meth] = score
data/lib/flog_cli.rb CHANGED
@@ -175,8 +175,6 @@ class FlogCLI
175
175
  io.puts
176
176
 
177
177
  each_by_score max do |class_method, score, call_list|
178
- return 0 if option[:methods] and class_method =~ /##{no_method}/
179
-
180
178
  self.print_score io, class_method, score
181
179
 
182
180
  if option[:details] then
data/lib/flog_task.rb CHANGED
@@ -22,7 +22,7 @@ class FlogTask < Rake::TaskLib
22
22
  attr_accessor :verbose
23
23
 
24
24
  ##
25
- # Method to use to score. Defaults to :total
25
+ # Method to use to score. Defaults to :total_score
26
26
 
27
27
  attr_accessor :method
28
28
 
@@ -34,7 +34,7 @@ class FlogTask < Rake::TaskLib
34
34
  @name = name
35
35
  @dirs = dirs || %w(app bin lib spec test)
36
36
  @threshold = threshold
37
- @method = method || :total
37
+ @method = method || :total_score
38
38
  @verbose = Rake.application.options.trace
39
39
 
40
40
  yield self if block_given?
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flog
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 4
8
8
  - 1
9
- - 1
10
- version: 4.1.1
9
+ - 2
10
+ version: 4.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Davis
@@ -36,7 +36,7 @@ cert_chain:
36
36
  FBHgymkyj/AOSqKRIpXPhjC6
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2013-07-11 00:00:00 Z
39
+ date: 2013-09-05 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sexp_processor
@@ -114,11 +114,11 @@ dependencies:
114
114
  requirements:
115
115
  - - ~>
116
116
  - !ruby/object:Gem::Version
117
- hash: 11
117
+ hash: 9
118
118
  segments:
119
119
  - 3
120
- - 6
121
- version: "3.6"
120
+ - 7
121
+ version: "3.7"
122
122
  type: :development
123
123
  version_requirements: *id005
124
124
  description: |-
@@ -149,8 +149,8 @@ files:
149
149
  - test/test_flog_cli.rb
150
150
  - .gemtest
151
151
  homepage: http://ruby.sadi.st/
152
- licenses: []
153
-
152
+ licenses:
153
+ - MIT
154
154
  post_install_message:
155
155
  rdoc_options:
156
156
  - --main
metadata.gz.sig CHANGED
Binary file