flog 4.6.2 → 4.6.3

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
  SHA256:
3
- metadata.gz: b0fc313dc7f3892e2ac94b838dc0b6aeaf7930e7594f182a0ddebec2c540da7b
4
- data.tar.gz: 663fc807ac517de1f01a6ac633b0a76b3a4a8f70590a2bdc76d09d0c2ef0ef5e
3
+ metadata.gz: 71073335bad47948fc2c595a09ae883aeb2fbc119056c9ddd9922c374d278199
4
+ data.tar.gz: 5c224d4e435702cd05363f78a5103139f43aed18a6e257c50f6917215bdd2ffa
5
5
  SHA512:
6
- metadata.gz: 7c18ca2c0517e1d9d0b618216d6385fbe1c7e28e9f10bd64455e0c70b68424a9e74f8aebe98e6487486a6d50550acf5d2210fc87378f54073e7db8d918acd398
7
- data.tar.gz: 0a19ae61b73cb0f91ccbf245aeb2853e27f0765fc10586f1b6b333e71e3d97534a030a30c68a169f2a1f4e15d1433edb3c84b07cfb5ec19d1f4845f62bce8b6a
6
+ metadata.gz: da67084a75b7bbff54bb536abaeaac2b63be971cd1d11b74cafd340175b70a2a0d149d840300cd920100c2e691d5e68ed95a72f8fe1c80602def3647f761c0d3
7
+ data.tar.gz: 2b2b77800a343ae038ebe6499720bc7fcc18f3fff899c07c5d14c011f1456d4d2d8bceab33da9ce6ceff8d7c96d907942842696812081d0d1bd7293ff9357bd7
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,14 @@
1
+ === 4.6.3 / 2019-09-14
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Removed --18 and --19 options to cmdline. No real value anymore.
6
+
7
+ * 2 bug fixes:
8
+
9
+ * Fixed some sexp access under STRICT_SEXP=2.
10
+ * Fixed option / arg processing bug that caused a hang (reading from stdin).
11
+
1
12
  === 4.6.2 / 2018-02-14
2
13
 
3
14
  * 1 bug fix:
@@ -11,7 +11,7 @@ class File
11
11
  end
12
12
 
13
13
  class Flog < MethodBasedSexpProcessor
14
- VERSION = "4.6.2" # :nodoc:
14
+ VERSION = "4.6.3" # :nodoc:
15
15
 
16
16
  ##
17
17
  # Cut off point where the report should stop unless --all given.
@@ -143,10 +143,12 @@ class Flog < MethodBasedSexpProcessor
143
143
  def dsl_name? args
144
144
  return false unless args and not args.empty?
145
145
 
146
- first_arg = args.first
147
- first_arg = first_arg[1] if first_arg[0] == :hash
146
+ first_arg, = args
147
+ first_arg = first_arg[1] if first_arg.sexp_type == :hash
148
148
 
149
- [:lit, :str].include? first_arg[0] and first_arg[1]
149
+ type, value, * = first_arg
150
+
151
+ value if [:lit, :str].include? type
150
152
  end
151
153
 
152
154
  ##
@@ -362,7 +364,7 @@ class Flog < MethodBasedSexpProcessor
362
364
 
363
365
  add_to_score :block_pass
364
366
 
365
- case arg.first
367
+ case arg.sexp_type
366
368
  when :lvar, :dvar, :ivar, :cvar, :self, :const, :colon2, :nil then # f(&b)
367
369
  # do nothing
368
370
  when :lit, :call then # f(&:b)
@@ -455,7 +457,7 @@ class Flog < MethodBasedSexpProcessor
455
457
  exp.delete 0 # { || ... } has 0 in arg slot
456
458
 
457
459
  if context == [:block, :iter] or context == [:iter] then
458
- recv = exp.first
460
+ recv, = exp
459
461
 
460
462
  # DSL w/ names. eg task :name do ... end
461
463
  # looks like s(:call, nil, :task, s(:lit, :name))
@@ -19,11 +19,11 @@ class FlogCLI
19
19
  expander = PathExpander.new args, "**/*.{rb,rake}"
20
20
  files = expander.process
21
21
 
22
+ options = parse_options args
23
+
22
24
  abort "no files or stdin (-) to process, aborting." if
23
25
  files.empty? and args.empty?
24
26
 
25
- options = parse_options args
26
-
27
27
  flogger = new options
28
28
  flogger.flog(*files)
29
29
  flogger.report
@@ -131,14 +131,6 @@ class FlogCLI
131
131
  option[:verbose] = true
132
132
  end
133
133
 
134
- opts.on("--18", "Use a ruby 1.8 parser.") do
135
- option[:parser] = Ruby18Parser
136
- end
137
-
138
- opts.on("--19", "Use a ruby 1.9 parser.") do
139
- option[:parser] = Ruby19Parser
140
- end
141
-
142
134
  next if self.plugins.empty?
