rubocop-lts-rspec

Meta gem for projects tested with RSpec & linted with rubocop-lts

https://github.com/rubocop-lts/rubocop-lts-rspec

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.2%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Meta gem for projects tested with RSpec & linted with rubocop-lts

Basic Info
  • Host: GitHub
  • Owner: rubocop-lts
  • License: mit
  • Language: Ruby
  • Default Branch: main
  • Size: 280 KB
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing Funding License Code of conduct Citation Security

README.md

SVG RuboCop Logo, Copyright (c) 2014 Dimiter Petrov, CC BY-NC 4.0, see docs/images/logo/README.txt SVG RuboCop Logo, Copyright (c) 2014 Dimiter Petrov, CC BY-NC 4.0, see docs/images/logo/README.txt Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5, see docs/images/logo/README.txt SemVer.org Logo by @maxhaz, see docs/images/logo/README.txt SemVer.org Logo by @maxhaz, see docs/images/logo/README.txt

🦾 Rubocop::Lts::RSpec Ruby Code Style

Version License: MIT Downloads Rank Open Source Helpers Depfu CodeCov Test Coverage Coveralls Test Coverage CodeClimate Test Coverage Maintainability CI Heads CI Current CI Supported CI Test Coverage CI Style CI Dog Food


Liberapay Patrons Sponsor Me on Github Buy me a coffee Donate on Polar Donate to my FLOSS or refugee efforts at ko-fi.com Donate to my FLOSS or refugee efforts using Patreon

Extended RuboCop::Lts config shims for the RSpec-related Cop rules, back to Ruby version 1.8. Part of the rubocop-lts gem family.

Use the rules standard gives you, and then add more, to increase your code's compatibility across multiple versions of Ruby.

Only reach as far back as you need to go!


The RuboCop LTS family of gems is the distillation of 20+ years of my own Ruby expertise and source code diving, built on the shoulders of the expertise of many others; organizing that expertise into per-Ruby-version sets of configurations.

Although the situation has improved somewhat, it remains unsafe to upgrade RuboCop, or Standard, in a project that supports EOL Rubies.

I hope it helps others avoid some of the challenges I've had with library maintenance, and supporting decade-old mission-critical applications.

Avoid bike-shedding, use rubocop-lts in every project, and let it manage your linting complexity!

If the rubocop-lts stack of libraries has helped you, or your organization, please support my efforts by making a donation, or becoming a sponsor.

👪 A Gem Family

The rubocop-lts family of gems has a version supporting any version of Ruby you need. They can be used as development dependencies for libraries or applications.

Only two of them sit at the top level, and this gem is one of them.

| Gem Name | Version | Downloads | Activity | |---------------------------------|-------------------------------------|----------------------------------------------------------------------|-------------------------------------| | rubocop-lts | Gem Version | Total DL DL Rank | Current | Open Issues Closed Issues Open PRs Closed PRs | | rubocop-lts-rspec | Gem Version | Total DL DL Rank | Current | Open Issues Closed Issues Open PRs Closed PRs |

Nested Dependencies - [`standard-rubocop-lts`][stdrlts] - [`rubocop-ruby1_8`][rr18] - [`rubocop-ruby1_9`][rr19] - [`rubocop-ruby2_0`][rr20] - [`rubocop-ruby2_1`][rr21] - [`rubocop-ruby2_2`][rr22] - [`rubocop-ruby2_3`][rr23] - [`rubocop-ruby2_4`][rr24] - [`rubocop-ruby2_5`][rr25] - [`rubocop-ruby2_6`][rr26] - [`rubocop-ruby2_7`][rr27] - [`rubocop-ruby3_0`][rr30] - [`rubocop-ruby3_1`][rr31] - [`rubocop-ruby3_2`][rr32] - [`rubocop-ruby3_3`][rr33] - [`rubocop-ruby3_4`][rr34]

Love linting?

Add a badge to your project's README.md!

Ruby Code Style

