rspec-pending_for-0.1.19/ 0000755 0000041 0000041 00000000000 15060261576 015246 5 ustar www-data www-data rspec-pending_for-0.1.19/FUNDING.md 0000644 0000041 0000041 00000013555 15060261576 016673 0 ustar www-data www-data
Official Discord 👉️ [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite]
Many paths lead to being a sponsor or a backer of this project. Are you on such a path?
[![OpenCollective Backers][🖇osc-backers-i]][🖇osc-backers] [![OpenCollective Sponsors][🖇osc-sponsors-i]][🖇osc-sponsors] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal]
[![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS or refugee efforts at ko-fi.com][🖇kofi-img]][🖇kofi] [![Donate to my FLOSS or refugee efforts using Patreon][🖇patreon-img]][🖇patreon]
[⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
[⛳liberapay]: https://liberapay.com/pboling/donate
[🖇osc-backers]: https://opencollective.com/galtzo-floss#backer
[🖇osc-backers-i]: https://opencollective.com/galtzo-floss/backers/badge.svg?style=flat
[🖇osc-sponsors]: https://opencollective.com/galtzo-floss#sponsor
[🖇osc-sponsors-i]: https://opencollective.com/galtzo-floss/sponsors/badge.svg?style=flat
[🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
[🖇sponsor]: https://github.com/sponsors/pboling
[🖇polar-img]: https://img.shields.io/badge/polar-donate-a51611.svg?style=flat
[🖇polar]: https://polar.sh/pboling
[🖇kofi-img]: https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat
[🖇kofi]: https://ko-fi.com/O5O86SNP4
[🖇patreon-img]: https://img.shields.io/badge/patreon-donate-a51611.svg?style=flat
[🖇patreon]: https://patreon.com/galtzo
[🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat
[🖇buyme]: https://www.buymeacoffee.com/pboling
[🖇paypal-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal
[🖇paypal]: https://www.paypal.com/paypalme/peterboling
[✉️discord-invite]: https://discord.gg/3qme4XHNKN
[✉️discord-invite-img]: https://img.shields.io/discord/1373797679469170758?style=flat
# 🤑 Request for Help
Maintainers have teeth and need to pay their dentists.
After getting laid off in an RIF in March and filled with many dozens of rejections,
I'm now spending ~60+ hours a week building open source tools.
I'm hoping to be able to pay for my kids' health insurance this month,
so if you value the work I am doing, I need your support.
Please consider sponsoring me or the project.
To join the community or get help 👇️ Join the Discord.
[![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
To say "thanks for maintaining such a great tool" ☝️ Join the Discord or 👇️ send money.
[![Sponsor galtzo-floss/rspec-pending_for on Open Source Collective][🖇osc-all-bottom-img]][🖇osc] 💌 [![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay-img] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal-img]
# Another Way to Support Open Source Software
> How wonderful it is that nobody need wait a single moment before starting to improve the world.
>—Anne Frank
I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions — totaling 79 hours of FLOSS coding over just the past seven days, a pretty regular week for me. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈 cats).
If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`.
I’m developing a new library, [floss_funding][🖇floss-funding-gem], designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.
**[Floss-Funding.dev][🖇floss-funding.dev]: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags**
[⛳liberapay-bottom-img]: https://img.shields.io/liberapay/goal/pboling.svg?style=for-the-badge&logo=liberapay&color=a51611
[🖇osc-all-img]: https://img.shields.io/opencollective/all/galtzo-floss
[🖇osc-sponsors-img]: https://img.shields.io/opencollective/sponsors/galtzo-floss
[🖇osc-backers-img]: https://img.shields.io/opencollective/backers/galtzo-floss
[🖇osc-all-bottom-img]: https://img.shields.io/opencollective/all/galtzo-floss?style=for-the-badge
[🖇osc-sponsors-bottom-img]: https://img.shields.io/opencollective/sponsors/galtzo-floss?style=for-the-badge
[🖇osc-backers-bottom-img]: https://img.shields.io/opencollective/backers/galtzo-floss?style=for-the-badge
[🖇osc]: https://opencollective.com/galtzo-floss
[🖇sponsor-bottom-img]: https://img.shields.io/badge/Sponsor_Me!-pboling-blue?style=for-the-badge&logo=github
[🖇buyme-img]: https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20latte&emoji=&slug=pboling&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff
[🖇paypal-bottom-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=for-the-badge&logo=paypal&color=0A0A0A
[🖇floss-funding.dev]: https://floss-funding.dev
[🖇floss-funding-gem]: https://github.com/galtzo-floss/floss_funding
[✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge
rspec-pending_for-0.1.19/RUBOCOP.md 0000644 0000041 0000041 00000006531 15060261576 016706 0 ustar www-data www-data # RuboCop Usage Guide
## Overview
A tale of two RuboCop plugin gems.
### RuboCop Gradual
This project uses `rubocop_gradual` instead of vanilla RuboCop for code style checking. The `rubocop_gradual` tool allows for gradual adoption of RuboCop rules by tracking violations in a lock file.
### RuboCop LTS
This project uses `rubocop-lts` to ensure, on a best-effort basis, compatibility with Ruby >= 1.9.2.
RuboCop rules are meticulously configured by the `rubocop-lts` family of gems to ensure that a project is compatible with a specific version of Ruby. See: https://rubocop-lts.gitlab.io for more.
## Checking RuboCop Violations
To check for RuboCop violations in this project, always use:
```bash
bundle exec rake rubocop_gradual:check
```
**Do not use** the standard RuboCop commands like:
- `bundle exec rubocop`
- `rubocop`
## Understanding the Lock File
The `.rubocop_gradual.lock` file tracks all current RuboCop violations in the project. This allows the team to:
1. Prevent new violations while gradually fixing existing ones
2. Track progress on code style improvements
3. Ensure CI builds don't fail due to pre-existing violations
## Common Commands
- **Check violations**
- `bundle exec rake rubocop_gradual`
- `bundle exec rake rubocop_gradual:check`
- **(Safe) Autocorrect violations, and update lockfile if no new violations**
- `bundle exec rake rubocop_gradual:autocorrect`
- **Force update the lock file (w/o autocorrect) to match violations present in code**
- `bundle exec rake rubocop_gradual:force_update`
## Workflow
1. Before submitting a PR, run `bundle exec rake rubocop_gradual:autocorrect`
a. or just the default `bundle exec rake`, as autocorrection is a pre-requisite of the default task.
2. If there are new violations, either:
- Fix them in your code
- Run `bundle exec rake rubocop_gradual:force_update` to update the lock file (only for violations you can't fix immediately)
3. Commit the updated `.rubocop_gradual.lock` file along with your changes
## Never add inline RuboCop disables
Do not add inline `rubocop:disable` / `rubocop:enable` comments anywhere in the codebase (including specs, except when following the few existing `rubocop:disable` patterns for a rule already being disabled elsewhere in the code). We handle exceptions in two supported ways:
- Permanent/structural exceptions: prefer adjusting the RuboCop configuration (e.g., in `.rubocop.yml`) to exclude a rule for a path or file pattern when it makes sense project-wide.
- Temporary exceptions while improving code: record the current violations in `.rubocop_gradual.lock` via the gradual workflow:
- `bundle exec rake rubocop_gradual:autocorrect` (preferred; will autocorrect what it can and update the lock only if no new violations were introduced)
- If needed, `bundle exec rake rubocop_gradual:force_update` (as a last resort when you cannot fix the newly reported violations immediately)
In general, treat the rules as guidance to follow; fix violations rather than ignore them. For example, RSpec conventions in this project expect `described_class` to be used in specs that target a specific class under test.
## Benefits of rubocop_gradual
- Allows incremental adoption of code style rules
- Prevents CI failures due to pre-existing violations
- Provides a clear record of code style debt
- Enables focused efforts on improving code quality over time
rspec-pending_for-0.1.19/CONTRIBUTING.md 0000644 0000041 0000041 00000024631 15060261576 017505 0 ustar www-data www-data # Contributing
Bug reports and pull requests are welcome on [CodeBerg][📜src-cb], [GitLab][📜src-gl], or [GitHub][📜src-gh].
This project should be a safe, welcoming space for collaboration, so contributors agree to adhere to
the [code of conduct][🤝conduct].
To submit a patch, please fork the project, create a patch with tests, and send a pull request.
Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] if you make changes.
## Help out!
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
Follow these instructions:
1. Fork the repository
2. Create a feature branch (`git checkout -b my-new-feature`)
3. Make some fixes.
4. Commit changes (`git commit -am 'Added some feature'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Make sure to add tests for it. This is important, so it doesn't break in a future release.
7. Create new Pull Request.
## Environment Variables for Local Development
Below are the primary environment variables recognized by stone_checksums (and its integrated tools). Unless otherwise noted, set boolean values to the string "true" to enable.
General/runtime
- DEBUG: Enable extra internal logging for this library (default: false)
- REQUIRE_BENCH: Enable `require_bench` to profile requires (default: false)
- CI: When set to true, adjusts default rake tasks toward CI behavior
Coverage (kettle-soup-cover / SimpleCov)
- K_SOUP_COV_DO: Enable coverage collection (default: true in .envrc)
- K_SOUP_COV_FORMATTERS: Comma-separated list of formatters (html, xml, rcov, lcov, json, tty)
- K_SOUP_COV_MIN_LINE: Minimum line coverage threshold (integer, e.g., 100)
- K_SOUP_COV_MIN_BRANCH: Minimum branch coverage threshold (integer, e.g., 100)
- K_SOUP_COV_MIN_HARD: Fail the run if thresholds are not met (true/false)
- K_SOUP_COV_MULTI_FORMATTERS: Enable multiple formatters at once (true/false)
- K_SOUP_COV_OPEN_BIN: Path to browser opener for HTML (empty disables auto-open)
- MAX_ROWS: Limit console output rows for simplecov-console (e.g., 1)
Tip: When running a single spec file locally, you may want `K_SOUP_COV_MIN_HARD=false` to avoid failing thresholds for a partial run.
GitHub API and CI helpers
- GITHUB_TOKEN or GH_TOKEN: Token used by `ci:act` and release workflow checks to query GitHub Actions status at higher rate limits
Releasing and signing
- SKIP_GEM_SIGNING: If set, skip gem signing during build/release
- GEM_CERT_USER: Username for selecting your public cert in `certs/.pem` (defaults to $USER)
- SOURCE_DATE_EPOCH: Reproducible build timestamp. `kettle-release` will set this automatically for the session.
Git hooks and commit message helpers (exe/kettle-commit-msg)
- GIT_HOOK_BRANCH_VALIDATE: Branch name validation mode (e.g., `jira`) or `false` to disable
- GIT_HOOK_FOOTER_APPEND: Append a footer to commit messages when goalie allows (true/false)
- GIT_HOOK_FOOTER_SENTINEL: Required when footer append is enabled — a unique first-line sentinel to prevent duplicates
- GIT_HOOK_FOOTER_APPEND_DEBUG: Extra debug output in the footer template (true/false)
For a quick starting point, this repository’s `.envrc` shows sane defaults, and `.env.local` can override them locally.
## Appraisals
From time to time the [appraisal2][🚎appraisal2] gemfiles in `gemfiles/` will need to be updated.
They are created and updated with the commands:
```console
bin/rake appraisal:update
```
When adding an appraisal to CI, check the [runner tool cache][🏃♂️runner-tool-cache] to see which runner to use.
## The Reek List
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
To refresh the `reek` list:
```console
bundle exec reek > REEK
```
## Run Tests
To run all tests
```console
bundle exec rake test
```
### Spec organization (required)
- One spec file per class/module. For each class or module under `lib/`, keep all of its unit tests in a single spec file under `spec/` that mirrors the path and file name exactly: `lib/rspec/pending_for/release_cli.rb` -> `spec/rspec/pending_for/release_cli_spec.rb`.
- Never add a second spec file for the same class/module. Examples of disallowed names: `*_more_spec.rb`, `*_extra_spec.rb`, `*_status_spec.rb`, or any other suffix that still targets the same class. If you find yourself wanting a second file, merge those examples into the canonical spec file for that class/module.
- Exception: Integration specs that intentionally span multiple classes. Place these under `spec/integration/` (or a clearly named integration folder), and do not directly mirror a single class. Name them after the scenario, not a class.
- Migration note: If a duplicate spec file exists, move all examples into the canonical file and delete the duplicate. Do not leave stubs or empty files behind.
## Lint It
Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`.
```console
bundle exec rake
```
Or just run the linter.
```console
bundle exec rake rubocop_gradual:autocorrect
```
For more detailed information about using RuboCop in this project, please see the [RUBOCOP.md](RUBOCOP.md) guide. This project uses `rubocop_gradual` instead of vanilla RuboCop, which requires specific commands for checking violations.
### Important: Do not add inline RuboCop disables
Never add `# rubocop:disable ...` / `# rubocop:enable ...` comments to code or specs (except when following the few existing `rubocop:disable` patterns for a rule already being disabled elsewhere in the code). Instead:
- Prefer configuration-based exclusions when a rule should not apply to certain paths or files (e.g., via `.rubocop.yml`).
- When a violation is temporary and you plan to fix it later, record it in `.rubocop_gradual.lock` using the gradual workflow:
- `bundle exec rake rubocop_gradual:autocorrect` (preferred)
- `bundle exec rake rubocop_gradual:force_update` (only when you cannot fix the violations immediately)
As a general rule, fix style issues rather than ignoring them. For example, our specs should follow RSpec conventions like using `described_class` for the class under test.
## Contributors
Your picture could be here!
[![Contributors][🖐contributors-img]][🖐contributors]
Made with [contributors-img][🖐contrib-rocks].
Also see GitLab Contributors: [https://gitlab.com/galtzo-floss/rspec-pending_for/-/graphs/main][🚎contributors-gl]
## For Maintainers
### One-time, Per-maintainer, Setup
**IMPORTANT**: To sign a build,
a public key for signing gems will need to be picked up by the line in the
`gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
All releases to RubyGems.org are signed releases.
See: [RubyGems Security Guide][🔒️rubygems-security-guide]
NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in the environment.
### To release a new version:
#### Automated process
1. Update version.rb to contian the correct version-to-be-released.
2. Run `bundle exec kettle-changelog`.
3. Run `bundle exec kettle-release`.
#### Manual process
1. Run `bin/setup && bin/rake` as a "test, coverage, & linting" sanity check
2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
4. Run `git commit -am "🔖 Prepare release v"` to commit the changes
5. Run `git push` to trigger the final CI pipeline before release, and merge PRs
- NOTE: Remember to [check the build][🧪build].
6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
7. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure latest trunk code
9. Optional for older Bundler (< 2.7.0): Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use the same timestamp and generate the same checksums
- If your Bundler is >= 2.7.0, you can skip this; builds are reproducible by default.
- Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
- If the echo above has no output, then it didn't work.
- Note: `zsh/datetime` module is needed, if running `zsh`.
- In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
10. Run `bundle exec rake build`
11. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
[gem][💎stone_checksums].
- The script automatically commits but does not push the checksums
12. Sanity check the SHA256, comparing with the output from the `bin/gem_checksums` command:
- `sha256sum pkg/-.gem`
13. Run `bundle exec rake release` which will create a git tag for the version,
push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]
[📜src-gl]: https://gitlab.com/galtzo-floss/rspec-pending_for/
[📜src-cb]: https://codeberg.org/galtzo-floss/rspec-pending_for
[📜src-gh]: https://github.com/galtzo-floss/rspec-pending_for
[🧪build]: https://github.com/galtzo-floss/rspec-pending_for/actions
[🤝conduct]: https://gitlab.com/galtzo-floss/rspec-pending_for/-/blob/main/CODE_OF_CONDUCT.md
[🖐contrib-rocks]: https://contrib.rocks
[🖐contributors]: https://github.com/galtzo-floss/rspec-pending_for/graphs/contributors
[🚎contributors-gl]: https://gitlab.com/galtzo-floss/rspec-pending_for/-/graphs/main
[🖐contributors-img]: https://contrib.rocks/image?repo=galtzo-floss/rspec-pending_for
[💎rubygems]: https://rubygems.org
[🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
[🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
[🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
[💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
[🚎appraisal2]: https://github.com/appraisal-rb/appraisal2
[🏃♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache
rspec-pending_for-0.1.19/SECURITY.md 0000644 0000041 0000041 00000001100 15060261576 017027 0 ustar www-data www-data # Security Policy
## Supported Versions
| Version | Supported |
|----------|-----------|
| 1.latest | ✅ |
## Security contact information
To report a security vulnerability, please use the
[Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure.
## Additional Support
If you are interested in support for versions older than the latest release,
please consider sponsoring the project / maintainer @ https://liberapay.com/pboling/donate,
or find other sponsorship links in the [README].
[README]: README.md
rspec-pending_for-0.1.19/lib/ 0000755 0000041 0000041 00000000000 15060261576 016014 5 ustar www-data www-data rspec-pending_for-0.1.19/lib/rspec-pending_for.rb 0000644 0000041 0000041 00000000045 15060261576 021744 0 ustar www-data www-data require_relative "rspec/pending_for"
rspec-pending_for-0.1.19/lib/rspec/ 0000755 0000041 0000041 00000000000 15060261576 017130 5 ustar www-data www-data rspec-pending_for-0.1.19/lib/rspec/pending_for/ 0000755 0000041 0000041 00000000000 15060261576 021422 5 ustar www-data www-data rspec-pending_for-0.1.19/lib/rspec/pending_for/engine_or_versions_required.rb 0000644 0000041 0000041 00000000612 15060261576 027543 0 ustar www-data www-data # frozen_string_literal: true
module Rspec
module PendingFor
# Error class raised when pending_for is used but no engine or version is specified.
class EngineOrVersionsRequired < ArgumentError
def initialize(method_name, *args)
message = "#{method_name} requires at least an engine or versions to be specified"
super(message, *args)
end
end
end
end
rspec-pending_for-0.1.19/lib/rspec/pending_for/build.rb 0000644 0000041 0000041 00000012342 15060261576 023050 0 ustar www-data www-data # frozen_string_literal: true
module Rspec
module PendingFor
# SRP: Describe the RubyEngine and/or RubyVersion(s) that will be pended or skipped and with what message
class Build
#
# | RUBY_ENGINE | Implementation |
# |:--------------:|:------------------------:|
# | "unknown" | MRI < 1.9 (probably) |
# | "ruby" | MRI >= 1.9 |
# | "ree" | Ruby Enterprise Edition |
# | "jruby" | JRuby |
# | "macruby" | MacRuby |
# | "rbx" | Rubinius |
# | "maglev" | MagLev |
# | "ironruby" | IronRuby |
# | "cardinal" | Cardinal |
# | "truffleruby" | Truffle Ruby |
#
# Keys are the
INTERPRETER_MATRIX = {
"unknown" => "MRI < 1.9 (probably)",
"ruby" => "MRI >= 1.9",
"ree" => "Ruby Enterprise Edition",
"jruby" => "JRuby",
"macruby" => "MacRuby",
"rbx" => "Rubinius",
"maglev" => "MagLev",
"ironruby" => "IronRuby",
"cardinal" => "Cardinal",
"truffleruby" => "Truffle Ruby",
}.freeze
BROKEN_STRING = "Behavior is broken"
BUG_STRING = "due to a bug in the Ruby engine"
VERSIONS_STRING = "in Ruby versions"
ISSUES_LINK = "https://github.com/galtzo-floss/rspec-pending_for/issues"
RELEVANT_VERSIONS_PROC = lambda { |rv| "#{BROKEN_STRING} #{VERSIONS_STRING} #{rv} #{BUG_STRING}" }
attr_reader :message, :relevant_versions, :relevant_engine, :reason
def initialize(options = {})
# Normalize versions without enumerating ranges
raw_versions = options[:versions]
@relevant_versions = if raw_versions.nil?
[]
elsif raw_versions.is_a?(Array)
raw_versions
elsif raw_versions.is_a?(Range)
[raw_versions]
else
[raw_versions]
end
@relevant_engine = options[:engine].nil? ? nil : options[:engine].to_s
@reason = options[:reason]
warn_about_unrecognized_engine
# If engine is nil, then any matching versions should be pended
@message = if @relevant_engine.nil?
no_engine_specified
elsif RubyEngine.is?(@relevant_engine)
engine_specified_and_relevant
end
end
def current_matches_specified?
!message.nil?
end
private
# Determine whether the current Ruby version matches any of the provided version specs.
# A version spec may be:
# - String: exact match against RubyVersion.to_s
# - Range[Gem::Version, Gem::Version]: inclusive/exclusive respected
# - Range[Integer, Integer]: compares major version from RubyVersion.to_s
def versions_include_current?
return false if relevant_versions.nil?
current_str = RubyVersion.to_s
current_major = current_str.to_s.split(".").first.to_i
current_gemv = begin
Gem::Version.new(current_str.to_s)
rescue StandardError
nil
end
relevant_versions.any? do |spec|
case spec
when String
# Support minor-version shorthand like "3.1" to match any 3.1.x
if spec.to_s =~ /^\d+\.\d+$/
current_major_minor = current_str.to_s.split(".")[0, 2].join(".")
spec == current_major_minor
else
spec == current_str
end
when Range
b = spec.begin
e = spec.end
if b.is_a?(Gem::Version) && e.is_a?(Gem::Version)
next false unless current_gemv
# Respect exclusive end
if spec.exclude_end?
b <= current_gemv && current_gemv < e
else
b <= current_gemv && current_gemv <= e
end
elsif b.is_a?(Integer) && e.is_a?(Integer)
if spec.exclude_end?
b <= current_major && current_major < e
else
b <= current_major && current_major <= e
end
else
# Fallback: try cover? with the string form (likely false if incomparable)
spec.respond_to?(:cover?) && spec.cover?(current_str)
end
else
false
end
end
end
def warn_about_unrecognized_engine
return false if relevant_engine.nil? || !INTERPRETER_MATRIX[relevant_engine].nil?
warn(%[
Engine specified (#{relevant_engine}) is not known to rspec-pending_for.
If it is a real RUBY_ENGINE, please report as a bug to #{ISSUES_LINK}
])
end
def no_engine_specified
reason || RELEVANT_VERSIONS_PROC.call(relevant_versions) if versions_include_current?
end
def engine_specified_and_relevant
if relevant_versions.empty?
# No versions specified means ALL versions for this engine
reason || "#{BROKEN_STRING} #{BUG_STRING} #{INTERPRETER_MATRIX[relevant_engine]}"
elsif versions_include_current?
reason || %[#{RELEVANT_VERSIONS_PROC.call(relevant_versions)} (#{INTERPRETER_MATRIX[relevant_engine]})]
end
end
end
end
end
rspec-pending_for-0.1.19/lib/rspec/pending_for/rspec.rb 0000644 0000041 0000041 00000000157 15060261576 023066 0 ustar www-data www-data # frozen_string_literal: true
require "rspec/core"
RSpec.configure do |c|
c.include(Rspec::PendingFor)
end
rspec-pending_for-0.1.19/lib/rspec/pending_for/version.rb 0000644 0000041 0000041 00000000302 15060261576 023427 0 ustar www-data www-data # frozen_string_literal: true
module Rspec
module PendingFor
module Version
VERSION = "0.1.19"
end
# Backwards compatability shim.
VERSION = Version::VERSION
end
end
rspec-pending_for-0.1.19/lib/rspec/pending_for.rb 0000644 0000041 0000041 00000006131 15060261576 021750 0 ustar www-data www-data # frozen_string_literal: true
# External Libraries
require "ruby_version"
require "ruby_engine"
# This gem
require_relative "pending_for/version"
require_relative "pending_for/engine_or_versions_required"
require_relative "pending_for/build"
require_relative "pending_for/rspec"
module Rspec
# Use with Rspec by including in your example groups, just like any other Rspec helpers:
#
# RSpec.configure do |c|
# c.include Rspec::PendingFor
# end
#
module PendingFor
# How to pend specs that break due to bugs in Ruby interpreters or versions
#
# it("blah is blah") do
# pending_for(engine: "ruby", versions: "2.1.5")
# expect("blah").to eq "blah"
# end
#
# Not using named parameters because still supporting Ruby 1.9
#
# @param options [Hash] pending configuration
# @option options [String,Symbol] :engine ("ruby") Ruby engine name to match, e.g. :ruby, :jruby, :truffleruby
# @option options [String,Range,Array] :versions
# A single version string or range, or an Array of version specs. Each spec can be:
# - String: exact version match (e.g., "2.7.8")
# - Range: inclusive/exclusive bounds respected (e.g., Gem::Version.new("2.6.0")...Gem::Version.new("3.0.0"))
# - Range: compares Ruby major version (e.g., 2..3). Inclusive/exclusive respected.
# JRuby/TruffleRuby are supported via RUBY_VERSION compatibility for Integer ranges and Gem::Version ranges.
# @option options [String] :reason Custom message to display when pending
def pending_for(options = {})
modify_example_with(:pending, options)
end
# How to pend specs that break due to bugs in Ruby interpreters or versions
#
# it("blah is blah") do
# skip_for(engine: "jruby", versions: "2.2.2")
# expect("blah").to eq "blah"
# end
#
# Not using named parameters because still supporting Ruby 1.9
#
# @param options [Hash] skip configuration
# @option options [String,Symbol] :engine ("ruby") Ruby engine name to match, e.g. :ruby, :jruby, :truffleruby
# @option options [String,Range,Array] :versions
# A single version string or range, or an Array of version specs. Each spec can be:
# - String: exact version match (e.g., "2.7.8")
# - Range: inclusive/exclusive bounds respected (e.g., Gem::Version.new("2.6.0")...Gem::Version.new("3.0.0"))
# - Range: compares Ruby major version (e.g., 2..3). Inclusive/exclusive respected.
# JRuby/TruffleRuby are supported via RUBY_VERSION compatibility for Integer ranges and Gem::Version ranges.
# @option options [String] :reason Custom message to display when skipping
def skip_for(options = {})
modify_example_with(:skip, options)
end
private
def modify_example_with(message, options)
raise(EngineOrVersionsRequired, "#{message}_for") unless options[:engine] || options[:versions]
build = Build.new(options)
send(message, build.message) if build.current_matches_specified?
end
end
end
rspec-pending_for-0.1.19/LICENSE.txt 0000644 0000041 0000041 00000002124 15060261576 017070 0 ustar www-data www-data Copyright (c) 2015-2018, 2020-2022, 2025 Peter H. Boling of Galtzo.com
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
rspec-pending_for-0.1.19/CITATION.cff 0000644 0000041 0000041 00000001125 15060261576 017137 0 ustar www-data www-data cff-version: 1.2.0
title: rspec-pending_for
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/galtzo-floss/rspec-pending_for'
description: rspec-pending_for
repository-code: 'https://github.com/galtzo-floss/rspec-pending_for'
abstract: >-
rspec-pending_for
license: See license file
rspec-pending_for-0.1.19/rspec-pending_for.gemspec 0000644 0000041 0000041 00000013353 15060261576 022224 0 ustar www-data www-data #########################################################
# This file has been automatically generated by gem2tgz #
#########################################################
# -*- encoding: utf-8 -*-
# stub: rspec-pending_for 0.1.19 ruby lib
Gem::Specification.new do |s|
s.name = "rspec-pending_for".freeze
s.version = "0.1.19".freeze
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.metadata = { "bug_tracker_uri" => "https://github.com/galtzo-floss/rspec-pending_for/issues", "changelog_uri" => "https://github.com/galtzo-floss/rspec-pending_for/blob/v0.1.19/CHANGELOG.md", "discord_uri" => "https://discord.gg/3qme4XHNKN", "documentation_uri" => "https://www.rubydoc.info/gems/rspec-pending_for/0.1.19", "funding_uri" => "https://github.com/sponsors/pboling", "homepage_uri" => "https://rspec-pending-for.galtzo.com/", "news_uri" => "https://www.railsbling.com/tags/rspec-pending_for", "rubygems_mfa_required" => "true", "source_code_uri" => "https://github.com/galtzo-floss/rspec-pending_for/tree/v0.1.19", "wiki_uri" => "https://github.com/galtzo-floss/rspec-pending_for/wiki" } if s.respond_to? :metadata=
s.require_paths = ["lib".freeze]
s.authors = ["Peter H. Boling".freeze]
s.bindir = "exe".freeze
s.cert_chain = ["-----BEGIN CERTIFICATE-----\nMIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl\nci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW\nA2NvbTAeFw0yNTA1MDQxNTMzMDlaFw00NTA0MjkxNTMzMDlaMEMxFTATBgNVBAMM\nDHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy\nLGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAruUoo0WA\nuoNuq6puKWYeRYiZekz/nsDeK5x/0IEirzcCEvaHr3Bmz7rjo1I6On3gGKmiZs61\nLRmQ3oxy77ydmkGTXBjruJB+pQEn7UfLSgQ0xa1/X3kdBZt6RmabFlBxnHkoaGY5\nmZuZ5+Z7walmv6sFD9ajhzj+oIgwWfnEHkXYTR8I6VLN7MRRKGMPoZ/yvOmxb2DN\ncoEEHWKO9CvgYpW7asIihl/9GMpKiRkcYPm9dGQzZc6uTwom1COfW0+ZOFrDVBuV\nFMQRPswZcY4Wlq0uEBLPU7hxnCL9nKK6Y9IhdDcz1mY6HZ91WImNslOSI0S8hRpj\nyGOWxQIhBT3fqCBlRIqFQBudrnD9jSNpSGsFvbEijd5ns7Z9ZMehXkXDycpGAUj1\nto/5cuTWWw1JqUWrKJYoifnVhtE1o1DZ+LkPtWxHtz5kjDG/zR3MG0Ula0UOavlD\nqbnbcXPBnwXtTFeZ3C+yrWpE4pGnl3yGkZj9SMTlo9qnTMiPmuWKQDatAgMBAAGj\nfzB9MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQE8uWvNbPVNRXZ\nHlgPbc2PCzC4bjAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG\nA1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD\nggGBAJbnUwfJQFPkBgH9cL7hoBfRtmWiCvdqdjeTmi04u8zVNCUox0A4gT982DE9\nwmuN12LpdajxZONqbXuzZvc+nb0StFwmFYZG6iDwaf4BPywm2e/Vmq0YG45vZXGR\nL8yMDSK1cQXjmA+ZBKOHKWavxP6Vp7lWvjAhz8RFwqF9GuNIdhv9NpnCAWcMZtpm\nGUPyIWw/Cw/2wZp74QzZj6Npx+LdXoLTF1HMSJXZ7/pkxLCsB8m4EFVdb/IrW/0k\nkNSfjtAfBHO8nLGuqQZVH9IBD1i9K6aSs7pT6TW8itXUIlkIUI2tg5YzW6OFfPzq\nQekSkX3lZfY+HTSp/o+YvKkqWLUV7PQ7xh1ZYDtocpaHwgxe/j3bBqHE+CUPH2vA\n0V/FwdTRWcwsjVoOJTrYcff8pBZ8r2MvtAc54xfnnhGFzeRHfcltobgFxkAXdE6p\nDVjBtqT23eugOqQ73umLcYDZkc36vnqGxUBSsXrzY9pzV5gGr2I8YUxMqf6ATrZt\nL9nRqA==\n-----END CERTIFICATE-----\n".freeze]
s.date = "1980-01-02"
s.description = "\u23F3\uFE0F Mark specs pending or skipped for specific Ruby engine (e.g. MRI or JRuby) & versions, or version ranges. Fund overlooked open source projects - bottom of stack, dev/test dependencies: floss-funding.dev".freeze
s.email = ["floss@galtzo.com".freeze]
s.extra_rdoc_files = ["CHANGELOG.md".freeze, "CITATION.cff".freeze, "CODE_OF_CONDUCT.md".freeze, "CONTRIBUTING.md".freeze, "FUNDING.md".freeze, "LICENSE.txt".freeze, "README.md".freeze, "REEK".freeze, "RUBOCOP.md".freeze, "SECURITY.md".freeze]
s.files = ["CHANGELOG.md".freeze, "CITATION.cff".freeze, "CODE_OF_CONDUCT.md".freeze, "CONTRIBUTING.md".freeze, "FUNDING.md".freeze, "LICENSE.txt".freeze, "README.md".freeze, "REEK".freeze, "RUBOCOP.md".freeze, "SECURITY.md".freeze, "lib/rspec-pending_for.rb".freeze, "lib/rspec/pending_for.rb".freeze, "lib/rspec/pending_for/build.rb".freeze, "lib/rspec/pending_for/engine_or_versions_required.rb".freeze, "lib/rspec/pending_for/rspec.rb".freeze, "lib/rspec/pending_for/version.rb".freeze, "sig/rspec/pending_for.rbs".freeze, "sig/rspec/pending_for/build.rbs".freeze]
s.homepage = "https://github.com/galtzo-floss/rspec-pending_for".freeze
s.licenses = ["MIT".freeze]
s.rdoc_options = ["--title".freeze, "rspec-pending_for - \u23F3\uFE0F Mark specs pending or skipped for specified Ruby versions or engines".freeze, "--main".freeze, "README.md".freeze, "--exclude".freeze, "^sig/".freeze, "--line-numbers".freeze, "--inline-source".freeze, "--quiet".freeze]
s.required_ruby_version = Gem::Requirement.new(">= 1.8.7".freeze)
s.rubygems_version = "3.7.1".freeze
s.summary = "\u23F3\uFE0F Mark specs pending or skipped for specified Ruby versions or engines".freeze
s.specification_version = 4
s.add_development_dependency(%q.freeze, ["~> 3.0".freeze])
s.add_development_dependency(%q.freeze, ["~> 0.9.2".freeze])
s.add_development_dependency(%q.freeze, ["~> 1.0".freeze, ">= 1.0.3".freeze])
s.add_development_dependency(%q.freeze, ["~> 1.0".freeze])
s.add_development_dependency(%q.freeze, ["~> 1.0".freeze])
s.add_development_dependency(%q.freeze, ["~> 13.0".freeze])
s.add_development_dependency(%q.freeze, ["~> 1.0".freeze, ">= 1.0.4".freeze])
s.add_runtime_dependency(%q.freeze, ["~> 3.0".freeze])
s.add_development_dependency(%q.freeze, ["~> 0.0".freeze, ">= 0.0.17".freeze])
s.add_development_dependency(%q.freeze, ["~> 1.13".freeze])
s.add_runtime_dependency(%q.freeze, ["~> 2.0".freeze])
s.add_runtime_dependency(%q.freeze, ["~> 1.0".freeze])
s.add_development_dependency(%q.freeze, ["~> 1.0".freeze, ">= 1.0.2".freeze])
s.add_runtime_dependency(%q.freeze, ["~> 1.1".freeze, ">= 1.1.8".freeze])
end
rspec-pending_for-0.1.19/checksums.yaml.gz.sig 0000444 0000041 0000041 00000000600 15060261576 021311 0 ustar www-data www-data .Z.85fp{ٙd75#R6:Zz<++
tl"Q@WUyC|yv?2>öڥf*R&SpP&c01,p(킬Η[
B 5:5]3JUl+H?3;䳜8Ɣ6Wq<{C16!`CL\4]Y!O[:ޘ.s*t ]lU!Np;z~ʇ]z3;$`_zÇQ#yyzrB(|9tV ~ d8'4}?s;ژ rspec-pending_for-0.1.19/CODE_OF_CONDUCT.md 0000644 0000041 0000041 00000013116 15060261576 020047 0 ustar www-data www-data # Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[![Contact Maintainer][🚂maint-contact-img]][🚂maint-contact].
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
[🚂maint-contact]: http://www.railsbling.com/contact
[🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
rspec-pending_for-0.1.19/data.tar.gz.sig 0000444 0000041 0000041 00000000600 15060261576 020061 0 ustar www-data www-data B{AmC8}\Luٻ5EY
DĻR\
=
ɍaI!!3y#zsP]K
ӨJ47_$`|Aӑ\?T5"r]Lpq]ubonom}
d wsSL딂nfM7&oJQ(ZqBqA:ԠU9K#W'ТHvc6j:
H c=!c824F+XlS^yvJ_jT]}jso G27Fz(P.YEPQDz3Of0m*
]Q9m QfѦ&