143
135
  opts.separator "Plugin options:"
144
136
 
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.6.2
4
+ version: 4.6.3
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
- MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE3MTEyMTIxMTExMFoXDTE4MTEyMTIxMTExMFowRTETMBEGA1UE
15
+ GRYDY29tMB4XDTE4MTIwNDIxMzAxNFoXDTE5MTIwNDIxMzAxNFowRTETMBEGA1UE
16
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
17
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
18
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
@@ -21,15 +21,15 @@ cert_chain:
21
21
  GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
22
22
  qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
23
23
  gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
24
- HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
25
- AQAfAXSQpsW7YSxd1csRtA/M4Zt0AMXFMd76GJ8Lgtg8G0+VFbdChRyDuDb0kPlW
26
- h9QQX/YABfCW8vxmssbMGrP+VGBAn7BbdTcfTlgCWrvMX1uL5aRL74nA4urKXqdW
27
- a0nP70K4958P3GffBdtE3KGkU5xstFnXGajxuBRnL66E15KU0BNehVxdG258bdPu
28
- EKN6MqBPftFiev3tuwqDV11r2GquDpniYcT+Mi8/PgeAgVT/afBeVgbB3KaZeTRR
29
- AhXhF6Wi2GTMezlj5jlI5XV7WsJUSwTp/YiVvcmT74ZaCRvexm6EnNhkrvJJ1Xeu
30
- V+HB+LYYhXWitInO/eXxDrFB
24
+ HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
25
+ AQCbJwLmpJR2PomLU+Zzw3KRzH/hbyUWc/ftru71AopZ1fy4iY9J/BW5QYKVYwbP
26
+ V0FSBWtvfI/RdwfKGtuGhPKECZgmLieGuZ3XCc09qPu1bdg7i/tu1p0t0c6163ku
27
+ nDMDIC/t/DAFK0TY9I3HswuyZGbLW7rgF0DmiuZdN/RPhHq2pOLMLXJmFclCb/im
28
+ 9yToml/06TJdUJ5p64mkBs0TzaK66DIB1Smd3PdtfZqoRV+EwaXMdx0Hb3zdR1JR
29
+ Em82dBUFsipwMLCYj39kcyHWAxyl6Ae1Cn9r/ItVBCxoeFdrHjfavnrIEoXUt4bU
30
+ UfBugfLD19bu3nvL+zTAGx/U
31
31
  -----END CERTIFICATE-----
32
- date: 2018-02-14 00:00:00.000000000 Z
32
+ date: 2019-09-15 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: sexp_processor
@@ -49,22 +49,22 @@ dependencies:
49
49
  name: ruby_parser
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.1'
55
52
  - - ">"
56
53
  - !ruby/object:Gem::Version
57
54
  version: 3.1.0
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '3.1'
58
58
  type: :runtime
59
59
  prerelease: false
60
60
  version_requirements: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - "~>"
63
- - !ruby/object:Gem::Version
64
- version: '3.1'
65
62
  - - ">"
66
63
  - !ruby/object:Gem::Version
67
64
  version: 3.1.0
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '3.1'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: path_expander
70
70
  requirement: !ruby/object:Gem::Requirement
@@ -83,30 +83,36 @@ dependencies:
83
83
  name: rdoc
84
84
  requirement: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - "~>"
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '4.0'
89
+ - - "<"
90
+ - !ruby/object:Gem::Version
91
+ version: '7'
89
92
  type: :development
90
93
  prerelease: false
91
94
  version_requirements: !ruby/object:Gem::Requirement
92
95
  requirements:
93
- - - "~>"
96
+ - - ">="
94
97
  - !ruby/object:Gem::Version
95
98
  version: '4.0'
99
+ - - "<"
100
+ - !ruby/object:Gem::Version
101
+ version: '7'
96
102
  - !ruby/object:Gem::Dependency
97
103
  name: hoe
98
104
  requirement: !ruby/object:Gem::Requirement
99
105
  requirements:
100
106
  - - "~>"
101
107
  - !ruby/object:Gem::Version
102
- version: '3.16'
108
+ version: '3.18'
103
109
  type: :development
104
110
  prerelease: false
105
111
  version_requirements: !ruby/object:Gem::Requirement
106
112
  requirements:
107
113
  - - "~>"
108
114
  - !ruby/object:Gem::Version
109
- version: '3.16'
115
+ version: '3.18'
110
116
  description: |-
111
117
  Flog reports the most tortured code in an easy to read pain
112
118
  report. The higher the score, the more pain the code is in.
@@ -153,8 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
159
  - !ruby/object:Gem::Version
154
160
  version: '0'
155
161
  requirements: []
156
- rubyforge_project:
157
- rubygems_version: 2.7.3
162
+ rubygems_version: 3.0.6
158
163
  signing_key:
159
164
  specification_version: 4
160
165
  summary: Flog reports the most tortured code in an easy to read pain report
metadata.gz.sig CHANGED
Binary file