Skip to content

Commit 0c6e3aa

Browse files
committed
support for COVERALLS_SERVICE_NAME; version bump
1 parent 03a9f8f commit 0c6e3aa

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

lib/coveralls/configuration.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def self.configuration
4141
# standardized env vars
4242
set_standard_service_params_for_generic_ci(config)
4343

44+
if service_name = ENV['COVERALLS_SERVICE_NAME']
45+
config[:service_name] = service_name
46+
end
47+
4448
config
4549
end
4650

lib/coveralls/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Coveralls
2-
VERSION = "0.8.18"
2+
VERSION = "0.8.19"
33
end

spec/coveralls/configuration_spec.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@
5555
end
5656

5757
context 'Services' do
58+
context 'with env based service name' do
59+
let(:service_name) { 'travis-enterprise' }
60+
before do
61+
ENV.stub(:[]).with('TRAVIS').and_return('1')
62+
ENV.stub(:[]).with('COVERALLS_SERVICE_NAME').and_return(service_name)
63+
end
64+
65+
it 'pulls the service name from the environment if set' do
66+
config = Coveralls::Configuration.configuration
67+
config[:service_name].should eq(service_name)
68+
end
69+
end
70+
5871
context 'on Travis' do
5972
before do
6073
ENV.stub(:[]).with('TRAVIS').and_return('1')

0 commit comments

Comments
 (0)