codestats-metrics-reporter 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/config/default.yml +1 -0
- data/lib/code_stats/metrics/reporter/rubycritic.rb +2 -1
- data/lib/code_stats/metrics/reporter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 371971584d3415a307aa3ffe3ebabbf43084a036
|
4
|
+
data.tar.gz: 7e1ae4a0112bef86a35aa850f6f161e4e6b490af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db33ce19b9b7050791a2bd50841f6149bcf42e64d6ad416c299ac06579e73c223a69f2bbbf8d3525c6271432b8ee8db350afea5235162af2eb5e84d55788ae3a
|
7
|
+
data.tar.gz: 7e75e78b1050456c1792dde0a8f1defe30419dea750b2d8ff559d413c3f273259fc275313c7ed134f0932a57d1f1d73b23331a2b927a2eadbec1da967a20515d
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
Code Stats Metrics Reporter
|
2
2
|
===========================
|
3
3
|
|
4
|
+
[](https://badge.fury.io/rb/codestats-metrics-reporter)
|
5
|
+
|
4
6
|
Ruby tasks gem to report metrics to [Code Stats](https://github.com/Wolox/codestats) from a Continous Integration service.
|
5
7
|
|
6
8
|
This gem is still alpha stage and it is not pushed to [Ruby Gems](https://rubygems.org/). It include those metrics that suit [Wolox](http://wolox.co) technologies. The idea es to leave this gem as a generic interface to [Code Stats](https://github.com/Wolox/codestats) that parses metrics from a folder. So you can generate a separate gem per metric that will leave metrics in that folder. The invocation would be something like this:
|
data/config/default.yml
CHANGED
@@ -9,6 +9,7 @@ metrics:
|
|
9
9
|
minimum: 70
|
10
10
|
upload_report: true
|
11
11
|
report_dir: 'tmp/rubycritic'
|
12
|
+
score_dir: 'tmp/rubycritic_score.out'
|
12
13
|
uploader_key: <%= ENV['CODE_STATS_S3_KEY'] %>
|
13
14
|
uploader_secret: <%= ENV['CODE_STATS_S3_SECRET_KEY'] %>
|
14
15
|
uploader_region: <%= ENV['CODE_STATS_S3_REGION'] %>
|
@@ -27,7 +27,8 @@ module CodeStats
|
|
27
27
|
def generate_score_file
|
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(@metric.data['score_dir'])
|
31
|
+
/Score:\s[0-9]*\.?[0-9]+/.match(output).to_s.scan(/[0-9]*\.?[0-9]+/).first
|
31
32
|
end
|
32
33
|
|
33
34
|
def upload_report?
|
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.2
|
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-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|