coveralls_reborn 0.15.0 → 0.19.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 +6 -2
- data/.travis.yml +9 -7
- data/CHANGELOG.md +24 -0
- data/Gemfile +9 -8
- data/README.md +2 -2
- data/Rakefile +0 -1
- data/bin/coveralls +1 -1
- data/coveralls-ruby.gemspec +6 -5
- data/lib/coveralls.rb +1 -1
- data/lib/coveralls/api.rb +5 -13
- data/lib/coveralls/command.rb +4 -4
- data/lib/coveralls/configuration.rb +4 -5
- data/lib/coveralls/rake/task.rb +1 -1
- data/lib/coveralls/simplecov.rb +7 -7
- data/lib/coveralls/version.rb +1 -1
- data/spec/coveralls/coveralls_spec.rb +2 -2
- data/spec/spec_helper.rb +4 -6
- metadata +16 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bc12f5b88635ba1f1ccef5bbb0bf35582968a2596ec8560f68dd331b8484dbb
|
4
|
+
data.tar.gz: 150ab6de22220b3b5621f96db48338999fcc8f03d9656d08764f51a783e5672f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9e6dd6bbdca328fd172be5af7fddc549e3c9ecd3cb1d95f39bde3514fda2878cd56c37c41449f91e01e2a2499b6ecee6999c4519fcb80e6fc197215c9d2604e
|
7
|
+
data.tar.gz: 98b81b28d1dcc376c24f19acaa7e1f41194df8e63d12d92277a8a048629930fd3c406010e431039b924f4a589c38a83625ce9c70224976e56a97614b2a37ff6e
|
data/.rubocop.yml
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
require:
|
2
2
|
- rubocop-performance
|
3
|
+
- rubocop-rake
|
3
4
|
- rubocop-rspec
|
4
5
|
|
5
6
|
AllCops:
|
6
|
-
|
7
|
+
NewCops: enable
|
7
8
|
Exclude:
|
8
9
|
- 'spec/coveralls/fixtures/**/*'
|
9
10
|
- 'vendor/bundle/**/*'
|
@@ -16,7 +17,7 @@ Layout/LineLength:
|
|
16
17
|
Enabled: false
|
17
18
|
|
18
19
|
Metrics/AbcSize:
|
19
|
-
Max:
|
20
|
+
Max: 44.11
|
20
21
|
|
21
22
|
Metrics/CyclomaticComplexity:
|
22
23
|
Max: 19
|
@@ -42,6 +43,9 @@ RSpec/ExampleLength:
|
|
42
43
|
RSpec/MultipleExpectations:
|
43
44
|
Enabled: false
|
44
45
|
|
46
|
+
RSpec/MultipleMemoizedHelpers:
|
47
|
+
Enabled: false
|
48
|
+
|
45
49
|
RSpec/NestedGroups:
|
46
50
|
Max: 4
|
47
51
|
|
data/.travis.yml
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
os: linux
|
2
|
+
dist: bionic
|
1
3
|
language: ruby
|
2
4
|
|
3
5
|
cache: bundler
|
@@ -10,15 +12,15 @@ env:
|
|
10
12
|
- JRUBY_OPTS="--dev --debug"
|
11
13
|
|
12
14
|
rvm:
|
13
|
-
- 2.4.
|
14
|
-
- 2.5.
|
15
|
-
- 2.6.
|
16
|
-
- 2.7.
|
15
|
+
- 2.4.10
|
16
|
+
- 2.5.8
|
17
|
+
- 2.6.6
|
18
|
+
- 2.7.2
|
17
19
|
- ruby-head
|
18
|
-
- jruby-9.2.
|
20
|
+
- jruby-9.2.13.0
|
19
21
|
|
20
|
-
|
22
|
+
jobs:
|
21
23
|
allow_failures:
|
22
24
|
- rvm: ruby-head
|
23
|
-
- rvm: jruby-9.2.
|
25
|
+
- rvm: jruby-9.2.13.0
|
24
26
|
fast_finish: true
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.19.0 / 2020-12-02
|
4
|
+
|
5
|
+
* [FEATURE] Add SimpleCov 0.20.0 compatibility
|
6
|
+
|
7
|
+
## 0.18.0 / 2020-09-07
|
8
|
+
|
9
|
+
* [ENHANCEMENT] Refactor HTTP client [#10](https://github.com/tagliala/coveralls-ruby-reborn/pull/10)
|
10
|
+
* [ENHANCEMENT] Update dependencies
|
11
|
+
|
12
|
+
## 0.17.0 / 2020-08-26
|
13
|
+
|
14
|
+
* [FEATURE] Add SimpleCov 0.19.0 compatibility
|
15
|
+
* [ENHANCEMENT] Update dependencies
|
16
|
+
|
17
|
+
## 0.16.0 / 2020-04-30
|
18
|
+
|
19
|
+
* [FEATURE] Remove dependency on json gem [#4](https://github.com/tagliala/coveralls-ruby-reborn/pull/4)
|
20
|
+
* [ENHANCEMENT] Update dependencies
|
21
|
+
|
22
|
+
## 0.15.1 / 2020-04-17
|
23
|
+
|
24
|
+
* [ENHANCEMENT] Test against latest Ruby versions
|
25
|
+
* [ENHANCEMENT] Update dependencies
|
26
|
+
|
3
27
|
## 0.15.0 / 2020-02-01
|
4
28
|
|
5
29
|
* [FEATURE] Add SimpleCov 0.18.1 compatibility
|
data/Gemfile
CHANGED
@@ -11,17 +11,18 @@ end
|
|
11
11
|
|
12
12
|
group :development do
|
13
13
|
gem 'rake', '~> 13.0'
|
14
|
-
gem 'rspec', '~> 3.
|
15
|
-
gem 'rubocop', '~>
|
16
|
-
gem 'rubocop-performance', '~> 1.
|
17
|
-
gem 'rubocop-
|
14
|
+
gem 'rspec', '~> 3.10'
|
15
|
+
gem 'rubocop', '~> 1.5'
|
16
|
+
gem 'rubocop-performance', '~> 1.9'
|
17
|
+
gem 'rubocop-rake', '~> 0.5.1'
|
18
|
+
gem 'rubocop-rspec', '~> 2.0'
|
18
19
|
gem 'truthy', '~> 1.0'
|
19
|
-
gem 'vcr', '~>
|
20
|
-
gem 'webmock', '~> 3.
|
20
|
+
gem 'vcr', '~> 6.0'
|
21
|
+
gem 'webmock', '~> 3.10'
|
21
22
|
end
|
22
23
|
|
23
24
|
group :development, :test do
|
24
25
|
gem 'byebug', '~> 11.1', platforms: %i[mri mingw x64_mingw]
|
25
|
-
gem 'pry', '~> 0.
|
26
|
-
gem 'pry-byebug', '~> 3.
|
26
|
+
gem 'pry', '~> 0.13.1'
|
27
|
+
gem 'pry-byebug', '~> 3.9', platforms: %i[mri mingw x64_mingw]
|
27
28
|
end
|
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# [Coveralls Reborn](http://coveralls.io) for Ruby [![Coverage Status](https://coveralls.io/repos/github/tagliala/coveralls-ruby-reborn/badge.svg?branch=master)](https://coveralls.io/github/tagliala/coveralls-ruby-reborn?branch=master) [![Build Status](https://secure.travis-ci.org/tagliala/coveralls-ruby-reborn.svg?branch=master)](https://travis-ci.org/tagliala/coveralls-ruby-reborn) [![Gem Version](https://badge.fury.io/rb/coveralls_reborn.svg)](http://badge.fury.io/rb/coveralls_reborn)
|
2
2
|
|
3
|
-
### [Read the docs →](https://coveralls.
|
3
|
+
### [Read the docs →](https://docs.coveralls.io/ruby-on-rails)
|
4
4
|
|
5
5
|
An up-to-date fork of [lemurheavy/coveralls-ruby](https://github.com/lemurheavy/coveralls-ruby)
|
6
6
|
|
7
7
|
Add to your `Gemfile`:
|
8
8
|
|
9
9
|
```rb
|
10
|
-
gem 'coveralls_reborn', '~> 0.
|
10
|
+
gem 'coveralls_reborn', '~> 0.19.0', require: false
|
11
11
|
```
|
data/Rakefile
CHANGED
data/bin/coveralls
CHANGED
data/coveralls-ruby.gemspec
CHANGED
@@ -18,13 +18,14 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.name = 'coveralls_reborn'
|
19
19
|
gem.require_paths = ['lib']
|
20
20
|
gem.version = Coveralls::VERSION
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
|
22
|
+
gem.metadata['bug_tracker_uri'] = 'https://github.com/tagliala/coveralls-ruby-reborn/issues'
|
23
|
+
gem.metadata['changelog_uri'] = 'https://github.com/tagliala/coveralls-ruby-reborn/blob/master/CHANGELOG.md'
|
24
|
+
gem.metadata['source_code_uri'] = 'https://github.com/tagliala/coveralls-ruby-reborn'
|
25
|
+
|
24
26
|
gem.required_ruby_version = '>= 2.4'
|
25
27
|
|
26
|
-
gem.add_dependency '
|
27
|
-
gem.add_dependency 'simplecov', '~> 0.18.1'
|
28
|
+
gem.add_dependency 'simplecov', '>= 0.18.1', '< 0.21.0'
|
28
29
|
gem.add_dependency 'term-ansicolor', '~> 1.6'
|
29
30
|
gem.add_dependency 'thor', '>= 0.20.3', '< 2.0'
|
30
31
|
gem.add_dependency 'tins', '~> 1.16'
|
data/lib/coveralls.rb
CHANGED
@@ -66,7 +66,7 @@ module Coveralls
|
|
66
66
|
|
67
67
|
if simplecov_setting
|
68
68
|
Coveralls::Output.puts("[Coveralls] Using SimpleCov's '#{simplecov_setting}' settings.", color: 'green')
|
69
|
-
if
|
69
|
+
if block
|
70
70
|
::SimpleCov.start(simplecov_setting) { instance_eval(&block) }
|
71
71
|
else
|
72
72
|
::SimpleCov.start(simplecov_setting)
|
data/lib/coveralls/api.rb
CHANGED
@@ -53,9 +53,9 @@ module Coveralls
|
|
53
53
|
begin
|
54
54
|
require 'webmock'
|
55
55
|
|
56
|
-
allow = WebMock::Config.instance.allow
|
57
|
-
WebMock::Config.instance.allow =
|
58
|
-
rescue LoadError
|
56
|
+
allow = Array(WebMock::Config.instance.allow)
|
57
|
+
WebMock::Config.instance.allow = allow.push API_HOST
|
58
|
+
rescue LoadError
|
59
59
|
rescue StandardError => e
|
60
60
|
# TODO: Add error action
|
61
61
|
puts e.message
|
@@ -67,7 +67,7 @@ module Coveralls
|
|
67
67
|
VCR.send(VCR.version.major < 2 ? :config : :configure) do |c|
|
68
68
|
c.ignore_hosts API_HOST
|
69
69
|
end
|
70
|
-
rescue LoadError
|
70
|
+
rescue LoadError
|
71
71
|
rescue StandardError => e
|
72
72
|
# TODO: Add error action
|
73
73
|
puts e.message
|
@@ -80,15 +80,7 @@ module Coveralls
|
|
80
80
|
|
81
81
|
def build_client(uri)
|
82
82
|
client = Net::HTTP.new(uri.host, uri.port)
|
83
|
-
client.use_ssl =
|
84
|
-
client.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
85
|
-
|
86
|
-
unless client.respond_to?(:ssl_version=)
|
87
|
-
Net::HTTP.ssl_context_accessor('ssl_version')
|
88
|
-
end
|
89
|
-
|
90
|
-
client.ssl_version = 'TLSv1'
|
91
|
-
|
83
|
+
client.use_ssl = uri.port == 443
|
92
84
|
client
|
93
85
|
end
|
94
86
|
|
data/lib/coveralls/command.rb
CHANGED
@@ -13,10 +13,10 @@ module Coveralls
|
|
13
13
|
|
14
14
|
if File.exist?('.travis.yml')
|
15
15
|
cmds = begin
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
YAML.load_file('.travis.yml')['script'] || cmds
|
17
|
+
rescue StandardError
|
18
|
+
cmds
|
19
|
+
end
|
20
20
|
end
|
21
21
|
|
22
22
|
cmds.each { |cmd| system cmd }
|
@@ -180,7 +180,7 @@ module Coveralls
|
|
180
180
|
remotes = nil
|
181
181
|
begin
|
182
182
|
remotes = `git remote -v`.split(/\n/).map do |remote|
|
183
|
-
splits = remote.split
|
183
|
+
splits = remote.split.compact
|
184
184
|
{ name: splits[0], url: splits[1] }
|
185
185
|
end.uniq
|
186
186
|
rescue StandardError => e
|
@@ -199,14 +199,14 @@ module Coveralls
|
|
199
199
|
end
|
200
200
|
|
201
201
|
def relevant_env
|
202
|
-
|
202
|
+
base_env = {
|
203
203
|
pwd: pwd,
|
204
204
|
rails_root: rails_root,
|
205
205
|
simplecov_root: simplecov_root,
|
206
206
|
gem_version: VERSION
|
207
207
|
}
|
208
208
|
|
209
|
-
|
209
|
+
service_env =
|
210
210
|
if ENV['TRAVIS']
|
211
211
|
travis_env_hash
|
212
212
|
elsif ENV['CIRCLECI']
|
@@ -218,9 +218,8 @@ module Coveralls
|
|
218
218
|
else
|
219
219
|
{}
|
220
220
|
end
|
221
|
-
end
|
222
221
|
|
223
|
-
|
222
|
+
base_env.merge! service_env
|
224
223
|
end
|
225
224
|
|
226
225
|
private
|
data/lib/coveralls/rake/task.rb
CHANGED
@@ -7,7 +7,7 @@ module Coveralls
|
|
7
7
|
class RakeTask < ::Rake::TaskLib
|
8
8
|
include ::Rake::DSL if defined?(::Rake::DSL)
|
9
9
|
|
10
|
-
def initialize(*_args)
|
10
|
+
def initialize(*_args) # rubocop:disable Lint/MissingSuper
|
11
11
|
namespace :coveralls do
|
12
12
|
desc 'Push latest coverage results to Coveralls.io'
|
13
13
|
task :push do
|
data/lib/coveralls/simplecov.rb
CHANGED
@@ -7,10 +7,10 @@ module Coveralls
|
|
7
7
|
class Formatter
|
8
8
|
def display_result(result)
|
9
9
|
# Log which files would be submitted.
|
10
|
-
if
|
11
|
-
Coveralls::Output.puts '[Coveralls] Some handy coverage stats:'
|
12
|
-
else
|
10
|
+
if result.files.empty?
|
13
11
|
Coveralls::Output.puts '[Coveralls] There are no covered files.', color: 'yellow'
|
12
|
+
else
|
13
|
+
Coveralls::Output.puts '[Coveralls] Some handy coverage stats:'
|
14
14
|
end
|
15
15
|
|
16
16
|
result.files.each do |f|
|
@@ -95,10 +95,10 @@ module Coveralls
|
|
95
95
|
|
96
96
|
def output_message(result)
|
97
97
|
"Coverage is at #{begin
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
98
|
+
result.covered_percent.round(2)
|
99
|
+
rescue StandardError
|
100
|
+
result.covered_percent.round
|
101
|
+
end}%.\nCoverage report sent to Coveralls."
|
102
102
|
end
|
103
103
|
|
104
104
|
def short_filename(filename)
|
data/lib/coveralls/version.rb
CHANGED
@@ -91,12 +91,12 @@ describe Coveralls do
|
|
91
91
|
|
92
92
|
describe '#setup!' do
|
93
93
|
it 'sets SimpleCov adapter' do
|
94
|
-
# rubocop:disable RSpec/LeakyConstantDeclaration
|
94
|
+
# rubocop:disable Lint/ConstantDefinitionInBlock, RSpec/LeakyConstantDeclaration
|
95
95
|
SimpleCovTmp = SimpleCov
|
96
96
|
Object.send :remove_const, :SimpleCov
|
97
97
|
silence { described_class.setup! }
|
98
98
|
SimpleCov = SimpleCovTmp
|
99
|
-
# rubocop:enable RSpec/LeakyConstantDeclaration
|
99
|
+
# rubocop:enable Lint/ConstantDefinitionInBlock, RSpec/LeakyConstantDeclaration
|
100
100
|
end
|
101
101
|
end
|
102
102
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -21,7 +21,7 @@ def setup_formatter
|
|
21
21
|
|
22
22
|
SimpleCov.start do
|
23
23
|
add_filter do |source_file|
|
24
|
-
source_file.filename
|
24
|
+
source_file.filename.include?('spec') && !source_file.filename.include?('fixture')
|
25
25
|
end
|
26
26
|
add_filter %r{/.bundle/}
|
27
27
|
end
|
@@ -49,7 +49,7 @@ end
|
|
49
49
|
|
50
50
|
def stub_api_post
|
51
51
|
body = '{"message":"","url":""}'
|
52
|
-
stub_request(:post, Coveralls::API::API_BASE
|
52
|
+
stub_request(:post, "#{Coveralls::API::API_BASE}/jobs").with(
|
53
53
|
headers: {
|
54
54
|
'Accept' => '*/*; q=0.5, application/xml',
|
55
55
|
'Accept-Encoding' => 'gzip, deflate',
|
@@ -60,12 +60,10 @@ def stub_api_post
|
|
60
60
|
).to_return(status: 200, body: body, headers: {})
|
61
61
|
end
|
62
62
|
|
63
|
-
def silence
|
63
|
+
def silence(&block)
|
64
64
|
return yield if ENV['silence'] == 'false'
|
65
65
|
|
66
|
-
silence_stream(
|
67
|
-
yield
|
68
|
-
end
|
66
|
+
silence_stream($stdout, &block)
|
69
67
|
end
|
70
68
|
|
71
69
|
def silence_stream(stream)
|
metadata
CHANGED
@@ -1,45 +1,37 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coveralls_reborn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Merwin
|
8
8
|
- Wil Gieseler
|
9
9
|
- Geremia Taglialatela
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-02
|
13
|
+
date: 2020-12-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: json
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
requirements:
|
19
|
-
- - "~>"
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '2.1'
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
requirements:
|
26
|
-
- - "~>"
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
version: '2.1'
|
29
15
|
- !ruby/object:Gem::Dependency
|
30
16
|
name: simplecov
|
31
17
|
requirement: !ruby/object:Gem::Requirement
|
32
18
|
requirements:
|
33
|
-
- - "
|
19
|
+
- - ">="
|
34
20
|
- !ruby/object:Gem::Version
|
35
21
|
version: 0.18.1
|
22
|
+
- - "<"
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 0.21.0
|
36
25
|
type: :runtime
|
37
26
|
prerelease: false
|
38
27
|
version_requirements: !ruby/object:Gem::Requirement
|
39
28
|
requirements:
|
40
|
-
- - "
|
29
|
+
- - ">="
|
41
30
|
- !ruby/object:Gem::Version
|
42
31
|
version: 0.18.1
|
32
|
+
- - "<"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.21.0
|
43
35
|
- !ruby/object:Gem::Dependency
|
44
36
|
name: term-ansicolor
|
45
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,8 +146,10 @@ homepage: https://coveralls.io
|
|
154
146
|
licenses:
|
155
147
|
- MIT
|
156
148
|
metadata:
|
149
|
+
bug_tracker_uri: https://github.com/tagliala/coveralls-ruby-reborn/issues
|
150
|
+
changelog_uri: https://github.com/tagliala/coveralls-ruby-reborn/blob/master/CHANGELOG.md
|
157
151
|
source_code_uri: https://github.com/tagliala/coveralls-ruby-reborn
|
158
|
-
post_install_message:
|
152
|
+
post_install_message:
|
159
153
|
rdoc_options: []
|
160
154
|
require_paths:
|
161
155
|
- lib
|
@@ -170,8 +164,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
164
|
- !ruby/object:Gem::Version
|
171
165
|
version: '0'
|
172
166
|
requirements: []
|
173
|
-
rubygems_version: 3.1.
|
174
|
-
signing_key:
|
167
|
+
rubygems_version: 3.1.4
|
168
|
+
signing_key:
|
175
169
|
specification_version: 4
|
176
170
|
summary: A Ruby implementation of the Coveralls API.
|
177
171
|
test_files:
|