Skip to content

Pull from stripe-ruby-mock:origin/master#3

Open
quekshuy wants to merge 8 commits intopadlet:masterfrom
stripe-ruby-mock:master
Open

Pull from stripe-ruby-mock:origin/master#3
quekshuy wants to merge 8 commits intopadlet:masterfrom
stripe-ruby-mock:master

Conversation

@quekshuy
Copy link
Copy Markdown

@quekshuy quekshuy commented Nov 7, 2025

This pull request introduces improvements to promotion code filtering and makes minor updates to gem usage and loading. The main change is the addition of case-insensitive filtering for promotion codes when listing, along with corresponding test coverage. There are also updates to the gem installation instructions and the main library file.

Promotion code filtering:

  • Added case-insensitive filtering by code when listing promotion codes in list_promotion_code, ensuring that searches match regardless of letter case.
  • Added a test to verify listing and filtering promotion codes by code in a case-insensitive manner in promotion_code_examples.rb.

Gem usage and loading:

  • Updated the gem installation instructions in README.md to remove the explicit :require => 'stripe_mock' option, simplifying usage.
  • Added a require 'stripe_mock' statement to the main stripe-ruby-mock.rb file to ensure proper loading of the gem.

@quekshuy quekshuy requested review from a team, daryllxd, julianalmandos, nvdai2401 and strawhatduckk and removed request for a team November 7, 2025 07:34
nafu added 6 commits March 30, 2026 19:25
* stripe_validator_spec.rb was loaded twice: once by RSpec
  (matching *_spec.rb pattern via load) and once by spec_helper
  (via require in Dir glob), causing a shared example group
  redefinition warning.
* Rename to stripe_validator.rb since it is a shared context,
  not a spec file.
* Stripe v6 uses Subscription#delete, v7+ uses #cancel.
* Add cancel_subscription and cancel_subscription_by_id
  helpers that delegate to the correct method.
* Invoice.create_preview was added in Stripe v11.
* Tests now check for method availability and skip
  gracefully on older versions.
* Stripe v6 requires a positional argument for
  Invoice.upcoming; passing {} works across all versions.
* Add appraisal gemfiles for Stripe 6-11
* Add gemfiles for testing against Stripe SDK v6 through v11
  to verify backward compatibility.
* Add lockfiles for Stripe 6-11 gemfiles
* Add Stripe 6-11 to CI test matrix
* Full Ruby matrix (3.1, 3.2, 3.3) for Stripe 12-13.
* Single Ruby 3.3 for Stripe 6-11 backward compat checks.
* Use full matrix for Stripe 6-11 CI test combinations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants