Skip to content

Commit

Permalink
Merge pull request #18 from tagliala/ruby-3
Browse files Browse the repository at this point in the history
Ruby 3
  • Loading branch information
tagliala committed Jan 9, 2021
2 parents 94c5d7b + d9ca1ca commit 9788e2e
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 24 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Expand Up @@ -16,11 +16,12 @@ rvm:
- 2.5.8
- 2.6.6
- 2.7.2
- 3.0.0
- ruby-head
- jruby-9.2.13.0
- jruby-9.2.14.0

jobs:
allow_failures:
- rvm: ruby-head
- rvm: jruby-9.2.13.0
- rvm: jruby-9.2.14.0
fast_finish: true
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog

## 0.20.0 / 2021-01-09

* [FEATURE] Add Ruby 3 compatibility
* [FEATURE] Add SimpleCov 0.21.0 compatibility
* [ENHANCEMENT] Update dependencies

## 0.19.0 / 2020-12-02

* [FEATURE] Add SimpleCov 0.20.0 compatibility
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -12,7 +12,7 @@ end
group :development do
gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.10'
gem 'rubocop', '~> 1.5'
gem 'rubocop', '~> 1.8'
gem 'rubocop-performance', '~> 1.9'
gem 'rubocop-rake', '~> 0.5.1'
gem 'rubocop-rspec', '~> 2.1'
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Expand Up @@ -2,7 +2,7 @@ MIT License

Copyright (c) 2018 Wil Gieseler

Copyright (c) 2020 Geremia Taglialatela
Copyright (c) 2021 Geremia Taglialatela

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
@@ -1,4 +1,4 @@
# [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)
# [Coveralls Reborn](https://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)](https://badge.fury.io/rb/coveralls_reborn)

### [Read the docs →](https://docs.coveralls.io/ruby-on-rails)

Expand All @@ -7,5 +7,5 @@ An up-to-date fork of [lemurheavy/coveralls-ruby](https://github.com/lemurheavy/
Add to your `Gemfile`:

```rb
gem 'coveralls_reborn', '~> 0.19.0', require: false
gem 'coveralls_reborn', '~> 0.20.0', require: false
```
2 changes: 1 addition & 1 deletion coveralls-ruby.gemspec
Expand Up @@ -25,7 +25,7 @@ Gem::Specification.new do |gem|

gem.required_ruby_version = '>= 2.4'

gem.add_dependency 'simplecov', '>= 0.18.1', '< 0.21.0'
gem.add_dependency 'simplecov', '>= 0.18.1', '< 0.22.0'
gem.add_dependency 'term-ansicolor', '~> 1.6'
gem.add_dependency 'thor', '>= 0.20.3', '< 2.0'
gem.add_dependency 'tins', '~> 1.16'
Expand Down
2 changes: 1 addition & 1 deletion lib/coveralls/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Coveralls
VERSION = '0.19.0'
VERSION = '0.20.0'
end
8 changes: 8 additions & 0 deletions spec/coveralls/coveralls_spec.rb
Expand Up @@ -80,6 +80,14 @@
end

describe '#push!' do
let(:coverage_hash) do
{ 'file.rb'=>{ 'lines'=>[nil] } }
end

before do
allow(SimpleCov::ResultMerger).to receive(:merge_valid_results).and_return([['RSpec'], coverage_hash])
end

it 'sends existing test results' do
result = false
silence do
Expand Down
14 changes: 7 additions & 7 deletions spec/coveralls/simple_cov/formatter_spec.rb
Expand Up @@ -13,13 +13,13 @@ def source_fixture(filename)

let(:result) do
options = {
source_fixture('app/controllers/sample.rb') => [nil, 1, 1, 1, nil, 0, 1, 1, nil, nil],
source_fixture('app/models/airplane.rb') => [0, 0, 0, 0, 0],
source_fixture('app/models/dog.rb') => [1, 1, 1, 1, 1],
source_fixture('app/models/house.rb') => [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil],
source_fixture('app/models/robot.rb') => [1, 1, 1, 1, nil, nil, 1, 0, nil, nil],
source_fixture('app/models/user.rb') => [nil, 1, 1, 1, 1, 0, 1, 0, nil, nil],
source_fixture('sample.rb') => [nil, 1, 1, 1, nil, 0, 1, 1, nil, nil]
source_fixture('app/controllers/sample.rb') => { lines: [nil, 1, 1, 1, nil, 0, 1, 1, nil, nil] },
source_fixture('app/models/airplane.rb') => { lines: [0, 0, 0, 0, 0] },
source_fixture('app/models/dog.rb') => { lines: [1, 1, 1, 1, 1] },
source_fixture('app/models/house.rb') => { lines: [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil] },
source_fixture('app/models/robot.rb') => { lines: [1, 1, 1, 1, nil, nil, 1, 0, nil, nil] },
source_fixture('app/models/user.rb') => { lines: [nil, 1, 1, 1, 1, 0, 1, 0, nil, nil] },
source_fixture('sample.rb') => { lines: [nil, 1, 1, 1, nil, 0, 1, 1, nil, nil] }
}

SimpleCov::Result.new(options)
Expand Down
11 changes: 2 additions & 9 deletions spec/spec_helper.rb
Expand Up @@ -49,15 +49,8 @@ def setup_formatter

def stub_api_post
body = '{"message":"","url":""}'
stub_request(:post, "#{Coveralls::API::API_BASE}/jobs").with(
headers: {
'Accept' => '*/*; q=0.5, application/xml',
'Accept-Encoding' => 'gzip, deflate',
'Content-Length' => /.+/,
'Content-Type' => /.+/,
'User-Agent' => 'Ruby'
}
).to_return(status: 200, body: body, headers: {})
stub_request(:post, "#{Coveralls::API::API_BASE}/jobs")
.to_return(status: 200, body: body, headers: {})
end

def silence(&block)
Expand Down

0 comments on commit 9788e2e

Please sign in to comment.