codeclimate-test-reporter 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/code_climate/test_reporter/ci.rb +9 -0
- data/lib/code_climate/test_reporter/git.rb +15 -3
- data/lib/code_climate/test_reporter/version.rb +1 -1
- data/spec/lib/git_spec.rb +1 -1
- metadata +24 -41
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3bed6228fe161d03c73b8d3d0d69e1301eef2b98
|
4
|
+
data.tar.gz: 36a78e13714fa12f09b77218bdf4953fd14b5db4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6944ca55c721bc3a9f82c025221ccb7fa19131f5b98c08822a13e8c023a7187b546fb8b949cf9b3501e93911bf79ef23a5919ffc48246ce7bdf92ca1c5945689
|
7
|
+
data.tar.gz: dc78b6e64d0cf4f8aaf76b5b6cff53e97c58513e8c2abdfe658d286cc92cb5c236e9e89a7c69084f25851c1304e82ad8c066a49ae8d7076af7343ac62ca0884b
|
@@ -45,6 +45,15 @@ module CodeClimate
|
|
45
45
|
branch: env['WERCKER_GIT_BRANCH'],
|
46
46
|
commit_sha: env['WERCKER_GIT_COMMIT']
|
47
47
|
}
|
48
|
+
elsif env['APPVEYOR']
|
49
|
+
{
|
50
|
+
name: "appveyor",
|
51
|
+
build_identifier: env['APPVEYOR_BUILD_ID'],
|
52
|
+
build_url: env['APPVEYOR_API_URL'],
|
53
|
+
branch: env['APPVEYOR_REPO_BRANCH'],
|
54
|
+
commit_sha: env['APPVEYOR_REPO_COMMIT'],
|
55
|
+
pull_request: env['APPVEYOR_PULL_REQUEST_NUMBER']
|
56
|
+
}
|
48
57
|
elsif env['CI_NAME'] =~ /DRONE/i
|
49
58
|
{
|
50
59
|
name: "drone",
|
@@ -5,7 +5,7 @@ module CodeClimate
|
|
5
5
|
class << self
|
6
6
|
def info
|
7
7
|
{
|
8
|
-
head:
|
8
|
+
head: head,
|
9
9
|
committed_at: committed_at,
|
10
10
|
branch: branch_from_git,
|
11
11
|
}
|
@@ -31,13 +31,25 @@ module CodeClimate
|
|
31
31
|
|
32
32
|
private
|
33
33
|
|
34
|
+
def head
|
35
|
+
git("log -1 --pretty=format:'%H'")
|
36
|
+
end
|
37
|
+
|
34
38
|
def committed_at
|
35
|
-
committed_at =
|
39
|
+
committed_at = git('log -1 --pretty=format:%ct')
|
36
40
|
committed_at.to_i.zero? ? nil : committed_at.to_i
|
37
41
|
end
|
38
42
|
|
39
43
|
def branch_from_git
|
40
|
-
|
44
|
+
git('rev-parse --abbrev-ref HEAD').chomp
|
45
|
+
end
|
46
|
+
|
47
|
+
def git(command)
|
48
|
+
`git --git-dir=#{git_dir}/.git #{command}`
|
49
|
+
end
|
50
|
+
|
51
|
+
def git_dir
|
52
|
+
defined?(Rails) ? Rails.root : '.'
|
41
53
|
end
|
42
54
|
end
|
43
55
|
end
|
data/spec/lib/git_spec.rb
CHANGED
@@ -6,7 +6,7 @@ module CodeClimate::TestReporter
|
|
6
6
|
it 'returns a hash with git information.' do
|
7
7
|
expected_git_hash = {
|
8
8
|
head: `git log -1 --pretty=format:'%H'`,
|
9
|
-
committed_at: `git log -1 --pretty=format
|
9
|
+
committed_at: `git log -1 --pretty=format:%ct`.to_i,
|
10
10
|
branch: Git.send(:branch_from_git)
|
11
11
|
}
|
12
12
|
|
metadata
CHANGED
@@ -1,116 +1,103 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeclimate-test-reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Bryan Helmkamp
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-30 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: simplecov
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.7.1
|
22
|
-
- - <
|
20
|
+
- - "<"
|
23
21
|
- !ruby/object:Gem::Version
|
24
22
|
version: 1.0.0
|
25
23
|
type: :runtime
|
26
24
|
prerelease: false
|
27
25
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
26
|
requirements:
|
30
|
-
- -
|
27
|
+
- - ">="
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: 0.7.1
|
33
|
-
- - <
|
30
|
+
- - "<"
|
34
31
|
- !ruby/object:Gem::Version
|
35
32
|
version: 1.0.0
|
36
33
|
- !ruby/object:Gem::Dependency
|
37
34
|
name: bundler
|
38
35
|
requirement: !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
36
|
requirements:
|
41
|
-
- - ~>
|
37
|
+
- - "~>"
|
42
38
|
- !ruby/object:Gem::Version
|
43
39
|
version: '1.3'
|
44
40
|
type: :development
|
45
41
|
prerelease: false
|
46
42
|
version_requirements: !ruby/object:Gem::Requirement
|
47
|
-
none: false
|
48
43
|
requirements:
|
49
|
-
- - ~>
|
44
|
+
- - "~>"
|
50
45
|
- !ruby/object:Gem::Version
|
51
46
|
version: '1.3'
|
52
47
|
- !ruby/object:Gem::Dependency
|
53
48
|
name: rake
|
54
49
|
requirement: !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
50
|
requirements:
|
57
|
-
- -
|
51
|
+
- - ">="
|
58
52
|
- !ruby/object:Gem::Version
|
59
53
|
version: '0'
|
60
54
|
type: :development
|
61
55
|
prerelease: false
|
62
56
|
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
57
|
requirements:
|
65
|
-
- -
|
58
|
+
- - ">="
|
66
59
|
- !ruby/object:Gem::Version
|
67
60
|
version: '0'
|
68
61
|
- !ruby/object:Gem::Dependency
|
69
62
|
name: rspec
|
70
63
|
requirement: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
64
|
requirements:
|
73
|
-
- -
|
65
|
+
- - ">="
|
74
66
|
- !ruby/object:Gem::Version
|
75
67
|
version: '0'
|
76
68
|
type: :development
|
77
69
|
prerelease: false
|
78
70
|
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
none: false
|
80
71
|
requirements:
|
81
|
-
- -
|
72
|
+
- - ">="
|
82
73
|
- !ruby/object:Gem::Version
|
83
74
|
version: '0'
|
84
75
|
- !ruby/object:Gem::Dependency
|
85
76
|
name: artifice
|
86
77
|
requirement: !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
78
|
requirements:
|
89
|
-
- -
|
79
|
+
- - ">="
|
90
80
|
- !ruby/object:Gem::Version
|
91
81
|
version: '0'
|
92
82
|
type: :development
|
93
83
|
prerelease: false
|
94
84
|
version_requirements: !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
85
|
requirements:
|
97
|
-
- -
|
86
|
+
- - ">="
|
98
87
|
- !ruby/object:Gem::Version
|
99
88
|
version: '0'
|
100
89
|
- !ruby/object:Gem::Dependency
|
101
90
|
name: pry
|
102
91
|
requirement: !ruby/object:Gem::Requirement
|
103
|
-
none: false
|
104
92
|
requirements:
|
105
|
-
- -
|
93
|
+
- - ">="
|
106
94
|
- !ruby/object:Gem::Version
|
107
95
|
version: '0'
|
108
96
|
type: :development
|
109
97
|
prerelease: false
|
110
98
|
version_requirements: !ruby/object:Gem::Requirement
|
111
|
-
none: false
|
112
99
|
requirements:
|
113
|
-
- -
|
100
|
+
- - ">="
|
114
101
|
- !ruby/object:Gem::Version
|
115
102
|
version: '0'
|
116
103
|
description: Collects test coverage data from your Ruby test suite and sends it to
|
@@ -122,9 +109,9 @@ executables:
|
|
122
109
|
extensions: []
|
123
110
|
extra_rdoc_files: []
|
124
111
|
files:
|
125
|
-
- .gitignore
|
126
|
-
- .rspec
|
127
|
-
- .travis.yml
|
112
|
+
- ".gitignore"
|
113
|
+
- ".rspec"
|
114
|
+
- ".travis.yml"
|
128
115
|
- Gemfile
|
129
116
|
- LICENSE.txt
|
130
117
|
- README.md
|
@@ -156,30 +143,26 @@ files:
|
|
156
143
|
homepage: ''
|
157
144
|
licenses:
|
158
145
|
- MIT
|
146
|
+
metadata: {}
|
159
147
|
post_install_message:
|
160
148
|
rdoc_options: []
|
161
149
|
require_paths:
|
162
150
|
- lib
|
163
151
|
required_ruby_version: !ruby/object:Gem::Requirement
|
164
|
-
none: false
|
165
152
|
requirements:
|
166
|
-
- -
|
153
|
+
- - ">="
|
167
154
|
- !ruby/object:Gem::Version
|
168
155
|
version: '1.9'
|
169
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
|
-
none: false
|
171
157
|
requirements:
|
172
|
-
- -
|
158
|
+
- - ">="
|
173
159
|
- !ruby/object:Gem::Version
|
174
160
|
version: '0'
|
175
|
-
segments:
|
176
|
-
- 0
|
177
|
-
hash: 4170993727357694597
|
178
161
|
requirements: []
|
179
162
|
rubyforge_project:
|
180
|
-
rubygems_version:
|
163
|
+
rubygems_version: 2.2.2
|
181
164
|
signing_key:
|
182
|
-
specification_version:
|
165
|
+
specification_version: 4
|
183
166
|
summary: Uploads Ruby test coverage data to Code Climate.
|
184
167
|
test_files:
|
185
168
|
- spec/fixtures/encoding_test.rb
|