{"id":13462972,"url":"https://github.com/lemurheavy/coveralls-ruby","last_synced_at":"2025-03-25T06:31:26.798Z","repository":{"id":4657212,"uuid":"5802947","full_name":"lemurheavy/coveralls-ruby","owner":"lemurheavy","description":"Coveralls for Ruby","archived":false,"fork":false,"pushed_at":"2022-08-24T14:21:20.000Z","size":254,"stargazers_count":130,"open_issues_count":5,"forks_count":118,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-10-29T13:50:11.687Z","etag":null,"topics":["code-quality","coverage","coveralls","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lemurheavy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-14T00:32:10.000Z","updated_at":"2024-05-18T21:02:49.000Z","dependencies_parsed_at":"2022-08-06T17:16:36.407Z","dependency_job_id":null,"html_url":"https://github.com/lemurheavy/coveralls-ruby","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemurheavy%2Fcoveralls-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemurheavy%2Fcoveralls-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemurheavy%2Fcoveralls-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemurheavy%2Fcoveralls-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemurheavy","download_url":"https://codeload.github.com/lemurheavy/coveralls-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245413787,"owners_count":20611353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-quality","coverage","coveralls","ruby"],"created_at":"2024-07-31T13:00:42.874Z","updated_at":"2025-03-25T06:31:26.791Z","avatar_url":"https://github.com/lemurheavy.png","language":"Ruby","readme":"# coveralls-ruby (ARCHIVED / READ-ONLY)\n\nThis repo is no longer maintained. \n\n- For [Ruby/Rails](https://docs.coveralls.io/ruby-and-rails) users, there is a **new fork** of this community-created Coveralls [Language Integration](https://docs.coveralls.io/integrations#language-integrations) that we now recommend in its place: https://github.com/tagliala/coveralls-ruby-reborn\n\n- **However**, the **official recommendation** from Coveralls.io is to **migrate to one of their [Official Integrations](https://docs.coveralls.io/integrations#official-integrations)**:\n\n  - [Coveralls GitHub Action](https://github.com/marketplace/actions/coveralls-github-action) if you're using GitHub Actions for CI;\n  - [Coveralls Orb for CircleCI](https://circleci.com/developer/orbs/orb/coveralls/coveralls) if you're using CircleCI for CI; and \n  - [Coveralls Universal Coverage Reporter](https://github.com/coverallsapp/coverage-reporter) (aka. \"**Coverage Reporter**\") if you're using any other CI service.\n\n---\n\n## Introduction\n\n[Coveralls.io](http://coveralls.io) was designed with Ruby projects in mind, so we've made it as easy as possible to get started using [Coveralls](http://coveralls.io) with Ruby and Rails project.\n\n### PREREQUISITES\n\n- Using a supported repo host ([GitHub](http://github.com/) | [Gitlab](https://gitlab.com/) | [Bitbucket](https://bitbucket.org/))\n- Building on a supported CI service (see [supported CI services](https://docs.coveralls.io/supported-ci-services) here)\n- Any Ruby project or test framework supported by [SimpleCov](https://github.com/colszowka/simplecov) is supported by the [coveralls-ruby](https://github.com/lemurheavy/coveralls-ruby) gem. This includes all your favorites, like [RSpec](http://rspec.info/), Cucumber, and Test::Unit.\n\n*Please note that [SimpleCov](https://github.com/colszowka/simplecov) only supports Ruby 1.9 and later.*\n\n### INSTALLING THE GEM\n\nYou shouldn't need more than a quick change to get your project on Coveralls. Just include [coveralls-ruby](https://github.com/lemurheavy/coveralls-ruby) in your project's Gemfile like so:\n\n```ruby\n# ./Gemfile\n\ngem 'coveralls', require: false\n```\n\nWhile [SimpleCov](https://github.com/colszowka/simplecov) only supports Ruby 1.9+, using the Coveralls gem will not fail builds on earlier Rubies or other flavors of Ruby.\n\n### CONFIGURATION\n\n[coveralls-ruby](https://github.com/lemurheavy/coveralls-ruby) uses an optional `.coveralls.yml` file at the root level of your repository to configure options.\n\nThe option `repo_token` (found on your repository's page on Coveralls) is used to specify which project on Coveralls your project maps to.\n\nAnother important configuration option is `service_name`, which indicates your CI service and allows you to specify where Coveralls should look to find additional information about your builds. This can be any string, but using the appropriate string for your service may allow Coveralls to perform service-specific actions like fetching branch data and commenting on pull requests.\n\n**Example: A .coveralls.yml file configured for Travis Pro:**\n\n```yml\nservice_name: travis-pro\n```\n\n**Example: Passing `repo_token` from the command line:**\n\n```\nCOVERALLS_REPO_TOKEN=asdfasdf bundle exec rspec spec\n```\n\n### TEST SUITE SETUP\n\nAfter configuration, the next step is to add [coveralls-ruby](https://github.com/lemurheavy/coveralls-ruby) to your test suite.\n\nFor a Ruby app:\n\n```ruby\n# ./spec/spec_helper.rb\n# ./test/test_helper.rb\n# ..etc..\n\nrequire 'coveralls'\nCoveralls.wear!\n```\n\nFor a Rails app:\n\n```ruby\nrequire 'coveralls'\nCoveralls.wear!('rails')\n```\n\n**Note:** The `Coveralls.wear!` must occur before any of your application code is required, so it should be at the **very top** of your `spec_helper.rb`, `test_helper.rb`, or `env.rb`, etc.\n\nAnd holy moly, you're done!\n\nNext time your project is built on CI, [SimpleCov](https://github.com/colszowka/simplecov) will dial up [Coveralls.io](https://coveralls.io) and send the hot details on your code coverage.\n\n### SIMPLECOV CUSTOMIZATION\n\n*\"But wait!\"* you're saying, *\"I already use SimpleCov, and I have some custom settings! Are you really just overriding everything I've already set up?\"*\n\nGood news, just use this gem's [SimpleCov](https://github.com/colszowka/simplecov) formatter directly:\n\n```ruby\nrequire 'simplecov'\nrequire 'coveralls'\n\nSimpleCov.formatter = Coveralls::SimpleCov::Formatter\nSimpleCov.start do\n  add_filter 'app/secrets'\nend\n```\n\nOr alongside another formatter, like so:\n\n```ruby\nrequire 'simplecov'\nrequire 'coveralls'\n\nSimpleCov.formatters = [\n  SimpleCov::Formatter::HTMLFormatter,\n  Coveralls::SimpleCov::Formatter\n]\nSimpleCov.start\n```\n\n### MERGING MULTIPLE TEST SUITES\n\nIf you're using more than one test suite and want the coverage results to be merged, use `Coveralls.wear_merged!` instead of `Coveralls.wear!`.\n\nOr, if you're using Coveralls alongside another [SimpleCov](https://github.com/colszowka/simplecov) formatter, simply omit the Coveralls formatter, then add the rake task `coveralls:push` to your `Rakefile` as a dependency to your testing task, like so:\n\n```ruby\nrequire 'coveralls/rake/task'\nCoveralls::RakeTask.new\ntask :test_with_coveralls =\u003e [:spec, :features, 'coveralls:push']\n```\n\nThis will prevent Coveralls from sending coverage data after each individual suite, instead waiting until [SimpleCov](https://github.com/colszowka/simplecov) has merged the results, which are then posted to [Coveralls.io](https://coveralls.io).\n\nUnless you've added `coveralls:push` to your default rake task, your build command will need to be updated on your CI to reflect this, for example:\n\n```console\nbundle exec rake :test_with_coveralls\n```\n\n*Read more about [SimpleCov's result merging](https://github.com/colszowka/simplecov#merging-results).*\n\n### MANUAL BUILDS VIA CLI\n\n[coveralls-ruby](https://github.com/lemurheavy/coveralls-ruby) also allows you to upload coverage data manually by running your test suite locally.\n\nTo do this with [RSpec](http://rspec.info/), just type `bundle exec coveralls push` in your project directory.\n\nThis will run [RSpec](http://rspec.info/) and upload the coverage data to [Coveralls.io](https://coveralls.io) as a one-off build, passing along any configuration options specified in `.coveralls.yml`.\n","funding_links":[],"categories":["Code Quality"],"sub_categories":["Code Metrics"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemurheavy%2Fcoveralls-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemurheavy%2Fcoveralls-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemurheavy%2Fcoveralls-ruby/lists"}