Skip to content

Conversation

@kaka-ruto
Copy link
Contributor

This PR updates the Pay gem dependency to support versions 8.3 and 9,
while maintaining compatibility with existing functionality. The change
modifies the gemspec to specify:

spec.add_dependency "pay", ">= 8.3", "< 10.0"

This allows the usage_credits gem to work with newer versions of the Pay gem
while ensuring compatibility up to but not including version 10.0.

@kaka-ruto kaka-ruto force-pushed the main branch 2 times, most recently from 710b35f to c27f504 Compare April 30, 2025 21:30
@sjmog
Copy link

sjmog commented Jun 4, 2025

Any update on this? Using usage_credits is causing Stripe order fulfilment to fail because the old pay gem is locked to Stripe ~>13.

@kaka-ruto
Copy link
Contributor Author

Any update on this? Using usage_credits is causing Stripe order fulfilment to fail because the old pay gem is locked to Stripe ~>13.

All good from my side. Tested this in production, it works. Any feedback @rameerez ?

@johnnagro
Copy link

hey @rameerez - any updates? I'm happy to lend a hand if you need some help

@njcameron
Copy link

Trying to use usage_credits with latest version of Jumpstart Pro and blocked by this too

@kaka-ruto
Copy link
Contributor Author

Before this is merged, you can use this on your Gemfile to use this PR's code

gem "usage_credits", github: "kaka-ruto/usage_credits"

@njcameron
Copy link

thanks @kaka-ruto any tips on how to get around:

The gemspec at /Users/xxx/.rbenv/versions/3.4.6/lib/ruby/gems/3.4.0/bundler/gems/usage_credits-4d43dd632a3b/usage_credits.gemspec is not valid. Please fix this gemspec.
The validation error was 'usage_credits-0.1.1 contains itself (usage_credits-0.1.1.gem), check your files list'

@njcameron
Copy link

in the end I forked it and removed the file usage_credits-0.1.1.gem I also had to bump Pay dependency to <=11.2 I guess I'll find out if its compatible!

@kaka-ruto
Copy link
Contributor Author

Awesome @njcameron, feel free to send a patch for <=11.2 if it works!

@johnnagro
Copy link

hey @rameerez - could I lend a hand here? we'd love to get this merged for one of our projects

@rameerez
Copy link
Owner

Merged, thanks everyone!

The gem lacked proper testing so I added a Minitest test suite (#15) to make sure upgrading Pay didn't break anything in the gem. Added a CI testing matrix too to test against different versions of Pay (#17) to ensure we don't break anything moving forward when adding compatibility for Pay >=10, which has breaking changes.

@johnnagro
Copy link

thanks @rameerez - really appreciate it. lemme know if you ever need a hand here. the gem is super useful, thank you.

onurozer pushed a commit to onurozer/usage_credits that referenced this pull request Jan 10, 2026
…ameerez#10)

Update Pay gem dependency to support versions 8.3 to 9.x
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.

5 participants