coveralls_reborn 0.26.0 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +3 -3
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/coveralls/configuration.rb +12 -0
- data/lib/coveralls/version.rb +1 -1
- data/spec/coveralls/configuration_spec.rb +37 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04c9754eac3145b40b91fb2fb3dad2c211543360c4b8de17b0c1d0fdf7d94959
|
4
|
+
data.tar.gz: 0fcf13baf4cb78142413a8635fde339b2983c17325f204f3ac7c9c70d8a833b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 821ea060f88505b7d27aaa80567d7fdb67322d22aa03e456bb2fe9555e371e0e304a2eb8564783e55794a40e8efa75a41af9d1990519e8ad5e40247b9e99f3b7
|
7
|
+
data.tar.gz: a9ca84cf0a99ee87681f7be22b4f1be7df4018835408ad0acc40be4f9a96381cb9bf220aaa4c7c807e8009085ee99c9e6b46791e919e8f3c49ff7d2c5a36087e
|
data/.rubocop.yml
CHANGED
@@ -17,13 +17,17 @@ Layout/LineLength:
|
|
17
17
|
Enabled: false
|
18
18
|
|
19
19
|
Metrics/AbcSize:
|
20
|
-
Max:
|
20
|
+
Max: 26.31
|
21
|
+
Exclude:
|
22
|
+
- 'lib/coveralls/configuration.rb'
|
21
23
|
|
22
24
|
Metrics/CyclomaticComplexity:
|
23
|
-
|
25
|
+
Exclude:
|
26
|
+
- 'lib/coveralls/configuration.rb'
|
24
27
|
|
25
28
|
Metrics/PerceivedComplexity:
|
26
|
-
|
29
|
+
Exclude:
|
30
|
+
- 'lib/coveralls/configuration.rb'
|
27
31
|
|
28
32
|
Metrics/BlockLength:
|
29
33
|
Exclude:
|
@@ -38,7 +42,7 @@ Metrics/ModuleLength:
|
|
38
42
|
- 'spec/**/*'
|
39
43
|
|
40
44
|
RSpec/ExampleLength:
|
41
|
-
Max:
|
45
|
+
Max: 15
|
42
46
|
|
43
47
|
RSpec/MultipleExpectations:
|
44
48
|
Enabled: false
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -11,10 +11,10 @@ end
|
|
11
11
|
|
12
12
|
gem 'rake', '~> 13.0'
|
13
13
|
gem 'rspec', '~> 3.12'
|
14
|
-
gem 'rubocop', '~> 1.
|
15
|
-
gem 'rubocop-performance', '~> 1.
|
14
|
+
gem 'rubocop', '~> 1.45'
|
15
|
+
gem 'rubocop-performance', '~> 1.16'
|
16
16
|
gem 'rubocop-rake', '~> 0.6.0'
|
17
|
-
gem 'rubocop-rspec', '~> 2.
|
17
|
+
gem 'rubocop-rspec', '~> 2.18'
|
18
18
|
gem 'truthy', '~> 1.0'
|
19
19
|
gem 'vcr', '~> 6.1'
|
20
20
|
gem 'webmock', '~> 3.18'
|
data/LICENSE
CHANGED
@@ -2,7 +2,7 @@ MIT License
|
|
2
2
|
|
3
3
|
Copyright (c) 2018 Wil Gieseler
|
4
4
|
|
5
|
-
Copyright (c)
|
5
|
+
Copyright (c) 2023 Geremia Taglialatela
|
6
6
|
|
7
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -45,6 +45,8 @@ module Coveralls
|
|
45
45
|
define_service_params_for_tddium(config)
|
46
46
|
elsif ENV['GITLAB_CI']
|
47
47
|
define_service_params_for_gitlab(config)
|
48
|
+
elsif ENV['BUILDKITE']
|
49
|
+
define_service_params_for_buildkite(config)
|
48
50
|
elsif ENV['COVERALLS_RUN_LOCALLY'] || Coveralls.testing
|
49
51
|
define_service_params_for_coveralls_local(config)
|
50
52
|
end
|
@@ -118,6 +120,16 @@ module Coveralls
|
|
118
120
|
config[:commit_sha] = ENV['CI_BUILD_REF']
|
119
121
|
end
|
120
122
|
|
123
|
+
def define_service_params_for_buildkite(config)
|
124
|
+
config[:service_name] = 'buildkite'
|
125
|
+
config[:service_number] = ENV['BUILDKITE_BUILD_NUMBER']
|
126
|
+
config[:service_job_id] = ENV['BUILDKITE_BUILD_ID']
|
127
|
+
config[:service_branch] = ENV['BUILDKITE_BRANCH']
|
128
|
+
config[:service_build_url] = ENV['BUILDKITE_BUILD_URL']
|
129
|
+
config[:service_pull_request] = ENV['BUILDKITE_PULL_REQUEST']
|
130
|
+
config[:commit_sha] = ENV['BUILDKITE_COMMIT']
|
131
|
+
end
|
132
|
+
|
121
133
|
def define_service_params_for_coveralls_local(config)
|
122
134
|
config[:service_job_id] = nil
|
123
135
|
config[:service_name] = 'coveralls-ruby'
|
data/lib/coveralls/version.rb
CHANGED
@@ -85,6 +85,7 @@ describe Coveralls::Configuration do
|
|
85
85
|
appveyor: 'APPVEYOR',
|
86
86
|
circleci: 'CIRCLECI',
|
87
87
|
gitlab: 'GITLAB_CI',
|
88
|
+
buildkite: 'BUILDKITE',
|
88
89
|
jenkins: 'JENKINS_URL',
|
89
90
|
semaphore: 'SEMAPHORE',
|
90
91
|
tddium: 'TDDIUM',
|
@@ -146,6 +147,10 @@ describe Coveralls::Configuration do
|
|
146
147
|
it_behaves_like 'a service', :gitlab
|
147
148
|
end
|
148
149
|
|
150
|
+
context 'when using Buildkite' do
|
151
|
+
it_behaves_like 'a service', :buildkite
|
152
|
+
end
|
153
|
+
|
149
154
|
context 'when using Jenkins' do
|
150
155
|
it_behaves_like 'a service', :jenkins
|
151
156
|
end
|
@@ -257,6 +262,38 @@ describe Coveralls::Configuration do
|
|
257
262
|
end
|
258
263
|
end
|
259
264
|
|
265
|
+
describe '.define_service_params_for_buildkite' do
|
266
|
+
let(:service_number) { 5678 }
|
267
|
+
let(:service_job_id) { 1234 }
|
268
|
+
let(:service_branch) { 'feature' }
|
269
|
+
let(:service_build_url) { SecureRandom.hex(4) }
|
270
|
+
let(:service_pull_request) { SecureRandom.hex(4) }
|
271
|
+
let(:commit_sha) { SecureRandom.hex(32) }
|
272
|
+
|
273
|
+
before do
|
274
|
+
allow(ENV).to receive(:[]).with('BUILDKITE_BUILD_NUMBER').and_return(service_number)
|
275
|
+
allow(ENV).to receive(:[]).with('BUILDKITE_BUILD_ID').and_return(service_job_id)
|
276
|
+
allow(ENV).to receive(:[]).with('BUILDKITE_BRANCH').and_return(service_branch)
|
277
|
+
allow(ENV).to receive(:[]).with('BUILDKITE_BUILD_URL').and_return(service_build_url)
|
278
|
+
allow(ENV).to receive(:[]).with('BUILDKITE_PULL_REQUEST').and_return(service_pull_request)
|
279
|
+
allow(ENV).to receive(:[]).with('BUILDKITE_COMMIT').and_return(commit_sha)
|
280
|
+
end
|
281
|
+
|
282
|
+
it 'sets the expected parameters' do
|
283
|
+
config = {}
|
284
|
+
described_class.define_service_params_for_buildkite(config)
|
285
|
+
expect(config).to include(
|
286
|
+
service_name: 'buildkite',
|
287
|
+
service_number: service_number,
|
288
|
+
service_job_id: service_job_id,
|
289
|
+
service_branch: service_branch,
|
290
|
+
service_build_url: service_build_url,
|
291
|
+
service_pull_request: service_pull_request,
|
292
|
+
commit_sha: commit_sha
|
293
|
+
)
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
260
297
|
describe '.define_service_params_for_semaphore' do
|
261
298
|
let(:semaphore_workflow_id) { 1234 }
|
262
299
|
let(:semaphore_git_pr_number) { 10 }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coveralls_reborn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.27.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Merwin
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2023-02-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: simplecov
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
|
-
rubygems_version: 3.
|
166
|
+
rubygems_version: 3.4.6
|
167
167
|
signing_key:
|
168
168
|
specification_version: 4
|
169
169
|
summary: A Ruby implementation of the Coveralls API.
|