codestats-metrics-reporter 0.1.7 → 0.1.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d58e014bfb74c1f6aea52b9e8929ee159aecfaa3
|
4
|
+
data.tar.gz: a78bd9267bdd6c695629a358001f5acbf9fc45ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e18c7995be176432433aa036386e951d498a547a6ab02f96e07d36e73fba7c9b8a8d78e77a8107579218c6ed2521551003b3d5a4fa76c59842edfc2397ef061
|
7
|
+
data.tar.gz: 8b0049cf444cc7717bb9e0fb0670e57d016586ba1748eefeb9f4e21ad6e43acc483ef87ea4356c6f8f211173a9a3ecd4f510bea8ab076d7e32c2c357b6e71f25
|
@@ -28,7 +28,7 @@ module CodeStats
|
|
28
28
|
base_dir = Pathname.new(@metric.data['report_dir'])
|
29
29
|
build_uploader.upload(File.realpath(base_dir).to_s, bucket) if upload_report?
|
30
30
|
output = File.read(base_dir.join('overview.html'))
|
31
|
-
/
|
31
|
+
/var\sscore\s=\s[0-9]*\.?[0-9]+/.match(output).to_s.scan(/[0-9]*\.?[0-9]+/).first
|
32
32
|
end
|
33
33
|
|
34
34
|
def upload_report?
|
@@ -6,6 +6,7 @@ module CodeStats
|
|
6
6
|
class Simplecov
|
7
7
|
class << self
|
8
8
|
def generate_data(metric, _config_store)
|
9
|
+
return empty_value unless File.directory?('coverage')
|
9
10
|
json = JSON.parse(File.read('coverage/.last_run.json'))
|
10
11
|
code_coverage = json['result']['covered_percent']
|
11
12
|
{
|
@@ -14,6 +15,14 @@ module CodeStats
|
|
14
15
|
minimum: metric.data['minimum']
|
15
16
|
}
|
16
17
|
end
|
18
|
+
|
19
|
+
def empty_value
|
20
|
+
{
|
21
|
+
metric_name: metric.data['name'],
|
22
|
+
value: 0,
|
23
|
+
minimum: metric.data['minimum']
|
24
|
+
}
|
25
|
+
end
|
17
26
|
end
|
18
27
|
end
|
19
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codestats-metrics-reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esteban Pintos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|