codeclimate_batch 0.1.0 → 0.1.1
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/lib/codeclimate_batch.rb +8 -0
- data/lib/codeclimate_batch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a43e1dbd03421eee03a544b07ce6b615ffe4d5fb
|
|
4
|
+
data.tar.gz: 876f767d4031e0a532aba121aada7489f203276f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5088a88f57c772a67fa8a3408a62d2b9fb452a4754d9416e6ffcac9ea91664d777875ba74f79245d176d45f0257d68b76f97854c106c07fa2e6db5fbb9becf4
|
|
7
|
+
data.tar.gz: ee5db6baf3f580ccfbadd27c7c53709afe402cf2b0a5770e98570980a088b313e318a8630288d75914c7009b1a4ac6ea03fa07ce202b95b84bc6d8704b56ee1f
|
data/lib/codeclimate_batch.rb
CHANGED
|
@@ -2,6 +2,14 @@ require 'json'
|
|
|
2
2
|
|
|
3
3
|
module CodeclimateBatch
|
|
4
4
|
class << self
|
|
5
|
+
# code climate only accepts reports from master but records coverage on all PRs -> wasted time
|
|
6
|
+
def start
|
|
7
|
+
return if ENV['TRAVIS'] && (ENV['TRAVIS_BRANCH'] != 'master' || ENV['TRAVIS_PULL_REQUEST'].to_i != 0)
|
|
8
|
+
ENV['TO_FILE'] = '1' # write results to file since we need to combine them before sending
|
|
9
|
+
require 'codeclimate-test-reporter'
|
|
10
|
+
CodeClimate::TestReporter.start
|
|
11
|
+
end
|
|
12
|
+
|
|
5
13
|
def unify(coverage_files)
|
|
6
14
|
initial, *rest = coverage_files
|
|
7
15
|
report = load(initial)
|