metric_fu 4.7.2 → 4.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c6609b8b2f3f1b288dbbd391ffd0f7548bd3e202
4
- data.tar.gz: d11c89b1d760cd87d5bf080a5becc5b9618d5f77
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZjM3MzJkYjE2Yzc0NzFhMGUzNWM0NDhkOWQ5MGEzNWQzMWMxMTBlOQ==
5
+ data.tar.gz: !binary |-
6
+ ZDIzMzBmYjZhOTQyMWM2OTIxMTI3ZjUxNTQzMjNiNWU1MGM2OThkZA==
5
7
  SHA512:
6
- metadata.gz: 7617be07d98b212407966904330efa61bd069c4fbec1d7a41c80deec88d88067be33b21275a1545910eb4998593313aee241ddc4c00e6a3c70ce36b7072953f7
7
- data.tar.gz: 7bfb8ed55f600b1a4676db9d55d5720af968da181966aa5530b778558fd3eceedd4dc11759830606e5dfa2dbde914a4eb26074f3c8e88bcb6c9d2fce81f9369a
8
+ metadata.gz: !binary |-
9
+ MDNkMTYzNjBlMGE4NGM0ZmU5OWQ2YmNkNGQ0YjVlYTE5YmM0ZjE1NGVhZmMx
10
+ YTQ2YzU5MjdlNTA5MDEwOGFiZDBhZTExNzJjNzU0MDM3OGY3YmNiYTJlMjJl
11
+ NjkzMTNmY2ZjNTlhOGI2ZDI1YzQ5ZjZiYTVkM2U5NzIwN2I3Yjc=
12
+ data.tar.gz: !binary |-
13
+ NTg4ZDMwOTQwODJiNjI5NGIzMzY5ODMyNzZlNDUwOTdjZDk5MDFlNmJlOTM1
14
+ ZDcxNTlhNWY1NDE0OWY5MzVhYjUyMWY4MzEyYjQyMmU4ZGM2ZWM2MWQzYjQ3
15
+ NmFmMjYwOTZlYzM3ODY3OTllY2M0NDA5NzFhM2VkYTliMzIxNWY=
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/.travis.yml CHANGED
@@ -9,6 +9,7 @@ before_install:
9
9
  # env:
10
10
  # - "rack=1.3.4"
11
11
  rvm:
12
+ - 2.1.0
12
13
  - 2.0.0
13
14
  - 1.9.3
14
15
  # - 1.9.2 # code_metric 0.1.0 requires ruby 1.9.3 or greater
data/HISTORY.md CHANGED
@@ -4,13 +4,22 @@ Each change should fall into categories that would affect whether the release is
4
4
 
5
5
  As such, a _Feature_ would map to either major or minor. A _bug fix_ to a patch. And _misc_ is either minor or patch, the difference being kind of fuzzy for the purposes of history. Adding tests would be patch level.
6
6
 
7
- ### Master [changes](https://github.com/metricfu/metric_fu/compare/v4.7.2...master)
7
+ ### Master [changes](https://github.com/metricfu/metric_fu/compare/v4.7.3...master)
8
8
 
9
9
  * Breaking Changes
10
10
  * Features
11
11
  * Fixes
12
12
  * Misc
13
13
 
