metric_fu 4.11.0 → 4.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CONTRIBUTORS +9 -7
- data/DEV.md +1 -0
- data/HISTORY.md +6 -1
- data/Rakefile +0 -3
- data/checksum/metric_fu-4.11.0.gem.sha512 +1 -0
- data/gem_tasks/build.rake +2 -0
- data/lib/metric_fu/gem_run.rb +3 -2
- data/lib/metric_fu/metric.rb +11 -1
- data/lib/metric_fu/metrics/flay/generator.rb +13 -5
- data/lib/metric_fu/version.rb +1 -1
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjRkYzc2YTUyMTE0NzdkNTIxNmVhMTlkMGUzNzQ5NTIzYjY5N2JhNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjYyYWU0YTk5NjE5ZDM4M2I1ZmVlNWY2ODM4NzM3Y2M4MTUwM2IxZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjJmZjc0N2U3NmI1YTU3YTQwYmE3NjM2NTBhNDY0MmYzMmM2MTQyZjYxNmJj
|
10
|
+
OTM3ZmE1ODlmZjg1Yjg0MDZlYTNiZWNiZjAyMTM5MmQ0MThjNzJmMzkzODcy
|
11
|
+
YjcyZjA3YTYwNGE3ODQ0NzE5NjEwN2FiMWJlNTMyNjIyNjBkZWE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjA1NmJmMDZiYzc2ZDBkODVmNDliNWFkMDllZmQyMTk2NGNhN2YwNTFlNzcx
|
14
|
+
NzI3OGNkMDNmMGFhYjZjYWU5YTFjYmNkYTFlZDM0M2VkNGNlNmRmMmFmN2Iy
|
15
|
+
ZWVmNGRmNWQ2MmIxNDQ0MDg3MzFlZWM5MzM0MGVlZTYxNzM5MWQ=
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CONTRIBUTORS
CHANGED
@@ -32,6 +32,7 @@ Andy Gregorowicz
|
|
32
32
|
Tarsoly András
|
33
33
|
Benjamin Fleischer / Paul Swagerty
|
34
34
|
unknown
|
35
|
+
Nick Veys
|
35
36
|
Extrovert
|
36
37
|
Ben Turner
|
37
38
|
KAKUTANI Shintaro
|
@@ -56,18 +57,19 @@ saltracer
|
|
56
57
|
benlovell
|
57
58
|
ff-cviradiya
|
58
59
|
khall
|
59
|
-
Todd A. Jacobs
|
60
60
|
Stefan Huber
|
61
|
-
|
62
|
-
Bitdeli Chef
|
61
|
+
Todd A. Jacobs
|
63
62
|
jayzes
|
63
|
+
Bitdeli Chef
|
64
|
+
Hans Hasselberg
|
64
65
|
Scyllinice
|
65
66
|
Matthew Gordon
|
67
|
+
Guilherme Simões
|
66
68
|
factorylabs
|
67
|
-
|
68
|
-
Joel Nimety
|
69
|
+
Greg Allen
|
69
70
|
Chris Ian Fiel
|
71
|
+
Mike Szyndel
|
72
|
+
Joel Nimety
|
70
73
|
René Föhring
|
74
|
+
Paul Elliott
|
71
75
|
Mike Ball
|
72
|
-
Greg Allen
|
73
|
-
Guilherme Simões
|
data/DEV.md
CHANGED
data/HISTORY.md
CHANGED
@@ -4,13 +4,18 @@ 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 (breaking change) 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.11.
|
7
|
+
### Master [changes](https://github.com/metricfu/metric_fu/compare/v4.11.1...master)
|
8
8
|
|
9
9
|
* Breaking Changes
|
10
10
|
* Features
|
11
11
|
* Fixes
|
12
12
|
* Misc
|
13
13
|
|
14
|
+
### [4.11.1](https://github.com/metricfu/metric_fu/compare/v4.11.0...v4.11.1)
|
15
|
+
|
16
|
+
* Fixes
|
17
|
+
* Captured shell-output now only includes STDOUT. Appending STDERR was breaking expectations. (Benjamin Fleischer, #230, fixes #229)
|
18
|
+
|
14
19
|
### [4.11.0](https://github.com/metricfu/metric_fu/compare/v4.10.0...v4.11.0)
|
15
20
|
|
16
21
|
* Features
|
data/Rakefile
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
5402db0fe4fb45627ce37d071b0d0d0ec4d173320cfffb251e3e0406556e828ac97fc416a4ddd9387b39aa9e374687ebf900f94cb0a578d771b12ae4af8506c6
|
data/gem_tasks/build.rake
CHANGED
data/lib/metric_fu/gem_run.rb
CHANGED
@@ -30,18 +30,19 @@ module MetricFu
|
|
30
30
|
mf_debug "Running #{summary}"
|
31
31
|
captured_output = ''
|
32
32
|
captured_errors = ''
|
33
|
+
thread = ''
|
33
34
|
Open3.popen3("#{library_name}", *arguments) do |stdin, stdout, stderr, wait_thr|
|
34
35
|
captured_output << stdout.read.chomp
|
35
36
|
captured_errors << stderr.read.chomp
|
37
|
+
thread = wait_thr
|
36
38
|
end
|
37
|
-
captured_output << "\nERRORS:\n#{captured_errors}"
|
38
39
|
rescue StandardError => run_error
|
39
40
|
handle_run_error(run_error)
|
40
41
|
rescue SystemExit => system_exit
|
41
42
|
handle_system_exit(system_exit)
|
42
43
|
ensure
|
43
44
|
print_errors
|
44
|
-
return captured_output
|
45
|
+
return captured_output, captured_errors, thread.value
|
45
46
|
end
|
46
47
|
|
47
48
|
def handle_run_error(run_error)
|
data/lib/metric_fu/metric.rb
CHANGED
@@ -55,7 +55,17 @@ module MetricFu
|
|
55
55
|
# version: ,
|
56
56
|
args: args,
|
57
57
|
})
|
58
|
-
runner.run
|
58
|
+
stdout, stderr, status = runner.run
|
59
|
+
# TODO: do something with the stderr
|
60
|
+
# for now, just acknowledge we got it
|
61
|
+
unless stderr.empty?
|
62
|
+
STDERR.puts "STDERR from #{gem_name}:\n#{stderr}"
|
63
|
+
end
|
64
|
+
# TODO: status.success? is not reliable for distinguishing
|
65
|
+
# between a successful run of the metric and problems
|
66
|
+
# found by the metric. Talk to other metrics about this.
|
67
|
+
MetricFu.logger.debug "#{gem_name} ran with #{status.success? ? 'success' : 'failure'} code #{status.exitstatus}"
|
68
|
+
stdout
|
59
69
|
end
|
60
70
|
|
61
71
|
def configured_run_options
|
@@ -16,17 +16,25 @@ module MetricFu
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def to_h
|
19
|
+
{:flay => calculate_result(@matches)}
|
20
|
+
end
|
21
|
+
|
22
|
+
# TODO: move into analyze method
|
23
|
+
def calculate_result(matches)
|
24
|
+
total_score = matches.shift.first.split('=').last.strip
|
19
25
|
target = []
|
20
|
-
|
21
|
-
@matches.each do |problem|
|
26
|
+
matches.each do |problem|
|
22
27
|
reason = problem.shift.strip
|
23
28
|
lines_info = problem.map do |full_line|
|
24
|
-
name, line = full_line.split(":")
|
25
|
-
{:name => name
|
29
|
+
name, line = full_line.split(":").map(&:strip)
|
30
|
+
{:name => name, :line => line}
|
26
31
|
end
|
27
32
|
target << [:reason => reason, :matches => lines_info]
|
28
33
|
end
|
29
|
-
{
|
34
|
+
{
|
35
|
+
:total_score => total_score,
|
36
|
+
:matches => target.flatten
|
37
|
+
}
|
30
38
|
end
|
31
39
|
|
32
40
|
private
|
data/lib/metric_fu/version.rb
CHANGED
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.11.
|
4
|
+
version: 4.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jake Scruggs
|
@@ -49,7 +49,7 @@ cert_chain:
|
|
49
49
|
dWphdUtxcjhoS0RMdTRLK3F1Q0dqWC82TEw2CldPTno5dlQ2aDA1M2tIWllN
|
50
50
|
cmQ0R3MvTmRhQTR0SlN4cmhabFhkYWpBbS8wdkFPekxJcVVISFFrM1IwdGY3
|
51
51
|
YVkKZC93PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
52
|
-
date: 2014-05-
|
52
|
+
date: 2014-05-14 00:00:00.000000000 Z
|
53
53
|
dependencies:
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: flay
|
@@ -356,6 +356,7 @@ files:
|
|
356
356
|
- certs/bf4.pem
|
357
357
|
- checksum/.gitkeep
|
358
358
|
- checksum/metric_fu-4.10.0.gem.sha512
|
359
|
+
- checksum/metric_fu-4.11.0.gem.sha512
|
359
360
|
- checksum/metric_fu-4.2.0.gem.sha512
|
360
361
|
- checksum/metric_fu-4.2.1.gem.sha512
|
361
362
|
- checksum/metric_fu-4.3.0.gem.sha512
|
metadata.gz.sig
CHANGED
Binary file
|