codacy-coverage 1.1.5 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/codacy/git.rb +9 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a53a06f8f48ba817d1989ac0065f1539d06437d4
4
- data.tar.gz: 1dcc6cdb3b892ad9387fc9befe449aa404286e9a
3
+ metadata.gz: a27270fc8c10d511a3fd5e5e688a0f06efd878ff
4
+ data.tar.gz: 09d1396169058bbd1864ed9f93ec21a3f79c546c
5
5
  SHA512:
6
- metadata.gz: dbca3afed244425534e53478118fbb2f918b713e81bdb43c3928b2be48a801570189d9101b99aa9cd90b01443cb22bb109f8f65be3b5fb3838d5d726b56d584c
7
- data.tar.gz: 7a0e8caaa66f5f10d97f3e67530dc656f6b49eb6154026474e2337cf8c4cd8dff4f90a5f54b0388dfbcb41596f2f47811fbf088920194b62a01d2f6443284762
6
+ metadata.gz: 103cd6ad72b6ba788938a85985145c48ab16822604a904cbaef4d395e1f82b9f5074d5c68830f08991f0d1c42305289f5ad7165fbd139f77e7d0ae3e7bb1a90b
7
+ data.tar.gz: d0d1068e5b7906eaf5ccdb582da98ef9e47937316f8784dea91533022f520a9b5b8eb8f7c3c9c7fb6268291f5f8db0ef9c6c6bb6797b369d5745cef397eae577
@@ -14,7 +14,9 @@ module Codacy
14
14
  end
15
15
 
16
16
  def self.work_dir
17
- work_dir = ENV['WORK_DIR'] || git_dir
17
+ work_dir = ENV['WORK_DIR'] ||
18
+ ENV['TRAVIS_BUILD_DIR'] ||
19
+ git_dir
18
20
  work_dir
19
21
  end
20
22
 
@@ -23,7 +25,12 @@ module Codacy
23
25
  end
24
26
 
25
27
  def self.git_dir
26
- return `git rev-parse --show-toplevel`.strip!
28
+ dir = `git rev-parse --show-toplevel`
29
+ if $?.to_i == 0
30
+ return dir.strip!
31
+ else
32
+ return ''
33
+ end
27
34
  end
28
35
 
29
36
  def self.git(command)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codacy-coverage
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nuno Teixeira
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-12-03 00:00:00.000000000 Z
12
+ date: 2017-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: simplecov