codeclimate_batch 0.1.0 → 0.1.1

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: a62949c60a2a8185556f4bfe335d8eb3b7bebaeb
4
- data.tar.gz: 5bf01dc74e06b2d4e55eee340cc863679640807d
3
+ metadata.gz: a43e1dbd03421eee03a544b07ce6b615ffe4d5fb
4
+ data.tar.gz: 876f767d4031e0a532aba121aada7489f203276f
5
5
  SHA512:
6
- metadata.gz: dd5b521bf8557b733a268ea374618d0f6eba55983b6edb65204e30ee49ce18954c1ebd47bbd8beac29ebff56fe82afc9f26f08b801f6331713e717238364723c
7
- data.tar.gz: ed12cb796cbd4c4c8123f51f448b2566ff157ded29d9d2127e4ee11d4e8d54c2b1b548218dd91c6e40686a9f81dc1a361e6d4be1c3b4396111186af167c0a2d3
6
+ metadata.gz: b5088a88f57c772a67fa8a3408a62d2b9fb452a4754d9416e6ffcac9ea91664d777875ba74f79245d176d45f0257d68b76f97854c106c07fa2e6db5fbb9becf4
7
+ data.tar.gz: ee5db6baf3f580ccfbadd27c7c53709afe402cf2b0a5770e98570980a088b313e318a8630288d75914c7009b1a4ac6ea03fa07ce202b95b84bc6d8704b56ee1f
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module CodeclimateBatch
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeclimate_batch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser