coveralls 0.8.11 → 0.8.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/coveralls/configuration.rb +10 -0
- data/lib/coveralls/version.rb +1 -1
- data/spec/coveralls/configuration_spec.rb +24 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d107fee57ab1f3b33cf1752cf817fd8090548636
|
4
|
+
data.tar.gz: c775efa18034e405295fa257b14fb9421cf3a109
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 088ba66aea7d7800f252d9ca6043f2d6c93b704da6671d0b9e0538db5c0aa1768cac0901be8c779008c738a94a65b65ea257f5e94b78abb7edc6cf6d63b3a8db
|
7
|
+
data.tar.gz: ff92f071ba8a776986cd18f4f801b0d1685ad2f179f25c43ff90628e285a0d4c048ab913f136b014eca214085b1c68c433b0e401fe6249a1a5001fbf027e1e7e
|
@@ -32,6 +32,8 @@ module Coveralls
|
|
32
32
|
set_service_params_for_appveyor(config)
|
33
33
|
elsif ENV['TDDIUM']
|
34
34
|
set_service_params_for_tddium(config)
|
35
|
+
elsif ENV['GITLAB_CI']
|
36
|
+
set_service_params_for_gitlab(config)
|
35
37
|
elsif ENV['COVERALLS_RUN_LOCALLY'] || Coveralls.testing
|
36
38
|
set_service_params_for_coveralls_local(config)
|
37
39
|
end
|
@@ -85,6 +87,14 @@ module Coveralls
|
|
85
87
|
config[:service_build_url] = "https://ci.solanolabs.com/reports/#{ENV['TDDIUM_SESSION_ID']}"
|
86
88
|
end
|
87
89
|
|
90
|
+
def self.set_service_params_for_gitlab(config)
|
91
|
+
config[:service_name] = 'gitlab-ci'
|
92
|
+
config[:service_job_number] = ENV['CI_BUILD_NAME']
|
93
|
+
config[:service_job_id] = ENV['CI_BUILD_ID']
|
94
|
+
config[:service_branch] = ENV['CI_BUILD_REF_NAME']
|
95
|
+
config[:commit_sha] = ENV['CI_BUILD_REF']
|
96
|
+
end
|
97
|
+
|
88
98
|
def self.set_service_params_for_coveralls_local(config)
|
89
99
|
config[:service_job_id] = nil
|
90
100
|
config[:service_name] = 'coveralls-ruby'
|
data/lib/coveralls/version.rb
CHANGED
@@ -193,6 +193,30 @@ describe Coveralls::Configuration do
|
|
193
193
|
end
|
194
194
|
end
|
195
195
|
|
196
|
+
describe '.set_service_params_for_gitlab' do
|
197
|
+
let(:commit_sha) { SecureRandom.hex(32) }
|
198
|
+
let(:service_job_number) { "spec:one" }
|
199
|
+
let(:service_job_id) { 1234 }
|
200
|
+
let(:service_branch) { "feature" }
|
201
|
+
|
202
|
+
before do
|
203
|
+
ENV.stub(:[]).with('CI_BUILD_NAME').and_return(service_job_number)
|
204
|
+
ENV.stub(:[]).with('CI_BUILD_ID').and_return(service_job_id)
|
205
|
+
ENV.stub(:[]).with('CI_BUILD_REF_NAME').and_return(service_branch)
|
206
|
+
ENV.stub(:[]).with('CI_BUILD_REF').and_return(commit_sha)
|
207
|
+
end
|
208
|
+
|
209
|
+
it 'should set the expected parameters' do
|
210
|
+
config = {}
|
211
|
+
Coveralls::Configuration.set_service_params_for_gitlab(config)
|
212
|
+
config[:service_name].should eq('gitlab-ci')
|
213
|
+
config[:service_job_number].should eq(service_job_number)
|
214
|
+
config[:service_job_id].should eq(service_job_id)
|
215
|
+
config[:service_branch].should eq(service_branch)
|
216
|
+
config[:commit_sha].should eq(commit_sha)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
196
220
|
describe '.set_service_params_for_semaphore' do
|
197
221
|
let(:semaphore_build_num) { SecureRandom.hex(4) }
|
198
222
|
before do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coveralls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Merwin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-02-
|
12
|
+
date: 2016-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|