coveralls_reborn 0.23.1 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +7 -1
- data/Gemfile +5 -8
- data/README.md +1 -1
- data/lib/coveralls/configuration.rb +7 -6
- data/lib/coveralls/version.rb +1 -1
- data/spec/coveralls/configuration_spec.rb +75 -42
- data/spec/spec_helper.rb +8 -9
- 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: 2f00e319a2e891af3bd8577ba9dd1ea88117b686562ba6332134aafffffd65b2
|
4
|
+
data.tar.gz: cca9cae70a90f4342594db68d91b7be0080ccbf534f00f9e6276ef99980f28ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efd993c1e74eaeb537eb6d081f632706f17fcfe86e1c0ed8cc45efa70862eafa5acac96732929a9a7aabdfa28c2fca104d980210696aa3aef4b2f250baedb32c
|
7
|
+
data.tar.gz: d1ce6ca63c6aee73c63830e80a3a8dc942eb8500429e80fcc453a35aa35ca5eba75d8a6798bbf75b794398781b5581dec18b2040c490e5bf1779a4456fde527c
|
data/.github/workflows/ruby.yml
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.24.0 / 2022-03-11
|
4
|
+
|
5
|
+
* [ENHANCEMENT] Test against Ruby 3.1
|
6
|
+
* [BUGFIX] Fix Circle CI configuration [#30](https://github.com/tagliala/coveralls-ruby-reborn/issues/30)
|
7
|
+
* [BUGFIX] Fix Semaphore CI configuration [#34](https://github.com/tagliala/coveralls-ruby-reborn/pull/34)
|
8
|
+
|
3
9
|
## 0.23.1 / 2021-11-15
|
4
10
|
|
5
11
|
* [ENHANCEMENT] Require MFA to publish gems
|
@@ -7,7 +13,7 @@
|
|
7
13
|
|
8
14
|
## 0.23.0 / 2021-09-12
|
9
15
|
|
10
|
-
* [FEATURE] Send branches coverage [#27](https://github.com/tagliala/coveralls-ruby-reborn/pull/27
|
16
|
+
* [FEATURE] Send branches coverage [#27](https://github.com/tagliala/coveralls-ruby-reborn/pull/27)
|
11
17
|
|
12
18
|
## 0.22.0 / 2021-04-30
|
13
19
|
|
data/Gemfile
CHANGED
@@ -9,15 +9,12 @@ platforms :jruby do
|
|
9
9
|
gem 'jruby-openssl', '~> 0.11.0'
|
10
10
|
end
|
11
11
|
|
12
|
-
gem 'byebug', '~> 11.1', platforms: %i[mri mingw x64_mingw]
|
13
|
-
gem 'pry', '~> 0.13.1'
|
14
|
-
gem 'pry-byebug', '~> 3.9', platforms: %i[mri mingw x64_mingw]
|
15
12
|
gem 'rake', '~> 13.0'
|
16
|
-
gem 'rspec', '~> 3.
|
17
|
-
gem 'rubocop', '~> 1.
|
18
|
-
gem 'rubocop-performance', '~> 1.
|
13
|
+
gem 'rspec', '~> 3.11'
|
14
|
+
gem 'rubocop', '~> 1.26'
|
15
|
+
gem 'rubocop-performance', '~> 1.13'
|
19
16
|
gem 'rubocop-rake', '~> 0.6.0'
|
20
|
-
gem 'rubocop-rspec', '~> 2.
|
17
|
+
gem 'rubocop-rspec', '~> 2.9'
|
21
18
|
gem 'truthy', '~> 1.0'
|
22
|
-
gem 'vcr', '~> 6.0'
|
19
|
+
gem 'vcr', '~> 6.0', github: 'vcr/vcr', ref: '9bb8d2c6f81a6720082a6db86ee11f4b82685d63' # TODO: revert to stable when Ruby 3.1 will be supported
|
23
20
|
gem 'webmock', '~> 3.14'
|
data/README.md
CHANGED
@@ -68,16 +68,17 @@ module Coveralls
|
|
68
68
|
|
69
69
|
def define_service_params_for_circleci(config)
|
70
70
|
config[:service_name] = 'circleci'
|
71
|
-
config[:service_number] = ENV['
|
72
|
-
config[:service_pull_request] =
|
73
|
-
config[:
|
74
|
-
config[:
|
71
|
+
config[:service_number] = ENV['CIRCLE_WORKFLOW_ID']
|
72
|
+
config[:service_pull_request] = ENV['CI_PULL_REQUEST'].split('/pull/')[1] unless ENV['CI_PULL_REQUEST'].nil?
|
73
|
+
config[:service_job_number] = ENV['CIRCLE_BUILD_NUM']
|
74
|
+
config[:git_commit] = ENV['CIRCLE_SHA1']
|
75
|
+
config[:git_branch] = ENV['CIRCLE_BRANCH']
|
75
76
|
end
|
76
77
|
|
77
78
|
def define_service_params_for_semaphore(config)
|
78
79
|
config[:service_name] = 'semaphore'
|
79
|
-
config[:service_number] = ENV['
|
80
|
-
config[:
|
80
|
+
config[:service_number] = ENV['SEMAPHORE_WORKFLOW_ID']
|
81
|
+
config[:service_branch] = ENV['SEMAPHORE_GIT_BRANCH']
|
81
82
|
end
|
82
83
|
|
83
84
|
def define_service_params_for_jenkins(config)
|
data/lib/coveralls/version.rb
CHANGED
@@ -200,17 +200,31 @@ describe Coveralls::Configuration do
|
|
200
200
|
end
|
201
201
|
|
202
202
|
describe '.define_service_params_for_circleci' do
|
203
|
+
let(:circle_workflow_id) { 1234 }
|
204
|
+
let(:ci_pull_request) { 'repo/pull/12' }
|
203
205
|
let(:circle_build_num) { SecureRandom.hex(4) }
|
206
|
+
let(:circle_sha1) { SecureRandom.hex(32) }
|
207
|
+
let(:circle_branch) { SecureRandom.hex(4) }
|
204
208
|
|
205
209
|
before do
|
210
|
+
allow(ENV).to receive(:[]).with('CIRCLE_WORKFLOW_ID').and_return(circle_workflow_id)
|
211
|
+
allow(ENV).to receive(:[]).with('CI_PULL_REQUEST').and_return(ci_pull_request)
|
206
212
|
allow(ENV).to receive(:[]).with('CIRCLE_BUILD_NUM').and_return(circle_build_num)
|
213
|
+
allow(ENV).to receive(:[]).with('CIRCLE_SHA1').and_return(circle_sha1)
|
214
|
+
allow(ENV).to receive(:[]).with('CIRCLE_BRANCH').and_return(circle_branch)
|
207
215
|
end
|
208
216
|
|
209
217
|
it 'sets the expected parameters' do
|
210
218
|
config = {}
|
211
219
|
described_class.define_service_params_for_circleci(config)
|
212
|
-
expect(config
|
213
|
-
|
220
|
+
expect(config).to include(
|
221
|
+
service_name: 'circleci',
|
222
|
+
service_number: circle_workflow_id,
|
223
|
+
service_pull_request: '12',
|
224
|
+
service_job_number: circle_build_num,
|
225
|
+
git_commit: circle_sha1,
|
226
|
+
git_branch: circle_branch
|
227
|
+
)
|
214
228
|
end
|
215
229
|
end
|
216
230
|
|
@@ -232,27 +246,34 @@ describe Coveralls::Configuration do
|
|
232
246
|
it 'sets the expected parameters' do
|
233
247
|
config = {}
|
234
248
|
described_class.define_service_params_for_gitlab(config)
|
235
|
-
expect(config
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
249
|
+
expect(config).to include(
|
250
|
+
service_name: 'gitlab-ci',
|
251
|
+
service_number: service_number,
|
252
|
+
service_job_number: service_job_number,
|
253
|
+
service_job_id: service_job_id,
|
254
|
+
service_branch: service_branch,
|
255
|
+
commit_sha: commit_sha
|
256
|
+
)
|
241
257
|
end
|
242
258
|
end
|
243
259
|
|
244
260
|
describe '.define_service_params_for_semaphore' do
|
245
|
-
let(:
|
261
|
+
let(:semaphore_workflow_id) { 1234 }
|
262
|
+
let(:semaphore_git_branch) { 'a-branch' }
|
246
263
|
|
247
264
|
before do
|
248
|
-
allow(ENV).to receive(:[]).with('
|
265
|
+
allow(ENV).to receive(:[]).with('SEMAPHORE_WORKFLOW_ID').and_return(semaphore_workflow_id)
|
266
|
+
allow(ENV).to receive(:[]).with('SEMAPHORE_GIT_BRANCH').and_return(semaphore_git_branch)
|
249
267
|
end
|
250
268
|
|
251
269
|
it 'sets the expected parameters' do
|
252
270
|
config = {}
|
253
271
|
described_class.define_service_params_for_semaphore(config)
|
254
|
-
expect(config
|
255
|
-
|
272
|
+
expect(config).to include(
|
273
|
+
service_name: 'semaphore',
|
274
|
+
service_number: semaphore_workflow_id,
|
275
|
+
service_branch: semaphore_git_branch
|
276
|
+
)
|
256
277
|
end
|
257
278
|
end
|
258
279
|
|
@@ -267,11 +288,13 @@ describe Coveralls::Configuration do
|
|
267
288
|
|
268
289
|
it 'sets the expected parameters' do
|
269
290
|
config = {}
|
270
|
-
described_class.define_service_params_for_jenkins
|
271
|
-
described_class.define_standard_service_params_for_generic_ci
|
272
|
-
expect(config
|
273
|
-
|
274
|
-
|
291
|
+
described_class.define_service_params_for_jenkins config
|
292
|
+
described_class.define_standard_service_params_for_generic_ci config
|
293
|
+
expect(config).to include(
|
294
|
+
service_name: 'jenkins',
|
295
|
+
service_number: build_num,
|
296
|
+
service_pull_request: service_pull_request
|
297
|
+
)
|
275
298
|
end
|
276
299
|
end
|
277
300
|
|
@@ -279,9 +302,11 @@ describe Coveralls::Configuration do
|
|
279
302
|
it 'sets the expected parameters' do
|
280
303
|
config = {}
|
281
304
|
described_class.define_service_params_for_coveralls_local(config)
|
282
|
-
expect(config
|
283
|
-
|
284
|
-
|
305
|
+
expect(config).to include(
|
306
|
+
service_name: 'coveralls-ruby',
|
307
|
+
service_job_id: nil,
|
308
|
+
service_event_type: 'manual'
|
309
|
+
)
|
285
310
|
end
|
286
311
|
end
|
287
312
|
|
@@ -303,11 +328,13 @@ describe Coveralls::Configuration do
|
|
303
328
|
it 'sets the expected parameters' do
|
304
329
|
config = {}
|
305
330
|
described_class.define_standard_service_params_for_generic_ci(config)
|
306
|
-
expect(config
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
331
|
+
expect(config).to include(
|
332
|
+
service_name: service_name,
|
333
|
+
service_number: service_number,
|
334
|
+
service_build_url: service_build_url,
|
335
|
+
service_branch: service_branch,
|
336
|
+
service_pull_request: service_pull_request
|
337
|
+
)
|
311
338
|
end
|
312
339
|
end
|
313
340
|
|
@@ -327,11 +354,13 @@ describe Coveralls::Configuration do
|
|
327
354
|
it 'sets the expected parameters' do
|
328
355
|
config = {}
|
329
356
|
described_class.define_service_params_for_appveyor(config)
|
330
|
-
expect(config
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
357
|
+
expect(config).to include(
|
358
|
+
service_name: 'appveyor',
|
359
|
+
service_number: service_number,
|
360
|
+
service_branch: service_branch,
|
361
|
+
commit_sha: commit_sha,
|
362
|
+
service_build_url: format('https://ci.appveyor.com/project/%<repo_name>s/build/%<service_number>s', repo_name: repo_name, service_number: service_number)
|
363
|
+
)
|
335
364
|
end
|
336
365
|
end
|
337
366
|
|
@@ -351,12 +380,14 @@ describe Coveralls::Configuration do
|
|
351
380
|
it 'sets the expected parameters' do
|
352
381
|
config = {}
|
353
382
|
described_class.define_service_params_for_tddium(config)
|
354
|
-
expect(config
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
383
|
+
expect(config).to include(
|
384
|
+
service_name: 'tddium',
|
385
|
+
service_number: service_number,
|
386
|
+
service_job_number: service_job_number,
|
387
|
+
service_pull_request: service_pull_request,
|
388
|
+
service_branch: service_branch,
|
389
|
+
service_build_url: format('https://ci.solanolabs.com/reports/%<service_number>s', service_number: service_number)
|
390
|
+
)
|
360
391
|
end
|
361
392
|
end
|
362
393
|
|
@@ -381,13 +412,15 @@ describe Coveralls::Configuration do
|
|
381
412
|
|
382
413
|
it 'uses ENV vars' do
|
383
414
|
config = described_class.git
|
384
|
-
expect(config[:head][:id]).to eq(git_id)
|
385
|
-
expect(config[:head][:author_name]).to eq(author_name)
|
386
|
-
expect(config[:head][:author_email]).to eq(author_email)
|
387
|
-
expect(config[:head][:committer_name]).to eq(committer_name)
|
388
|
-
expect(config[:head][:committer_email]).to eq(committer_email)
|
389
|
-
expect(config[:head][:message]).to eq(message)
|
390
415
|
expect(config[:branch]).to eq(branch)
|
416
|
+
expect(config[:head]).to include(
|
417
|
+
id: git_id,
|
418
|
+
author_name: author_name,
|
419
|
+
author_email: author_email,
|
420
|
+
committer_name: committer_name,
|
421
|
+
committer_email: committer_email,
|
422
|
+
message: message
|
423
|
+
)
|
391
424
|
end
|
392
425
|
end
|
393
426
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -4,8 +4,6 @@ require 'simplecov'
|
|
4
4
|
require 'webmock'
|
5
5
|
require 'vcr'
|
6
6
|
|
7
|
-
require 'pry'
|
8
|
-
|
9
7
|
class InceptionFormatter
|
10
8
|
def format(result)
|
11
9
|
Coveralls::SimpleCov::Formatter.new.format(result)
|
@@ -32,17 +30,18 @@ def setup_formatter
|
|
32
30
|
else
|
33
31
|
SimpleCov::Formatter::HTMLFormatter
|
34
32
|
end
|
35
|
-
|
36
|
-
SimpleCov.start do
|
37
|
-
add_filter do |source_file|
|
38
|
-
source_file.filename.include?('spec') && !source_file.filename.include?('fixture')
|
39
|
-
end
|
40
|
-
add_filter %r{/.bundle/}
|
41
|
-
end
|
42
33
|
end
|
43
34
|
|
44
35
|
setup_formatter
|
45
36
|
|
37
|
+
SimpleCov.start do
|
38
|
+
add_filter do |source_file|
|
39
|
+
source_file.filename.include?('spec') && !source_file.filename.include?('fixture')
|
40
|
+
end
|
41
|
+
add_filter %r{/.bundle/}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Leave this require after SimpleCov.start
|
46
45
|
require 'coveralls'
|
47
46
|
|
48
47
|
VCR.configure do |c|
|
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.24.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: 2022-03-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: simplecov
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: '0'
|
183
183
|
requirements: []
|
184
|
-
rubygems_version: 3.
|
184
|
+
rubygems_version: 3.2.3
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: A Ruby implementation of the Coveralls API.
|