codeclimate-test-reporter 1.0.4 → 1.0.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cab60d1204fbf2233dca7539b34c314c82d32ca
|
4
|
+
data.tar.gz: 6b0e7ede8cb1faaa6311f779eb06b080a4be6075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51c10d62fc9f37856a4b5c9bb3e36a0b53d8db695f55bd979fbcf7f588ff4e3f6d70405d459888a7f17bd01b05ded0f0ecbb1101f6fe56cde7f0a71ce4e175b9
|
7
|
+
data.tar.gz: ba384c67984ae2f513bb621e94c949baded0df4335fee66abdb0798bf7b252da5b67ee50ec8e8efda6123add063a025bf9cb42d8bf535d73aba92f412b8545cf
|
data/bin/ci
CHANGED
@@ -5,8 +5,8 @@ module CodeClimate
|
|
5
5
|
def info
|
6
6
|
{
|
7
7
|
head: head,
|
8
|
-
committed_at:
|
9
|
-
branch:
|
8
|
+
committed_at: committed_at_from_git_or_ci,
|
9
|
+
branch: branch_from_git_or_ci,
|
10
10
|
}
|
11
11
|
end
|
12
12
|
|
@@ -14,6 +14,10 @@ module CodeClimate
|
|
14
14
|
clean_service_branch || clean_git_branch || "master"
|
15
15
|
end
|
16
16
|
|
17
|
+
def committed_at_from_git_or_ci
|
18
|
+
committed_at_from_git || committed_at_from_ci
|
19
|
+
end
|
20
|
+
|
17
21
|
def clean_service_branch
|
18
22
|
ci_branch = String(Ci.service_data[:branch])
|
19
23
|
clean = ci_branch.strip.sub(%r{^origin/}, "")
|
@@ -34,7 +38,13 @@ module CodeClimate
|
|
34
38
|
git("log -1 --pretty=format:'%H'")
|
35
39
|
end
|
36
40
|
|
37
|
-
def
|
41
|
+
def committed_at_from_ci
|
42
|
+
if (value = Ci.service_data[:committed_at])
|
43
|
+
value.to_i
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def committed_at_from_git
|
38
48
|
committed_at = git("log -1 --pretty=format:%ct")
|
39
49
|
committed_at.to_i.zero? ? nil : committed_at.to_i
|
40
50
|
end
|
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.5
|
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:
|
12
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: simplecov
|