14
+ ### [4.7.3 / 2014-02-09](https://github.com/metricfu/metric_fu/compare/v4.7.2...v4.7.3)
15
+
16
+ * Fixes
17
+ * Add `strip_escape_codes`; remove from Roodi output. (Przemysław Dąbek, #197)
18
+ * Misc
19
+ * Fix markdown in README. (Guilherme Simões, #198)
20
+ * Add Ruby 2.1 to Travis CI build. (Michael Stark , #200)
21
+
22
+
14
23
  ### [4.7.2 / 2014-01-21](https://github.com/metricfu/metric_fu/compare/v4.7.1...v4.7.2)
15
24
 
16
25
  * Fixes
data/README.md CHANGED
@@ -196,7 +196,7 @@ This is the official repository for metric_fu. The original repository by Jake
196
196
  * [Reek](https://rubygems.org/gems/reek) [Source](https://github.com/troessner/reek)
197
197
  * [Roodi](https://rubygems.org/gems/roodi), [Source](https://github.com/roodi/roodi)
198
198
  * [Saikuro](https://rubygems.org/gems/metric_fu-Saikuro), [Source](https://github.com/metricfu/Saikuro)
199
- [Code Statistics](https://rubygems.org/gems/code_metrics), [Source](https://github.com/bf4/code_metrics) )
199
+ * [Code Statistics](https://rubygems.org/gems/code_metrics), [Source](https://github.com/bf4/code_metrics)
200
200
  * Rails-only
201
201
  * [Rails Best Practices](https://rubygems.org/gems/rails_best_practices), [Source](https://github.com/railsbp/rails_best_practices)
202
202
  * Test Coverage
@@ -1 +1 @@
1
- b2ddfe5790f9f70a13b468dd588a2397b171c813d34315ee91ab2f2e64ec5b0297a256e77fec3c00d0139cfee93fe64ee8916f42e50d299871594b627eaf24de
1
+ ad47170c438b84335051bae41480a00dec428e1f755a70813364c6232f43d16c15c55813ffb555e5236189360fe84bfcbe194e6cd54b304d3b2688985b3609ac
@@ -14,6 +14,7 @@ module MetricFu
14
14
  end
15
15
 
16
16
  def analyze
17
+ @output = MetricFu::Utility.strip_escape_codes(@output)
17
18
  @matches = @output.chomp.split("\n").map{|m| m.split(" - ") }
18
19
  total = @matches.pop
19
20
  @matches.reject! {|array| array.empty? }
@@ -4,6 +4,8 @@ module MetricFu
4
4
  module Utility
5
5
  module_function
6
6
 
7
+ ESCAPE_CODES_PATTERN = Regexp.new('\e\[\d{1,2}m')
8
+
7
9
  # Removes non-ASCII characters
8
10
  def clean_ascii_text(text)
9
11
  if text.respond_to?(:encode)
@@ -17,6 +19,10 @@ module MetricFu
17
19
  end
18
20
  end
19
21
 
22
+ def strip_escape_codes(text)
23
+ text.gsub(ESCAPE_CODES_PATTERN, '')
24
+ end
25
+
20
26
  def rm_rf(*args)
21
27
  FileUtils.rm_rf(*args)
22
28
  end
@@ -1,3 +1,3 @@
1
1
  module MetricFu
2
- VERSION = '4.7.2'
2
+ VERSION = '4.7.3'
3
3
  end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+ require 'metric_fu/utility'
3
+
4
+ describe MetricFu::Utility do
5
+ it 'strips ANSI escape codes from text' do
6
+ text = "\e[31m./app/models/account.rb:64 - Found = in conditional. It should probably be an ==\e[0m"
7
+ output = "./app/models/account.rb:64 - Found = in conditional. It should probably be an =="
8
+
9
+ result = MetricFu::Utility.strip_escape_codes(text)
10
+ expect(result).to eq(output)
11
+ end
12
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metric_fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.2
4
+ version: 4.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Scruggs
@@ -19,36 +19,43 @@ authors:
19
19
  autorequire:
20
20
  bindir: bin
21
21
  cert_chain:
22
- - |
23
- -----BEGIN CERTIFICATE-----
24
- MIIDjjCCAnagAwIBAgIBATANBgkqhkiG9w0BAQUFADBGMQwwCgYDVQQDDANkZXYx
25
- ITAfBgoJkiaJk/IsZAEZFhFiZW5qYW1pbmZsZWlzY2hlcjETMBEGCgmSJomT8ixk
26
- ARkWA2NvbTAeFw0xMzExMDcyMTQ0MDBaFw0xNDExMDcyMTQ0MDBaMEYxDDAKBgNV
27
- BAMMA2RldjEhMB8GCgmSJomT8ixkARkWEWJlbmphbWluZmxlaXNjaGVyMRMwEQYK
28
- CZImiZPyLGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
29
- ncZFu7VMbliIBhiGj6J5aKXSuHF6gXZuA8gkpgM7dgVzkLhuud6hSYXoC8UZIr+M
30
- N9hvV/F2F3gLlj2J7aLHr8C0for4KVjc5N/b249vGoH9nIl0qZVE3qI+R7MIdYlO
31
- ONoeHgiymSKyssCzGFRzv8ZVrpWuUmcB3qixb6d2aiv1kcsZZnLjY4EO5jVW9X92
32
- d9VMuNdYYtZ0l88prmUM+1fVfaDdY+KGrigeffHUGD0j7pHOZnRCYKwGHG/7Nkg8
33
- 0vEtYVBKSpHIQThBMWXIQu69gIpr6AmQd/kVnhejAdQgvsDz43n9h5iZvrwcedWY
34
- x2wz+FrUdJzZZhitUFGrnwIDAQABo4GGMIGDMAkGA1UdEwQCMAAwCwYDVR0PBAQD
35
- AgSwMB0GA1UdDgQWBBTGwGJtyo8nUoRuxbYfcI5bzuHL3zAkBgNVHREEHTAbgRlk
36
- ZXZAYmVuamFtaW5mbGVpc2NoZXIuY29tMCQGA1UdEgQdMBuBGWRldkBiZW5qYW1p
37
- bmZsZWlzY2hlci5jb20wDQYJKoZIhvcNAQEFBQADggEBAI/gyzcFn4XvrzXhqKWc
38
- zLUbOp0349rVIF6f0PlQvf3ZJZS76HKZ2EqSQJwzpcAboypvsRWk0kVmOwvzae4Y
39
- bB0ac2WuRf7AntS84VkZQmI/1AIxkaQUIQvHJacaw8yJKNggbDBKugHjcrIWWg2V
40
- vDvyjvJx4sQFpJ84LSDbAVkB92YaP6CUwoeXwrcsvvfrvo9x5AkBECz9KZGD532g
41
- o78P4WmzIWLgan5GIyNFtGxCsYAug+h0jnC4yujauKqr8hKDLu4K+quCGjX/6LL6
42
- WONz9vT6h053kHZYMrd4Gs/NdaA4tJSxrhZlXdajAm/0vAOzLIqUHHQk3R0tf7aY
43
- d/w=
44
- -----END CERTIFICATE-----
45
- date: 2014-01-21 00:00:00.000000000 Z
22
+ - !binary |-
23
+ LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURqakNDQW5hZ0F3SUJB
24
+ Z0lCQVRBTkJna3Foa2lHOXcwQkFRVUZBREJHTVF3d0NnWURWUVFEREFOa1pY
25
+ WXgKSVRBZkJnb0praWFKay9Jc1pBRVpGaEZpWlc1cVlXMXBibVpzWldselky
26
+ aGxjakVUTUJFR0NnbVNKb21UOGl4awpBUmtXQTJOdmJUQWVGdzB4TXpFeE1E
27
+ Y3lNVFEwTURCYUZ3MHhOREV4TURjeU1UUTBNREJhTUVZeEREQUtCZ05WCkJB
28
+ TU1BMlJsZGpFaE1COEdDZ21TSm9tVDhpeGtBUmtXRVdKbGJtcGhiV2x1Wm14
29
+ bGFYTmphR1Z5TVJNd0VRWUsKQ1pJbWlaUHlMR1FCR1JZRFkyOXRNSUlCSWpB
30
+ TkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQQpuY1pGdTdW
31
+ TWJsaUlCaGlHajZKNWFLWFN1SEY2Z1hadUE4Z2twZ003ZGdWemtMaHV1ZDZo
32
+ U1lY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NFdteklXTGdhbjVHSXlORnRHeENzWUF1ZytoMGpuQzR5
49
+ dWphdUtxcjhoS0RMdTRLK3F1Q0dqWC82TEw2CldPTno5dlQ2aDA1M2tIWllN
50
+ cmQ0R3MvTmRhQTR0SlN4cmhabFhkYWpBbS8wdkFPekxJcVVISFFrM1IwdGY3
51
+ YVkKZC93PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
52
+ date: 2014-02-09 00:00:00.000000000 Z
46
53
  dependencies:
47
54
  - !ruby/object:Gem::Dependency
48
55
  name: flay
49
56
  requirement: !ruby/object:Gem::Requirement
50
57
  requirements:
51
- - - '>='
58
+ - - ! '>='
52
59
  - !ruby/object:Gem::Version
53
60
  version: 2.0.1
54
61
  - - ~>
@@ -58,7 +65,7 @@ dependencies:
58
65
  prerelease: false
59
66
  version_requirements: !ruby/object:Gem::Requirement
60
67
  requirements:
61
- - - '>='
68
+ - - ! '>='
62
69
  - !ruby/object:Gem::Version
63
70
  version: 2.0.1
64
71
  - - ~>
@@ -82,7 +89,7 @@ dependencies:
82
89
  name: flog
83
90
  requirement: !ruby/object:Gem::Requirement
84
91
  requirements:
85
- - - '>='
92
+ - - ! '>='
86
93
  - !ruby/object:Gem::Version
87
94
  version: 4.1.1
88
95
  - - ~>
@@ -92,7 +99,7 @@ dependencies:
92
99
  prerelease: false
93
100
  version_requirements: !ruby/object:Gem::Requirement
94
101
  requirements:
95
- - - '>='
102
+ - - ! '>='
96
103
  - !ruby/object:Gem::Version
97
104
  version: 4.1.1
98
105
  - - ~>
@@ -102,7 +109,7 @@ dependencies:
102
109
  name: reek
103
110
  requirement: !ruby/object:Gem::Requirement
104
111
  requirements:
105
- - - '>='
112
+ - - ! '>='
106
113
  - !ruby/object:Gem::Version
107
114
  version: 1.3.4
108
115
  - - ~>
@@ -112,7 +119,7 @@ dependencies:
112
119
  prerelease: false
113
120
  version_requirements: !ruby/object:Gem::Requirement
114
121
  requirements:
115
- - - '>='
122
+ - - ! '>='
116
123
  - !ruby/object:Gem::Version
117
124
  version: 1.3.4
118
125
  - - ~>
@@ -122,7 +129,7 @@ dependencies:
122
129
  name: cane
123
130
  requirement: !ruby/object:Gem::Requirement
124
131
  requirements:
125
- - - '>='
132
+ - - ! '>='
126
133
  - !ruby/object:Gem::Version
127
134
  version: 2.5.2
128
135
  - - ~>
@@ -132,7 +139,7 @@ dependencies:
132
139
  prerelease: false
133
140
  version_requirements: !ruby/object:Gem::Requirement
134
141
  requirements:
135
- - - '>='
142
+ - - ! '>='
136
143
  - !ruby/object:Gem::Version
137
144
  version: 2.5.2
138
145
  - - ~>
@@ -142,7 +149,7 @@ dependencies:
142
149
  name: rails_best_practices
143
150
  requirement: !ruby/object:Gem::Requirement
144
151
  requirements:
145
- - - '>='
152
+ - - ! '>='
146
153
  - !ruby/object:Gem::Version
147
154
  version: 1.14.3
148
155
  - - ~>
@@ -152,7 +159,7 @@ dependencies:
152
159
  prerelease: false
153
160
  version_requirements: !ruby/object:Gem::Requirement
154
161
  requirements:
155
- - - '>='
162
+ - - ! '>='
156
163
  - !ruby/object:Gem::Version
157
164
  version: 1.14.3
158
165
  - - ~>
@@ -162,7 +169,7 @@ dependencies:
162
169
  name: metric_fu-Saikuro
163
170
  requirement: !ruby/object:Gem::Requirement
164
171
  requirements:
165
- - - '>='
172
+ - - ! '>='
166
173
  - !ruby/object:Gem::Version
167
174
  version: 1.1.3
168
175
  - - ~>
@@ -172,7 +179,7 @@ dependencies:
172
179
  prerelease: false
173
180
  version_requirements: !ruby/object:Gem::Requirement
174
181
  requirements:
175
- - - '>='
182
+ - - ! '>='
176
183
  - !ruby/object:Gem::Version
177
184
  version: 1.1.3
178
185
  - - ~>
@@ -210,70 +217,70 @@ dependencies:
210
217
  name: redcard
211
218
  requirement: !ruby/object:Gem::Requirement
212
219
  requirements:
213
- - - '>='
220
+ - - ! '>='
214
221
  - !ruby/object:Gem::Version
215
222
  version: '0'
216
223
  type: :runtime
217
224
  prerelease: false
218
225
  version_requirements: !ruby/object:Gem::Requirement
219
226
  requirements:
220
- - - '>='
227
+ - - ! '>='
221
228
  - !ruby/object:Gem::Version
222
229
  version: '0'
223
230
  - !ruby/object:Gem::Dependency
224
231
  name: coderay
225
232
  requirement: !ruby/object:Gem::Requirement
226
233
  requirements:
227
- - - '>='
234
+ - - ! '>='
228
235
  - !ruby/object:Gem::Version
229
236
  version: '0'
230
237
  type: :runtime
231
238
  prerelease: false
232
239
  version_requirements: !ruby/object:Gem::Requirement
233
240
  requirements:
234
- - - '>='
241
+ - - ! '>='
235
242
  - !ruby/object:Gem::Version
236
243
  version: '0'
237
244
  - !ruby/object:Gem::Dependency
238
245
  name: multi_json
239
246
  requirement: !ruby/object:Gem::Requirement
240
247
  requirements:
241
- - - '>='
248
+ - - ! '>='
242
249
  - !ruby/object:Gem::Version
243
250
  version: '0'
244
251
  type: :runtime
245
252
  prerelease: false
246
253
  version_requirements: !ruby/object:Gem::Requirement
247
254
  requirements:
248
- - - '>='
255
+ - - ! '>='
249
256
  - !ruby/object:Gem::Version
250
257
  version: '0'
251
258
  - !ruby/object:Gem::Dependency
252
259
  name: test_construct
253
260
  requirement: !ruby/object:Gem::Requirement
254
261
  requirements:
255
- - - '>='
262
+ - - ! '>='
256
263
  - !ruby/object:Gem::Version
257
264
  version: '0'
258
265
  type: :development
259
266
  prerelease: false
260
267
  version_requirements: !ruby/object:Gem::Requirement
261
268
  requirements:
262
- - - '>='
269
+ - - ! '>='
263
270
  - !ruby/object:Gem::Version
264
271
  version: '0'
265
272
  - !ruby/object:Gem::Dependency
266
273
  name: json
267
274
  requirement: !ruby/object:Gem::Requirement
268
275
  requirements:
269
- - - '>='
276
+ - - ! '>='
270
277
  - !ruby/object:Gem::Version
271
278
  version: '0'
272
279
  type: :development
273
280
  prerelease: false
274
281
  version_requirements: !ruby/object:Gem::Requirement
275
282
  requirements:
276
- - - '>='
283
+ - - ! '>='
277
284
  - !ruby/object:Gem::Version
278
285
  version: '0'
279
286
  description: Code metrics from Flog, Flay, Saikuro, Churn, Reek, Roodi, Code Statistics,
@@ -520,6 +527,7 @@ files:
520
527
  - spec/metric_fu/reporting/graphs/grapher_spec.rb
521
528
  - spec/metric_fu/reporting/result_spec.rb
522
529
  - spec/metric_fu/run_spec.rb
530
+ - spec/metric_fu/utility_spec.rb
523
531
  - spec/spec_helper.rb
524
532
  - spec/support/deferred_garbaged_collection.rb
525
533
  - spec/support/helper_methods.rb
@@ -540,17 +548,17 @@ require_paths:
540
548
  - lib
541
549
  required_ruby_version: !ruby/object:Gem::Requirement
542
550
  requirements:
543
- - - '>='
551
+ - - ! '>='
544
552
  - !ruby/object:Gem::Version
545
553
  version: 1.9.0
546
554
  required_rubygems_version: !ruby/object:Gem::Requirement
547
555
  requirements:
548
- - - '>='
556
+ - - ! '>='
549
557
  - !ruby/object:Gem::Version
550
558
  version: 1.3.6
551
559
  requirements: []
552
560
  rubyforge_project: metric_fu
553
- rubygems_version: 2.1.11
561
+ rubygems_version: 2.2.1
554
562
  signing_key:
555
563
  specification_version: 4
556
564
  summary: A fistful of code metrics, with awesome templates and graphs
@@ -623,6 +631,7 @@ test_files:
623
631
  - spec/metric_fu/reporting/graphs/grapher_spec.rb
624
632
  - spec/metric_fu/reporting/result_spec.rb
625
633
  - spec/metric_fu/run_spec.rb
634
+ - spec/metric_fu/utility_spec.rb
626
635
  - spec/spec_helper.rb
627
636
  - spec/support/deferred_garbaged_collection.rb
628
637
  - spec/support/helper_methods.rb
metadata.gz.sig CHANGED
Binary file