md [![Ruby Code Style](https://img.shields.io/badge/code_style-rubocop--lts-brightgreen.svg?style=for-the-badge&logo=ruby&logoColor=white)](https://github.com/rubocop-lts/rubocop-lts)

Ruby Code Style

md [![Ruby Code Style](https://img.shields.io/badge/code_style-rubocop--lts-brightgreen.svg?style=plastic&logo=ruby&logoColor=white)](https://github.com/rubocop-lts/rubocop-lts)

🗿 Stable

All releases of this gem are stable releases. We do not release new versions for every release of rubocop, as this gem is part of rubocop-lts, which is tied to standard (Standard Ruby). Eventually analysis support for an old version of Ruby will no longer be sustainable. When that happens releases of the rubocop-lts gem for that version of Ruby will (mostly) cease. For now though, in Q2 2025, RuboCop, via RuboCop-LTS, can still be used with code targeting Ruby v1.8.7, and newer.

💡 Info you can shake a stick at

| Tokens to Remember | Gem name Gem namespace | |--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Works with MRI Ruby 3.2+ | Ruby 3.2 Compat Ruby 3.3 Compat Ruby 3.4 Compat Ruby HEAD Compat | | Source | Source on GitLab.com Source on Github.com The best SHA: dQw4w9WgXcQ! | | Documentation | Current release on RubyDoc.info HEAD on RubyDoc.info BDFL Blog Wiki | | Compliance | License: MIT 📄ilo-declaration-img Security Policy Enforced Code Style CodeQL Contributor Covenant 2.1 SemVer 2.0.0 Keep-A-Changelog 1.0.0 Gitmoji Commits | | Expert 1:1 Support | Get help from me on Upwork or Get help from me on Codementor | | Enterprise Support | Get help from me on Tidelift
💡Subscribe for support guarantees covering all FLOSS dependencies!
💡Tidelift is part of Sonar!
💡Tidelift pays maintainers to maintain the software you depend on!
📊@Pointy Haired Boss: An enterprise support subscription is "never gonna let you down", and supports open source maintainers! | | Comrade BDFL 🎖️ | Follow Me on LinkedIn Follow Me on Ruby.Social Follow Me on Bluesky Contact BDFL My technical writing | | ... 💖 | Find Me on WellFound: Find Me on CrunchBase My LinkTree More About Me 🧊 🐙 🛖 🧪 |

✨ Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add rubocop-lts-rspec

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install rubocop-lts-rspec

NOTE: You can use this gem standalone, but it is recommended to use together with rubocop-lts. Starting with rubocop-lts's Epoch v1 series (i.e. SemVer major versions 1_0XX) each config in rubocop-lts has an alternate rspec version that depends on this gem. If you want to use them, you must add the dependency on this gem to your gemfile/gemspec separately. It will enable your RSpec style rules to be integrated with your Ruby style rules, and for the entire suite of rules to target, with an explicit goal of compatibility, whatever version of Ruby your project happens to be on!

🔒 Secure Installation

rubocop-lts-rspec is cryptographically signed, and has verifiable SHA-256 and SHA-512 checksums by stone_checksums. Be sure the gem you install hasn’t been tampered with by following the instructions below.

Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate:

shell gem cert --add <(curl -Ls https://raw.github.com/rubocop-lts/rubocop-lts-rspec/main/certs/pboling.pem)

You only need to do that once. Then proceed to install with:

shell gem install rubocop-lts-rspec -P MediumSecurity

The MediumSecurity trust profile will verify signed gems, but allow the installation of unsigned dependencies.

This is necessary because not all of rubocop-lts-rspec’s dependencies are signed, so we cannot use HighSecurity.

If you want to up your security game full-time:

shell bundle config set --global trust-policy MediumSecurity

NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine.

🔧 Basic Usage

Via rubocop-lts gem

After adding both this gem and rubocop-lts to your Gemfile or gemspec, utilize a config provided by rubocop-lts. The configs that end in *_rspec.yml will pull in all the config from this gem, specifically for the version of Ruby indicated by the version of rubocop-lts you are on.

With Plain Ruby:

yaml inherit_gem: rubocop-lts: config/ruby_rspec.yml

With RubyGem:

yaml inherit_gem: rubocop-lts: config/rubygem_rspec.yml

With Rails:

yaml inherit_gem: rubocop-lts: config/rails_rspec.yml

Via rubocop-ruby#_# gem

After adding both this gem and rubocop-ruby#_# to your Gemfile or gemspec, utilize a config provided by rubocop-ruby#_#. The configs that end in *_rspec.yml will pull in all the config from this gem, specifically for the version of Ruby indicated by the version of rubocop-ruby#_# you are on.

For this example we will use the rubocop-ruby3_2 gem. Replace only the gem name key if you are using a different one:

With Plain Ruby:

yaml inherit_gem: rubocop-ruby3_2: rubocop-lts/ruby_rspec.yml

With RubyGem:

yaml inherit_gem: rubocop-ruby3_2: rubocop-lts/rubygem_rspec.yml

With Rails:

yaml inherit_gem: rubocop-ruby3_2: rubocop-lts/rails_rspec.yml

Standalone

If you are using this gem standalone, add to the top of your project's .rubocop.yml configuration file:

yaml inherit_gem: # Replace {RUBY_MAJOR_VERSION} with the minimum major version of ruby you want to target. # Replace {RUBY_MINOR_VERSION} with the minimum minor version of ruby you want to target. rubocop-lts-rspec: config/ruby-{RUBY_MAJOR_VERSION}-{RUBY_MINOR_VERSION}.yml

What will this do for me? Among other potential settings specific to your chosen minimum version of ruby, the above _effectively_ results in the following config (& more): ```yaml inherit_mode: merge: - Exclude - Include require: - rubocop-lts-rspec - rubocop-rspec-extra - rubocop-env - rubocop-rspec inherit_gem: rubocop-env: config/default.yml rubocop-rspec-extra: config/default.yml RSpec/Focus: # run ALL tests on CI Enabled: true Exclude: [] Lint/Debugger: # don't leave binding.pry Enabled: true Exclude: [ ] ```

What about TargetRubyVersion?

It will be set up for you, when you follow any of the above setup instructions.

🚀 Release Instructions

See CONTRIBUTING.md.

🔐 Security

See SECURITY.md.

🤝 Contributing

If you need some ideas of where to help, you could work on adding more code coverage, or if it is already 💯 (see below) then check issues, or PRs, or use the gem and think about how it could be better.

We Keep A Changelog so if you make changes, remember to update it.

See CONTRIBUTING.md for more detailed instructions.

Code Coverage

Coverage Graph

🪇 Code of Conduct

Everyone interacting in this project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the Contributor Covenant 2.1.

🌈 Contributors

Contributors

Made with contributors-img.

Also see GitLab Contributors: https://gitlab.com/rubocop-lts/rubocop-lts-rspec/-/graphs/main

⭐️ Star History

Star History Chart

📌 Versioning

This Library adheres to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions.

📌 Is "Platform Support" part of the public API?

Yes. But I'm obligated to include notes...

SemVer should, but doesn't explicitly, say that dropping support for specific Platforms is a breaking change to an API. It is obvious to many, but not all, and since the spec is silent, the bike shedding is endless.

dropping support for a platform is both obviously and objectively a breaking change

To get a better understanding of how SemVer is intended to work over a project's lifetime, read this article from the creator of SemVer:

As a result of this policy, and the interpretive lens used by the maintainer, you can (and should) specify a dependency on these libraries using the Pessimistic Version Constraint with two digits of precision.

For example:

ruby spec.add_dependency("rubocop-lts-rspec", "~> 1.0")

See CHANGELOG.md for list of releases.

📄 License

The gem is available as open source under the terms of the MIT License License: MIT. See LICENSE.txt for the official Copyright Notice.

Project Logos (rubocop-lts-rspec) See [docs/images/logo/README.txt][project-logos]
Organization Logo (rubocop-lts) - Author: [Yusuf Evli][org-logo-author] - Source: [Unsplash][org-logo-source] - License: [Unsplash License][org-logo-license]

© Copyright

Copyright (c) 2025 Peter H. Boling, RailsBling.com Rails Bling

🤑 One more thing

You made it to the bottom of the page, so perhaps you'll indulge me for another 20 seconds. I maintain many dozens of gems, including this one, because I want Ruby to be a great place for people to solve problems, big and small. Please consider supporting my efforts via the giant yellow link below, or one of the others at the head of this README.

Buy me a latte

Owner

  • Name: Rubocop LTS - with SemVer
  • Login: rubocop-lts
  • Kind: organization
  • Email: peter.boling@gmail.com
  • Location: Indonesia

rubocop, ruby, and semver can now play together!

Citation (CITATION.cff)

cff-version: 1.2.0
title: Rubocop::Lts::Rspec
message: >-
  If you use this work and you want to cite it,
  then you can use the metadata from this file.
type: software
authors:
  - given-names: Peter Hurn
    family-names: Boling
    email: peter@railsbling.com
    affiliation: railsbling.com
    orcid: 'https://orcid.org/0009-0008-8519-441X'
identifiers:
  - type: url
    value: 'https://github.com/rubocop-lts/rubocop-lts-rspec/'
    description: Rubocop::Lts::Rspec
repository-code: 'https://github.com/rubocop-lts/rubocop-lts-rspec/'
abstract: >-
  Rubocop::Lts::Rspec
license: See license file

GitHub Events

Total
  • Watch event: 2
  • Delete event: 18
  • Issue comment event: 45
  • Push event: 30
  • Pull request review event: 1
  • Pull request event: 41
  • Fork event: 1
  • Create event: 17
Last Year
  • Watch event: 2
  • Delete event: 18
  • Issue comment event: 45
  • Push event: 30
  • Pull request review event: 1
  • Pull request event: 41
  • Fork event: 1
  • Create event: 17

Dependencies

.github/workflows/codeql-analysis.yml actions
  • actions/checkout v4 composite
  • github/codeql-action/analyze v1 composite
  • github/codeql-action/autobuild v1 composite
  • github/codeql-action/init v1 composite
.github/workflows/coverage.yml actions
  • actions/checkout v4 composite
  • amancevice/setup-code-climate v0 composite
  • coverallsapp/github-action master composite
  • irongut/CodeCoverageSummary v1.3.0 composite
  • marocchino/sticky-pull-request-comment v2 composite
  • ruby/setup-ruby v1 composite
.github/workflows/current.yml actions
  • actions/checkout v4 composite
  • ruby/setup-ruby v1 composite
.github/workflows/dependency-review.yml actions
  • actions/checkout v4 composite
  • actions/dependency-review-action v2 composite
.github/workflows/heads.yml actions
  • actions/checkout v4 composite
  • ruby/setup-ruby v1 composite
.github/workflows/style.yml actions
  • actions/checkout v4 composite
  • ruby/setup-ruby v1 composite
Gemfile rubygems
  • byebug >= 0
Gemfile.lock rubygems
  • ansi 1.5.0
  • ast 2.4.2
  • backports 3.25.0
  • bundler 2.4.22
  • byebug 11.1.3
  • diff-lcs 1.5.1
  • diffy 3.4.2
  • docile 1.4.0
  • json 2.7.1
  • kettle-soup-cover 1.0.2
  • kramdown 2.4.0
  • language_server-protocol 3.17.0.3
  • lint_roller 1.1.0
  • parallel 1.24.0
  • parser 3.3.0.5
  • racc 1.7.3
  • rainbow 3.1.1
  • rake 13.1.0
  • regexp_parser 2.9.0
  • rexml 3.2.6
  • rspec 3.13.0
  • rspec-block_is_expected 1.0.5
  • rspec-core 3.13.0
  • rspec-expectations 3.13.0
  • rspec-mocks 3.13.0
  • rspec-stubbed_env 1.0.1
  • rspec-support 3.13.1
  • rspec_junit_formatter 0.6.0
  • rubocop 1.62.1
  • rubocop-ast 1.31.2
  • rubocop-capybara 2.20.0
  • rubocop-factory_bot 2.25.1
  • rubocop-gradual 0.3.4
  • rubocop-md 1.2.2
  • rubocop-packaging 0.5.2
  • rubocop-performance 1.20.2
  • rubocop-rake 0.6.0
  • rubocop-rspec 2.27.1
  • rubocop-shopify 2.15.1
  • rubocop-thread_safety 0.5.1
  • ruby-progressbar 1.13.0
  • simplecov 0.22.0
  • simplecov-cobertura 2.1.0
  • simplecov-console 0.9.1
  • simplecov-html 0.12.3
  • simplecov-lcov 0.8.0
  • simplecov-rcov 0.3.7
  • simplecov_json_formatter 0.1.4
  • standard 1.35.1
  • standard-custom 1.0.2
  • standard-performance 1.3.1
  • standard-rubocop-lts 1.0.10
  • terminal-table 3.0.2
  • unicode-display_width 2.5.0
  • version_gem 1.1.4
  • yard 0.9.36
  • yard-junk 0.0.9
standard-rubocop-lts.gemspec rubygems
  • kettle-soup-cover ~> 1.0, >= 1.0.2 development
  • kramdown ~> 2.4 development
  • rake ~> 13.0 development
  • rspec ~> 3.13 development
  • rspec-stubbed_env ~> 1.0, >= 1.0.1 development
  • rspec_junit_formatter ~> 0.6 development
  • rubocop-gradual ~> 0.3, >= 0.3.4 development
  • rubocop-md ~> 1.2, >= 1.2.2 development
  • rubocop-packaging ~> 0.5, >= 0.5.2 development
  • rubocop-rake ~> 0.6 development
  • rubocop-rspec ~> 2.27, >= 2.27.1 development
  • rubocop-shopify ~> 2.15, >= 2.15.1 development
  • rubocop-thread_safety ~> 0.5, >= 0.5.1 development
  • yard ~> 0.9, >= 0.9.36 development
  • yard-junk ~> 0.0 development
  • rspec-block_is_expected ~> 1.0, >= 1.0.5
  • standard >= 1.35.1, < 2
  • standard-custom >= 1.0.2, < 2
  • standard-performance >= 1.3.1, < 2
  • version_gem >= 1.1.4, < 3