coveralls 0.7.8 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/lib/coveralls/api.rb +1 -1
- data/lib/coveralls/configuration.rb +17 -0
- data/lib/coveralls/version.rb +1 -1
- data/spec/coveralls/configuration_spec.rb +26 -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: 7c9081eace87a75c07c487a73474062818cefddb
|
4
|
+
data.tar.gz: 2736e03861ec57363ffc0668ab3f41f34b925dbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4b68224deb21f71157fa506f63f89bf69d81499cd98f732086221f868e1195f1723be2423d0ed322c3bab8246427c1172186ee272a95dde78950d7af4af8ef3
|
7
|
+
data.tar.gz: 312fa648d99738309294437573a786de8a90ef75f5c07e968ee7f888daf51c55b0577da40d56e7709586f52de9e294fb3e85f6c6f725449262c1e4c230a54658
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/coveralls/api.rb
CHANGED
@@ -65,7 +65,7 @@ module Coveralls
|
|
65
65
|
config = Coveralls::Configuration.configuration
|
66
66
|
if ENV['CI'] || ENV['COVERALLS_DEBUG'] || Coveralls.testing
|
67
67
|
Coveralls::Output.puts "[Coveralls] Submitting with config:", :color => "yellow"
|
68
|
-
output = MultiJson.dump(config, :pretty => true).gsub(/"repo_token": "(.*?)"/,'"repo_token": "[secure]"')
|
68
|
+
output = MultiJson.dump(config, :pretty => true).gsub(/"repo_token": ?"(.*?)"/,'"repo_token": "[secure]"')
|
69
69
|
Coveralls::Output.puts output, :color => "yellow"
|
70
70
|
end
|
71
71
|
hash.merge(config)
|
@@ -2,6 +2,7 @@ module Coveralls
|
|
2
2
|
module Configuration
|
3
3
|
|
4
4
|
require 'yaml'
|
5
|
+
require 'securerandom'
|
5
6
|
|
6
7
|
def self.configuration
|
7
8
|
config = {
|
@@ -27,6 +28,8 @@ module Coveralls
|
|
27
28
|
set_service_params_for_semaphore(config)
|
28
29
|
elsif ENV['JENKINS_URL']
|
29
30
|
set_service_params_for_jenkins(config)
|
31
|
+
elsif ENV['APPVEYOR']
|
32
|
+
set_service_params_for_appveyor(config)
|
30
33
|
elsif ENV['TDDIUM']
|
31
34
|
set_service_params_for_tddium(config)
|
32
35
|
elsif ENV['COVERALLS_RUN_LOCALLY'] || Coveralls.testing
|
@@ -62,6 +65,15 @@ module Coveralls
|
|
62
65
|
config[:service_number] = ENV['BUILD_NUMBER']
|
63
66
|
end
|
64
67
|
|
68
|
+
def self.set_service_params_for_appveyor(config)
|
69
|
+
config[:service_name] = 'appveyor'
|
70
|
+
config[:service_number] = ENV['APPVEYOR_BUILD_VERSION']
|
71
|
+
config[:service_branch] = ENV['APPVEYOR_REPO_BRANCH']
|
72
|
+
config[:commit_sha] = ENV['APPVEYOR_REPO_COMMIT']
|
73
|
+
repo_name = ENV['APPVEYOR_REPO_NAME']
|
74
|
+
config[:service_build_url] = 'https://ci.appveyor.com/project/%s/build/%s' % [repo_name, config[:service_number]]
|
75
|
+
end
|
76
|
+
|
65
77
|
def self.set_service_params_for_tddium(config)
|
66
78
|
config[:service_name] = 'tddium'
|
67
79
|
config[:service_number] = ENV['TDDIUM_SESSION_ID']
|
@@ -182,6 +194,11 @@ module Coveralls
|
|
182
194
|
:branch => ENV['GIT_BRANCH'],
|
183
195
|
:commit_sha => ENV['GIT_COMMIT']
|
184
196
|
}
|
197
|
+
elsif ENV['SEMAPHORE']
|
198
|
+
{
|
199
|
+
:branch => ENV['BRANCH_NAME'],
|
200
|
+
:commit_sha => ENV['REVISION']
|
201
|
+
}
|
185
202
|
else
|
186
203
|
{}
|
187
204
|
end
|
data/lib/coveralls/version.rb
CHANGED
@@ -256,4 +256,30 @@ describe Coveralls::Configuration do
|
|
256
256
|
config[:service_pull_request].should eq(service_pull_request)
|
257
257
|
end
|
258
258
|
end
|
259
|
+
|
260
|
+
describe '.set_service_params_for_appveyor' do
|
261
|
+
let(:service_number) { SecureRandom.hex(4) }
|
262
|
+
let(:service_branch) { SecureRandom.hex(4) }
|
263
|
+
let(:commit_sha) { SecureRandom.hex(4) }
|
264
|
+
let(:repo_name) { SecureRandom.hex(4) }
|
265
|
+
|
266
|
+
before do
|
267
|
+
ENV.stub(:[]).with('APPVEYOR_BUILD_VERSION').and_return(service_number)
|
268
|
+
ENV.stub(:[]).with('APPVEYOR_REPO_BRANCH').and_return(service_branch)
|
269
|
+
ENV.stub(:[]).with('APPVEYOR_REPO_COMMIT').and_return(commit_sha)
|
270
|
+
ENV.stub(:[]).with('APPVEYOR_REPO_NAME').and_return(repo_name)
|
271
|
+
end
|
272
|
+
|
273
|
+
it 'should set the expected parameters' do
|
274
|
+
config = {}
|
275
|
+
Coveralls::Configuration.set_service_params_for_appveyor(config)
|
276
|
+
config[:service_name].should eq('appveyor')
|
277
|
+
config[:service_number].should eq(service_number)
|
278
|
+
config[:service_branch].should eq(service_branch)
|
279
|
+
config[:commit_sha].should eq(commit_sha)
|
280
|
+
config[:service_build_url].should eq('https://ci.appveyor.com/project/%s/build/%s' % [repo_name, service_number])
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
|
259
285
|
end
|
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.7.
|
4
|
+
version: 0.7.9
|
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: 2015-
|
12
|
+
date: 2015-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|