codeclimate-test-reporter 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/code_climate/test_reporter/git.rb +12 -3
- data/lib/code_climate/test_reporter/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4987647d33a2c2650e39bc80481b84024f6e8836
|
4
|
+
data.tar.gz: aa9b3065712ab19ec97b41f0474fcd6ad07fa204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2640091efeaeaa0d2509a0792b7f048b9d0abe25156fe7e35e17b67162415f8240b61b01ffb5ef66aa3a2663de26ab146adc53ba18d32a4e20bd8bb69bfcb45c
|
7
|
+
data.tar.gz: 6e27dc575ed74c542452f08cdb72666e7f37167a5ac617505078d055648ed49fdc1c23a775527fe1446c08f50a9c486d15a94fa1a31531112326d02d6af29f74
|
@@ -4,12 +4,16 @@ module CodeClimate
|
|
4
4
|
class << self
|
5
5
|
def info
|
6
6
|
{
|
7
|
-
head:
|
7
|
+
head: head_from_git_or_ci,
|
8
8
|
committed_at: committed_at_from_git_or_ci,
|
9
9
|
branch: branch_from_git_or_ci,
|
10
10
|
}
|
11
11
|
end
|
12
12
|
|
13
|
+
def head_from_git_or_ci
|
14
|
+
head_from_git || head_from_ci
|
15
|
+
end
|
16
|
+
|
13
17
|
def branch_from_git_or_ci
|
14
18
|
clean_service_branch || clean_git_branch || "master"
|
15
19
|
end
|
@@ -34,8 +38,13 @@ module CodeClimate
|
|
34
38
|
|
35
39
|
private
|
36
40
|
|
37
|
-
def
|
38
|
-
git("log -1 --pretty=format:'%H'")
|
41
|
+
def head_from_git
|
42
|
+
commit_hash = git("log -1 --pretty=format:'%H'")
|
43
|
+
!commit_hash.empty? ? commit_hash : nil
|
44
|
+
end
|
45
|
+
|
46
|
+
def head_from_ci
|
47
|
+
Ci.service_data[:commit_sha]
|
39
48
|
end
|
40
49
|
|
41
50
|
def committed_at_from_ci
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeclimate-test-reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Helmkamp
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-03-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: simplecov
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.6.
|
148
|
+
rubygems_version: 2.6.8
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: Uploads Ruby test coverage data to Code Climate.
|