flog 4.4.0 → 4.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25fa9b8cb31c93fceda987510781fe35652fde29
4
- data.tar.gz: af74743f09f07af514a3a0f449eafd2ed0491b8f
3
+ metadata.gz: 25570bc5a9d0e4c1bd0be4066b82450fe306857a
4
+ data.tar.gz: 4df978db752868708d195bb57717244542622374
5
5
  SHA512:
6
- metadata.gz: 43271946cdbbb803730059201ac21e1ba3c83764256b54251a6b7fd5e97eaf14fa810636e25e77b5182b6f135bf4b872b76f1ceb2180b2fc749f7fe47f5d99f0
7
- data.tar.gz: d68f5e52e637dd54597c28e980b97874e148f67986ca33fffc03541a84512f106ada386fe483c43e87d852ec843e6d2466ebd9db4e35eb690c8b76062ed77f97
6
+ metadata.gz: c973cad9e58b768fe16978c12ba7f57d5c3f7d58c106396c658603e676ee5286f45439c5d3a713381fae1e641ec1c9388cd3f2216439a430b9d6b98750cd1f53
7
+ data.tar.gz: de4f54a09feebedec996d743234d572744cab8805ccd84bb253bae815101efd586c19f1ff01f325b7165d757b69c8580d5e27565a347a46334d94cbfe10e5125
checksums.yaml.gz.sig CHANGED
@@ -1,4 +1,3 @@
1
- :�1�_6���;b3���uc��^C悽4��C��|�
2
- }���>��/K��/Hέc4�͉�7�����).
3
- Ek�����Zx���4]G3V!(izy��v���!����"Yi��k��'LP}'Ed�%&^CU��+.U��x�=�ܛ��rԌޠ�}{�/�AƊN��S:��URs�� 8Qq���sc�{���(�� �GAy]W��
4
- ��P�-������.j����
1
+ ��D"�4�5��O�V�;��#�`%��1
2
+ a�����Ɠ�r��v&�����?z�����C�r�7��>����G�m���D�jӃb�|� Z�_� �^hX�{*��Z��f�boK$k�ꋒ ������.��ṽ-��%�
3
+ !st��������i*���H��Rdr+.��Y�]$�����$pX#Z?�;��Ư:7|�TZL�1vl�6��U̘4���Td�k��fT��TJJ0VZ+C�!�
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- jKK��1̕�)�Ԧy���[�_̱vR�����P�cF b�9��1?bC�z���]0���D�.Yf8I�USK��|�����������t(ݑ��29�jT�R/1ͣ.̈́��>������v��5A���\G�9�<��"f�� ~�����$�,J&�q�����(+_��eo��
2
- N��ڿ�PF�a�Ӊ�gH#mi�ku����5�����D��B���I�.�@�|aiH�۴^�vp�3��0¤c
1
+ &�&�c��{���J���m bn���#}9bErBC԰@<�V��T3hJG&=J��gK
2
+ ^g(އ�K%XN��Y�
data/History.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ === 4.4.1 / 2017-01-13
2
+
3
+ * 1 bug fix:
4
+
5
+ * Fixed scoring of Rational lits.
6
+
1
7
  === 4.4.0 / 2016-05-16
2
8
 
3
9
  * 1 minor enhancement:
data/Rakefile CHANGED
@@ -20,6 +20,8 @@ Hoe.spec 'flog' do
20
20
  self.flog_method = :max_method
21
21
  self.flog_threshold = timebomb 150, 50, '2013-11-01', '2012-11-01'
22
22
 
23
+ license "MIT"
24
+
23
25
  dependency "sexp_processor", "~> 4.4"
24
26
  dependency "ruby_parser", ["~> 3.1", "> 3.1.0"]
25
27
  dependency "path_expander", "~> 1.0"
@@ -41,6 +43,13 @@ task :debug do
41
43
  flog.option[:details] = true if details
42
44
 
43
45
  if file then
46
+ if File.directory? file then # quick hack to get directory scanning going
47
+ argv = [file]
48
+ argv.unshift "-v" if ENV["V"]
49
+
50
+ FlogCLI.run argv
51
+ exit 0
52
+ end
44
53
  flog.flog file
45
54
  else
46
55
  flog.flog_ruby ruby, "-"
data/lib/flog.rb CHANGED
@@ -11,7 +11,7 @@ class File
11
11
  end
12
12
 
13
13
  class Flog < MethodBasedSexpProcessor
14
- VERSION = "4.4.0" # :nodoc:
14
+ VERSION = "4.4.1" # :nodoc:
15
15
 
16
16
  ##
17
17
  # Cut off point where the report should stop unless --all given.
@@ -483,18 +483,20 @@ class Flog < MethodBasedSexpProcessor
483
483
  s()
484
484
  end
485
485
 
486
+ Rational = Integer unless defined? Rational # 1.8 / 1.9
487
+
486
488
  def process_lit(exp)
487
489
  value = exp.shift
488
490
  case value
489
491
  when 0, -1 then
490
492
  # ignore those because they're used as array indicies instead of
491
493
  # first/last
492
- when Integer then
494
+ when Integer, Rational then
493
495
  add_to_score :lit_fixnum
494
496
  when Float, Symbol, Regexp, Range then
495
497
  # do nothing
496
498
  else
497
- raise value.inspect
499
+ raise "Unhandled lit: #{value.inspect}:#{value.class}"
498
500
  end
499
501
  s()
500
502
  end
data/test/test_flog.rb CHANGED
@@ -532,7 +532,7 @@ class TestFlog < FlogTest
532
532
 
533
533
  def test_no_threshold
534
534
  @flog.option[:all] = true
535
- assert_equal nil, @flog.threshold
535
+ assert_nil @flog.threshold
536
536
  end
537
537
 
538
538
  def test_calculate
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flog
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0
4
+ version: 4.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDijCCAnKgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE1MDkxOTIwNTEyMloXDTE2MDkxODIwNTEyMlowRTETMBEGA1UE
15
+ GRYDY29tMB4XDTE2MDkyNjAxNTczNVoXDTE3MDkyNjAxNTczNVowRTETMBEGA1UE
16
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
17
  JomT8ixkARkWA2NvbTCC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VyLmNvbTANBgkqhkiG9w0BAQUFAAOCAQEAIGzgp0aZ2W9+v96ujmBcQHoC
27
+ buy0iU68MVj2VlxMyfr1KPZIh1OyhU4UO4zrkREcH8ML70v9cYHNvOd9oynRHnvC
28
+ l2tj/fD3YJ0AEkJxGrYwRWQmvMfC4bJ02bC1+rVOUIXXKp3+cUmiN4sTniof8VFo
29
+ bo/YYP4c7erpERa+9hrqygg6WQbJlk2YRlH3JXPFjmu869i2dcbR5ZLOAeEy+axH
30
+ E4oJcnPkJAr0rw504JGtlZtONZQblwmRJOIdXzolaE3NRGUzGVOUSptZppAKiavY
31
+ fO6tdKQc/5RfA8oQEkg8hrxA5PQSz4TOFJGLpFvIapEk6tMruQ0bHgkhr9auXg==
31
32
  -----END CERTIFICATE-----
32
- date: 2016-05-16 00:00:00.000000000 Z
33
+ date: 2017-01-13 00:00:00.000000000 Z
33
34
  dependencies:
34
35
  - !ruby/object:Gem::Dependency
35
36
  name: sexp_processor
36
37
  requirement: !ruby/object:Gem::Requirement
37
38
  requirements:
38
- - - ~>
39
+ - - "~>"
39
40
  - !ruby/object:Gem::Version
40
41
  version: '4.4'
41
42
  type: :runtime
42
43
  prerelease: false
43
44
  version_requirements: !ruby/object:Gem::Requirement
44
45
  requirements:
45
- - - ~>
46
+ - - "~>"
46
47
  - !ruby/object:Gem::Version
47
48
  version: '4.4'
48
49
  - !ruby/object:Gem::Dependency
49
50
  name: ruby_parser
50
51
  requirement: !ruby/object:Gem::Requirement
51
52
  requirements:
52
- - - ~>
53
+ - - "~>"
53
54
  - !ruby/object:Gem::Version
54
55
  version: '3.1'
55
- - - '>'
56
+ - - ">"
56
57
  - !ruby/object:Gem::Version
57
58
  version: 3.1.0
58
59
  type: :runtime
59
60
  prerelease: false
60
61
  version_requirements: !ruby/object:Gem::Requirement
61
62
  requirements:
62
- - - ~>
63
+ - - "~>"
63
64
  - !ruby/object:Gem::Version
64
65
  version: '3.1'
65
- - - '>'
66
+ - - ">"
66
67
  - !ruby/object:Gem::Version
67
68
  version: 3.1.0
68
69
  - !ruby/object:Gem::Dependency
69
70
  name: path_expander
70
71
  requirement: !ruby/object:Gem::Requirement
71
72
  requirements:
72
- - - ~>
73
+ - - "~>"
73
74
  - !ruby/object:Gem::Version
74
75
  version: '1.0'
75
76
  type: :runtime
76
77
  prerelease: false
77
78
  version_requirements: !ruby/object:Gem::Requirement
78
79
  requirements:
79
- - - ~>
80
+ - - "~>"
80
81
  - !ruby/object:Gem::Version
81
82
  version: '1.0'
82
83
  - !ruby/object:Gem::Dependency
83
84
  name: rdoc
84
85
  requirement: !ruby/object:Gem::Requirement
85
86
  requirements:
86
- - - ~>
87
+ - - "~>"
87
88
  - !ruby/object:Gem::Version
88
89
  version: '4.0'
89
90
  type: :development
90
91
  prerelease: false
91
92
  version_requirements: !ruby/object:Gem::Requirement
92
93
  requirements:
93
- - - ~>
94
+ - - "~>"
94
95
  - !ruby/object:Gem::Version
95
96
  version: '4.0'
96
97
  - !ruby/object:Gem::Dependency
97
98
  name: hoe
98
99
  requirement: !ruby/object:Gem::Requirement
99
100
  requirements:
100
- - - ~>
101
+ - - "~>"
101
102
  - !ruby/object:Gem::Version
102
- version: '3.15'
103
+ version: '3.16'
103
104
  type: :development
104
105
  prerelease: false
105
106
  version_requirements: !ruby/object:Gem::Requirement
106
107
  requirements:
107
- - - ~>
108
+ - - "~>"
108
109
  - !ruby/object:Gem::Version
109
- version: '3.15'
110
+ version: '3.16'
110
111
  description: |-
111
112
  Flog reports the most tortured code in an easy to read pain
112
113
  report. The higher the score, the more pain the code is in.
@@ -120,7 +121,7 @@ extra_rdoc_files:
120
121
  - Manifest.txt
121
122
  - README.rdoc
122
123
  files:
123
- - .autotest
124
+ - ".autotest"
124
125
  - History.rdoc
125
126
  - Manifest.txt
126
127
  - README.rdoc
@@ -138,23 +139,23 @@ licenses:
138
139
  metadata: {}
139
140
  post_install_message:
140
141
  rdoc_options:
141
- - --main
142
+ - "--main"
142
143
  - README.rdoc
143
144
  require_paths:
144
145
  - lib
145
146
  required_ruby_version: !ruby/object:Gem::Requirement
146
147
  requirements:
147
- - - '>='
148
+ - - ">="
148
149
  - !ruby/object:Gem::Version
149
150
  version: '0'
150
151
  required_rubygems_version: !ruby/object:Gem::Requirement
151
152
  requirements:
152
- - - '>='
153
+ - - ">="
153
154
  - !ruby/object:Gem::Version
154
155
  version: '0'
155
156
  requirements: []
156
157
  rubyforge_project:
157
- rubygems_version: 2.4.5
158
+ rubygems_version: 2.6.8
158
159
  signing_key:
159
160
  specification_version: 4
160
161
  summary: Flog reports the most tortured code in an easy to read pain report
metadata.gz.sig CHANGED
Binary file