diff --git a/CHANGELOG.md b/CHANGELOG.md index 3748d15f..f1f2a9a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,20 @@ ### Unreleased +### 8.1.3 + +* Raise `Pay::Error` instead of `StandardError` consistently + +### 8.1.2 + +* Allow proration mode argument for Paddle Billing subscriptions +* Fix Lemon Squeezy sync subscription +* Fix typo in Paddle Billing customer `api_record` + +### 8.1.1 + +* Fix `retry_failed_payment` for Stripe subscriptions #1084 + ### 8.1.0 * Stripe v13 diff --git a/Gemfile.lock b/Gemfile.lock index d3f38345..12d3b1f7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,8 @@ GIT remote: https://github.com/thoughtbot/appraisal.git - revision: 24feeea4c5c1d2e7a5f95d053da61858c6bfb2b1 + revision: 602cdd9b5f8cb8f36992733422f69312b172f427 specs: - appraisal (2.5.0) + appraisal (3.0.0.rc1) bundler rake thor (>= 0.14.0) @@ -10,35 +10,35 @@ GIT PATH remote: . specs: - pay (8.1.0) + pay (8.1.3) rails (>= 6.0.0) GEM remote: https://rubygems.org/ specs: - actioncable (7.2.1) - actionpack (= 7.2.1) - activesupport (= 7.2.1) + actioncable (7.2.1.2) + actionpack (= 7.2.1.2) + activesupport (= 7.2.1.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.1) - actionpack (= 7.2.1) - activejob (= 7.2.1) - activerecord (= 7.2.1) - activestorage (= 7.2.1) - activesupport (= 7.2.1) + actionmailbox (7.2.1.2) + actionpack (= 7.2.1.2) + activejob (= 7.2.1.2) + activerecord (= 7.2.1.2) + activestorage (= 7.2.1.2) + activesupport (= 7.2.1.2) mail (>= 2.8.0) - actionmailer (7.2.1) - actionpack (= 7.2.1) - actionview (= 7.2.1) - activejob (= 7.2.1) - activesupport (= 7.2.1) + actionmailer (7.2.1.2) + actionpack (= 7.2.1.2) + actionview (= 7.2.1.2) + activejob (= 7.2.1.2) + activesupport (= 7.2.1.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.1) - actionview (= 7.2.1) - activesupport (= 7.2.1) + actionpack (7.2.1.2) + actionview (= 7.2.1.2) + activesupport (= 7.2.1.2) nokogiri (>= 1.8.5) racc rack (>= 2.2.4, < 3.2) @@ -47,35 +47,35 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.1) - actionpack (= 7.2.1) - activerecord (= 7.2.1) - activestorage (= 7.2.1) - activesupport (= 7.2.1) + actiontext (7.2.1.2) + actionpack (= 7.2.1.2) + activerecord (= 7.2.1.2) + activestorage (= 7.2.1.2) + activesupport (= 7.2.1.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.1) - activesupport (= 7.2.1) + actionview (7.2.1.2) + activesupport (= 7.2.1.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.2.1) - activesupport (= 7.2.1) + activejob (7.2.1.2) + activesupport (= 7.2.1.2) globalid (>= 0.3.6) - activemodel (7.2.1) - activesupport (= 7.2.1) - activerecord (7.2.1) - activemodel (= 7.2.1) - activesupport (= 7.2.1) + activemodel (7.2.1.2) + activesupport (= 7.2.1.2) + activerecord (7.2.1.2) + activemodel (= 7.2.1.2) + activesupport (= 7.2.1.2) timeout (>= 0.4.0) - activestorage (7.2.1) - actionpack (= 7.2.1) - activejob (= 7.2.1) - activerecord (= 7.2.1) - activesupport (= 7.2.1) + activestorage (7.2.1.2) + actionpack (= 7.2.1.2) + activejob (= 7.2.1.2) + activerecord (= 7.2.1.2) + activesupport (= 7.2.1.2) marcel (~> 1.0) - activesupport (7.2.1) + activesupport (7.2.1.2) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) @@ -115,7 +115,7 @@ GEM hashdiff (1.1.1) i18n (1.14.6) concurrent-ruby (~> 1.0) - importmap-rails (2.0.1) + importmap-rails (2.0.3) actionpack (>= 6.0.0) activesupport (>= 6.0.0) railties (>= 6.0.0) @@ -123,13 +123,13 @@ GEM irb (1.14.1) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.2) + json (2.7.4) language_server-protocol (3.17.0.3) lemonsqueezy (1.0.1) faraday (~> 2.0) lint_roller (1.1.0) logger (1.6.1) - loofah (2.22.0) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -142,12 +142,12 @@ GEM mini_mime (1.1.5) mini_portile2 (2.8.7) minitest (5.25.1) - mocha (2.4.5) + mocha (2.5.0) ruby2_keywords (>= 0.0.5) mysql2 (0.5.6) net-http (0.4.1) uri - net-imap (0.4.16) + net-imap (0.5.0) date net-protocol net-pop (0.1.2) @@ -156,7 +156,7 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.3) + nio4r (2.7.4) nokogiri (1.16.7) mini_portile2 (~> 2.8.2) racc (~> 1.4) @@ -173,7 +173,7 @@ GEM ast (~> 2.4.1) racc pdf-core (0.10.0) - pg (1.5.8) + pg (1.5.9) prawn (2.5.0) matrix (~> 0.4) pdf-core (~> 0.10.0) @@ -186,7 +186,7 @@ GEM puma (6.4.3) nio4r (~> 2.0) racc (1.8.1) - rack (3.1.7) + rack (3.1.8) rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) @@ -194,20 +194,20 @@ GEM rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rails (7.2.1) - actioncable (= 7.2.1) - actionmailbox (= 7.2.1) - actionmailer (= 7.2.1) - actionpack (= 7.2.1) - actiontext (= 7.2.1) - actionview (= 7.2.1) - activejob (= 7.2.1) - activemodel (= 7.2.1) - activerecord (= 7.2.1) - activestorage (= 7.2.1) - activesupport (= 7.2.1) + rails (7.2.1.2) + actioncable (= 7.2.1.2) + actionmailbox (= 7.2.1.2) + actionmailer (= 7.2.1.2) + actionpack (= 7.2.1.2) + actiontext (= 7.2.1.2) + actionview (= 7.2.1.2) + activejob (= 7.2.1.2) + activemodel (= 7.2.1.2) + activerecord (= 7.2.1.2) + activestorage (= 7.2.1.2) + activesupport (= 7.2.1.2) bundler (>= 1.15.0) - railties (= 7.2.1) + railties (= 7.2.1.2) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -215,9 +215,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.2.1) - actionpack (= 7.2.1) - activesupport (= 7.2.1) + railties (7.2.1.2) + actionpack (= 7.2.1.2) + activesupport (= 7.2.1.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -233,21 +233,20 @@ GEM regexp_parser (2.9.2) reline (0.5.10) io-console (~> 0.5) - rexml (3.3.8) - rubocop (1.65.1) + rexml (3.3.9) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.32.3) parser (>= 3.3.1.0) - rubocop-performance (1.21.1) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) @@ -260,31 +259,31 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - sqlite3 (2.1.0) + sqlite3 (2.1.1) mini_portile2 (~> 2.8.0) - sqlite3 (2.1.0-x86_64-darwin) - sqlite3 (2.1.0-x86_64-linux-gnu) - standard (1.40.0) + sqlite3 (2.1.1-x86_64-darwin) + sqlite3 (2.1.1-x86_64-linux-gnu) + standard (1.41.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.65.0) + rubocop (~> 1.66.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.4) + standard-performance (~> 1.5) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.4.0) + standard-performance (1.5.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.21.0) + rubocop-performance (~> 1.22.0) stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.1.1) - stripe (13.0.0) + stripe (13.0.2) thor (1.3.2) timeout (0.4.1) ttfunk (1.8.0) bigdecimal (~> 3.1) - turbo-rails (2.0.10) + turbo-rails (2.0.11) actionpack (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) @@ -307,7 +306,7 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.18) + zeitwerk (2.7.1) PLATFORMS ruby diff --git a/app/models/pay/braintree/subscription.rb b/app/models/pay/braintree/subscription.rb index df3d4129..5e07b7b2 100644 --- a/app/models/pay/braintree/subscription.rb +++ b/app/models/pay/braintree/subscription.rb @@ -95,7 +95,7 @@ def resumable? def resume unless resumable? - raise StandardError, "You can only resume subscriptions within their grace period." + raise Error, "You can only resume subscriptions within their grace period." end if canceled? && on_trial? diff --git a/app/models/pay/fake_processor/subscription.rb b/app/models/pay/fake_processor/subscription.rb index 52577890..172c883e 100644 --- a/app/models/pay/fake_processor/subscription.rb +++ b/app/models/pay/fake_processor/subscription.rb @@ -37,7 +37,7 @@ def resumable? def resume unless resumable? - raise StandardError, "You can only resume subscriptions within their grace period." + raise Error, "You can only resume subscriptions within their grace period." end update(status: :active, trial_ends_at: nil, ends_at: nil) diff --git a/app/models/pay/lemon_squeezy/subscription.rb b/app/models/pay/lemon_squeezy/subscription.rb index bd42b32e..2e8b0cbf 100644 --- a/app/models/pay/lemon_squeezy/subscription.rb +++ b/app/models/pay/lemon_squeezy/subscription.rb @@ -9,7 +9,7 @@ def self.sync(subscription_id, object: nil, name: Pay.default_product_name) attributes = { current_period_end: object.renews_at, - ends_at: (object.ends_at ? Time.parse(object..ends_at) : nil), + ends_at: (object.ends_at ? Time.parse(object.ends_at) : nil), pause_starts_at: (object.pause&.resumes_at ? Time.parse(object.pause.resumes_at) : nil), status: object.status, processor_plan: object.first_subscription_item.price_id, @@ -100,7 +100,7 @@ def resumable? def resume unless resumable? - raise StandardError, "You can only resume paused or cancelled subscriptions" + raise Error, "You can only resume paused or cancelled subscriptions" end if paused? && pause_starts_at? && Time.current < pause_starts_at @@ -117,8 +117,8 @@ def resume # Lemon Squeezy requires both the Product ID and Variant ID. # The Variant ID will be saved as the processor_plan def swap(plan, **options) - raise StandardError, "A plan_id is required to swap a subscription" unless plan - raise StandardError, "A variant_id is required to swap a subscription" unless options[:variant_id] + raise Error, "A plan_id is required to swap a subscription" unless plan + raise Error, "A variant_id is required to swap a subscription" unless options[:variant_id] ::LemonSqueezy::Subscription.change_plan id: processor_id, plan_id: plan, variant_id: options[:variant_id] diff --git a/app/models/pay/paddle_billing/charge.rb b/app/models/pay/paddle_billing/charge.rb index 8e372a41..3244efe5 100644 --- a/app/models/pay/paddle_billing/charge.rb +++ b/app/models/pay/paddle_billing/charge.rb @@ -56,6 +56,14 @@ def self.sync(charge_id, object: nil, try: 0, retries: 1) else pay_customer.charges.create!(attrs.merge(processor_id: object.id)) end + rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotUnique + try += 1 + if try <= retries + sleep 0.1 + retry + else + raise + end end end end diff --git a/app/models/pay/paddle_billing/customer.rb b/app/models/pay/paddle_billing/customer.rb index c3151a2a..344f4452 100644 --- a/app/models/pay/paddle_billing/customer.rb +++ b/app/models/pay/paddle_billing/customer.rb @@ -24,7 +24,7 @@ def api_record pc else pc = ::Paddle::Customer.create(email: email, name: customer_name) - update!(processor_id: sc.id) + update!(processor_id: pc.id) pc end rescue ::Paddle::Error => e diff --git a/app/models/pay/paddle_billing/payment_method.rb b/app/models/pay/paddle_billing/payment_method.rb index b422d0f8..47c4c9f2 100644 --- a/app/models/pay/paddle_billing/payment_method.rb +++ b/app/models/pay/paddle_billing/payment_method.rb @@ -8,7 +8,7 @@ def self.sync_from_transaction(pay_customer:, transaction:) sync(pay_customer: pay_customer, attributes: transaction.payments.first) end - def self.sync(pay_customer:, attributes:) + def self.sync(pay_customer:, attributes:, try: 0, retries: 1) details = attributes.method_details attrs = { payment_method_type: details.type.downcase @@ -25,6 +25,14 @@ def self.sync(pay_customer:, attributes:) payment_method = pay_customer.payment_methods.find_or_initialize_by(processor_id: attributes.payment_method_id) payment_method.update!(attrs) payment_method + rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotUnique + try += 1 + if try <= retries + sleep 0.1 + retry + else + raise + end end def make_default! diff --git a/app/models/pay/paddle_billing/subscription.rb b/app/models/pay/paddle_billing/subscription.rb index 048a81bf..405d70e4 100644 --- a/app/models/pay/paddle_billing/subscription.rb +++ b/app/models/pay/paddle_billing/subscription.rb @@ -6,7 +6,7 @@ def self.sync_from_transaction(transaction_id) sync(transaction.subscription_id) if transaction.subscription_id end - def self.sync(subscription_id, object: nil, name: Pay.default_product_name) + def self.sync(subscription_id, object: nil, name: Pay.default_product_name, try: 0, retries: 1) # Passthrough is not return from this API, so we can't use that object ||= ::Paddle::Subscription.retrieve(id: subscription_id) @@ -62,6 +62,14 @@ def self.sync(subscription_id, object: nil, name: Pay.default_product_name) else pay_customer.subscriptions.create!(attributes.merge(name: name, processor_id: subscription_id)) end + rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotUnique + try += 1 + if try <= retries + sleep 0.1 + retry + else + raise + end end def api_record(**options) @@ -102,7 +110,11 @@ def change_quantity(quantity, **options) quantity: quantity }] - ::Paddle::Subscription.update(id: processor_id, items: items, proration_billing_mode: "prorated_immediately") + ::Paddle::Subscription.update( + id: processor_id, + items: items, + proration_billing_mode: options.delete(:proration_billing_mode) || "prorated_immediately" + ) update(quantity: quantity) rescue ::Paddle::Error => e raise Pay::PaddleBilling::Error, e @@ -131,7 +143,7 @@ def resumable? def resume unless resumable? - raise StandardError, "You can only resume paused subscriptions." + raise Error, "You can only resume paused subscriptions." end # Paddle Billing API only allows "resuming" subscriptions when they are paused @@ -148,12 +160,18 @@ def resume end def swap(plan, **options) + raise ArgumentError, "plan must be a string" unless plan.is_a?(String) + items = [{ price_id: plan, quantity: quantity || 1 }] - ::Paddle::Subscription.update(id: processor_id, items: items, proration_billing_mode: "prorated_immediately") + ::Paddle::Subscription.update( + id: processor_id, + items: items, + proration_billing_mode: options.delete(:proration_billing_mode) || "prorated_immediately" + ) update(processor_plan: plan, ends_at: nil, status: :active) end diff --git a/app/models/pay/paddle_classic/subscription.rb b/app/models/pay/paddle_classic/subscription.rb index 3e2eb845..3f843711 100644 --- a/app/models/pay/paddle_classic/subscription.rb +++ b/app/models/pay/paddle_classic/subscription.rb @@ -116,7 +116,7 @@ def resumable? def resume unless resumable? - raise StandardError, "You can only resume paused subscriptions." + raise Error, "You can only resume paused subscriptions." end PaddleClassic.client.users.unpause(subscription_id: processor_id) diff --git a/app/models/pay/stripe/subscription.rb b/app/models/pay/stripe/subscription.rb index e89a935e..b3bcc1aa 100644 --- a/app/models/pay/stripe/subscription.rb +++ b/app/models/pay/stripe/subscription.rb @@ -256,7 +256,7 @@ def resumable? def resume unless resumable? - raise StandardError, "You can only resume subscriptions within their grace period." + raise Error, "You can only resume subscriptions within their grace period." end if paused? @@ -332,7 +332,7 @@ def upcoming_invoice(**options) # Retries the latest invoice for a Past Due subscription and attempts to pay it def retry_failed_payment(payment_intent_id: nil) - payment_intent_id ||= subscription.latest_invoice.payment_intent.id + payment_intent_id ||= api_record.latest_invoice.payment_intent.id payment_intent = ::Stripe::PaymentIntent.retrieve({id: payment_intent_id}, stripe_options) payment_intent = if payment_intent.status == "requires_payment_method" diff --git a/docs/paddle_billing/1_overview.md b/docs/paddle_billing/1_overview.md index 8f6efd9f..c0f0fb32 100644 --- a/docs/paddle_billing/1_overview.md +++ b/docs/paddle_billing/1_overview.md @@ -17,7 +17,7 @@ Paddle now works similar to Stripe. You create a customer, which subscriptions b @user.set_payment_processor :paddle_billing # Create the customer on Paddle -@user.payment_processor.customer +@user.payment_processor.api_record ``` ## Prices & Plans diff --git a/docs/stripe/8_stripe_checkout.md b/docs/stripe/8_stripe_checkout.md index 5b4b1188..c398aa0a 100644 --- a/docs/stripe/8_stripe_checkout.md +++ b/docs/stripe/8_stripe_checkout.md @@ -76,6 +76,9 @@ First, create a session in your controller: class SubscriptionsController < ApplicationController def index @portal_session = current_user.payment_processor.billing_portal + + # You can customize the billing_portal return_url (default is root_url): + # @portal_session = current_user.payment_processor.billing_portal(return_url: your_url) end end ``` diff --git a/gemfiles/rails_6_1.gemfile.lock b/gemfiles/rails_6_1.gemfile.lock index 7487ecb4..09ff3059 100644 --- a/gemfiles/rails_6_1.gemfile.lock +++ b/gemfiles/rails_6_1.gemfile.lock @@ -1,8 +1,8 @@ GIT remote: https://github.com/thoughtbot/appraisal.git - revision: 24feeea4c5c1d2e7a5f95d053da61858c6bfb2b1 + revision: 602cdd9b5f8cb8f36992733422f69312b172f427 specs: - appraisal (2.5.0) + appraisal (3.0.0.rc1) bundler rake thor (>= 0.14.0) @@ -10,66 +10,66 @@ GIT PATH remote: .. specs: - pay (8.1.0) + pay (8.1.3) rails (>= 6.0.0) GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.8) - actionpack (= 6.1.7.8) - activesupport (= 6.1.7.8) + actioncable (6.1.7.10) + actionpack (= 6.1.7.10) + activesupport (= 6.1.7.10) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.8) - actionpack (= 6.1.7.8) - activejob (= 6.1.7.8) - activerecord (= 6.1.7.8) - activestorage (= 6.1.7.8) - activesupport (= 6.1.7.8) + actionmailbox (6.1.7.10) + actionpack (= 6.1.7.10) + activejob (= 6.1.7.10) + activerecord (= 6.1.7.10) + activestorage (= 6.1.7.10) + activesupport (= 6.1.7.10) mail (>= 2.7.1) - actionmailer (6.1.7.8) - actionpack (= 6.1.7.8) - actionview (= 6.1.7.8) - activejob (= 6.1.7.8) - activesupport (= 6.1.7.8) + actionmailer (6.1.7.10) + actionpack (= 6.1.7.10) + actionview (= 6.1.7.10) + activejob (= 6.1.7.10) + activesupport (= 6.1.7.10) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.7.8) - actionview (= 6.1.7.8) - activesupport (= 6.1.7.8) + actionpack (6.1.7.10) + actionview (= 6.1.7.10) + activesupport (= 6.1.7.10) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.7.8) - actionpack (= 6.1.7.8) - activerecord (= 6.1.7.8) - activestorage (= 6.1.7.8) - activesupport (= 6.1.7.8) + actiontext (6.1.7.10) + actionpack (= 6.1.7.10) + activerecord (= 6.1.7.10) + activestorage (= 6.1.7.10) + activesupport (= 6.1.7.10) nokogiri (>= 1.8.5) - actionview (6.1.7.8) - activesupport (= 6.1.7.8) + actionview (6.1.7.10) + activesupport (= 6.1.7.10) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.7.8) - activesupport (= 6.1.7.8) + activejob (6.1.7.10) + activesupport (= 6.1.7.10) globalid (>= 0.3.6) - activemodel (6.1.7.8) - activesupport (= 6.1.7.8) - activerecord (6.1.7.8) - activemodel (= 6.1.7.8) - activesupport (= 6.1.7.8) - activestorage (6.1.7.8) - actionpack (= 6.1.7.8) - activejob (= 6.1.7.8) - activerecord (= 6.1.7.8) - activesupport (= 6.1.7.8) + activemodel (6.1.7.10) + activesupport (= 6.1.7.10) + activerecord (6.1.7.10) + activemodel (= 6.1.7.10) + activesupport (= 6.1.7.10) + activestorage (6.1.7.10) + actionpack (= 6.1.7.10) + activejob (= 6.1.7.10) + activerecord (= 6.1.7.10) + activesupport (= 6.1.7.10) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.7.8) + activesupport (6.1.7.10) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -102,17 +102,17 @@ GEM hashdiff (1.1.1) i18n (1.14.6) concurrent-ruby (~> 1.0) - importmap-rails (2.0.1) + importmap-rails (2.0.3) actionpack (>= 6.0.0) activesupport (>= 6.0.0) railties (>= 6.0.0) - json (2.7.2) + json (2.7.4) language_server-protocol (3.17.0.3) lemonsqueezy (1.0.1) faraday (~> 2.0) lint_roller (1.1.0) logger (1.6.1) - loofah (2.22.0) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -125,12 +125,12 @@ GEM method_source (1.1.0) mini_mime (1.1.5) minitest (5.25.1) - mocha (2.4.5) + mocha (2.5.0) ruby2_keywords (>= 0.0.5) mysql2 (0.5.6) net-http (0.4.1) uri - net-imap (0.4.16) + net-imap (0.5.0) date net-protocol net-pop (0.1.2) @@ -139,7 +139,7 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.3) + nio4r (2.7.4) nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) nokogiri (1.16.7-x86_64-darwin) @@ -155,7 +155,7 @@ GEM ast (~> 2.4.1) racc pdf-core (0.10.0) - pg (1.5.8) + pg (1.5.9) prawn (2.5.0) matrix (~> 0.4) pdf-core (~> 0.10.0) @@ -166,23 +166,23 @@ GEM puma (6.4.3) nio4r (~> 2.0) racc (1.8.1) - rack (2.2.9) + rack (2.2.10) rack-test (2.1.0) rack (>= 1.3) - rails (6.1.7.8) - actioncable (= 6.1.7.8) - actionmailbox (= 6.1.7.8) - actionmailer (= 6.1.7.8) - actionpack (= 6.1.7.8) - actiontext (= 6.1.7.8) - actionview (= 6.1.7.8) - activejob (= 6.1.7.8) - activemodel (= 6.1.7.8) - activerecord (= 6.1.7.8) - activestorage (= 6.1.7.8) - activesupport (= 6.1.7.8) + rails (6.1.7.10) + actioncable (= 6.1.7.10) + actionmailbox (= 6.1.7.10) + actionmailer (= 6.1.7.10) + actionpack (= 6.1.7.10) + actiontext (= 6.1.7.10) + actionview (= 6.1.7.10) + activejob (= 6.1.7.10) + activemodel (= 6.1.7.10) + activerecord (= 6.1.7.10) + activestorage (= 6.1.7.10) + activesupport (= 6.1.7.10) bundler (>= 1.15.0) - railties (= 6.1.7.8) + railties (= 6.1.7.10) sprockets-rails (>= 2.0.0) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) @@ -191,9 +191,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (6.1.7.8) - actionpack (= 6.1.7.8) - activesupport (= 6.1.7.8) + railties (6.1.7.10) + actionpack (= 6.1.7.10) + activesupport (= 6.1.7.10) method_source rake (>= 12.2) thor (~> 1.0) @@ -203,21 +203,20 @@ GEM prawn (>= 1.3.0, < 3.0.0) prawn-table (~> 0.2.1) regexp_parser (2.9.2) - rexml (3.3.8) - rubocop (1.65.1) + rexml (3.3.9) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.32.3) parser (>= 3.3.1.0) - rubocop-performance (1.21.1) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) @@ -232,26 +231,26 @@ GEM sqlite3 (1.7.3-arm64-darwin) sqlite3 (1.7.3-x86_64-darwin) sqlite3 (1.7.3-x86_64-linux) - standard (1.40.0) + standard (1.41.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.65.0) + rubocop (~> 1.66.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.4) + standard-performance (~> 1.5) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.4.0) + standard-performance (1.5.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.21.0) + rubocop-performance (~> 1.22.0) stimulus-rails (1.3.4) railties (>= 6.0.0) - stripe (13.0.0) + stripe (13.0.2) thor (1.3.2) timeout (0.4.1) ttfunk (1.8.0) bigdecimal (~> 3.1) - turbo-rails (2.0.10) + turbo-rails (2.0.11) actionpack (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) @@ -272,7 +271,7 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.18) + zeitwerk (2.7.1) PLATFORMS arm64-darwin-21 @@ -312,4 +311,4 @@ DEPENDENCIES webmock BUNDLED WITH - 2.5.17 + 2.5.18 diff --git a/gemfiles/rails_7.gemfile.lock b/gemfiles/rails_7.gemfile.lock index 684371b4..16731a8a 100644 --- a/gemfiles/rails_7.gemfile.lock +++ b/gemfiles/rails_7.gemfile.lock @@ -1,8 +1,8 @@ GIT remote: https://github.com/thoughtbot/appraisal.git - revision: 24feeea4c5c1d2e7a5f95d053da61858c6bfb2b1 + revision: 602cdd9b5f8cb8f36992733422f69312b172f427 specs: - appraisal (2.5.0) + appraisal (3.0.0.rc1) bundler rake thor (>= 0.14.0) @@ -10,73 +10,73 @@ GIT PATH remote: .. specs: - pay (8.1.0) + pay (8.1.3) rails (>= 6.0.0) GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8.4) - actionpack (= 7.0.8.4) - activesupport (= 7.0.8.4) + actioncable (7.0.8.6) + actionpack (= 7.0.8.6) + activesupport (= 7.0.8.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8.4) - actionpack (= 7.0.8.4) - activejob (= 7.0.8.4) - activerecord (= 7.0.8.4) - activestorage (= 7.0.8.4) - activesupport (= 7.0.8.4) + actionmailbox (7.0.8.6) + actionpack (= 7.0.8.6) + activejob (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.8.4) - actionpack (= 7.0.8.4) - actionview (= 7.0.8.4) - activejob (= 7.0.8.4) - activesupport (= 7.0.8.4) + actionmailer (7.0.8.6) + actionpack (= 7.0.8.6) + actionview (= 7.0.8.6) + activejob (= 7.0.8.6) + activesupport (= 7.0.8.6) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.8.4) - actionview (= 7.0.8.4) - activesupport (= 7.0.8.4) + actionpack (7.0.8.6) + actionview (= 7.0.8.6) + activesupport (= 7.0.8.6) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8.4) - actionpack (= 7.0.8.4) - activerecord (= 7.0.8.4) - activestorage (= 7.0.8.4) - activesupport (= 7.0.8.4) + actiontext (7.0.8.6) + actionpack (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8.4) - activesupport (= 7.0.8.4) + actionview (7.0.8.6) + activesupport (= 7.0.8.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.8.4) - activesupport (= 7.0.8.4) + activejob (7.0.8.6) + activesupport (= 7.0.8.6) globalid (>= 0.3.6) - activemodel (7.0.8.4) - activesupport (= 7.0.8.4) - activerecord (7.0.8.4) - activemodel (= 7.0.8.4) - activesupport (= 7.0.8.4) - activestorage (7.0.8.4) - actionpack (= 7.0.8.4) - activejob (= 7.0.8.4) - activerecord (= 7.0.8.4) - activesupport (= 7.0.8.4) + activemodel (7.0.8.6) + activesupport (= 7.0.8.6) + activerecord (7.0.8.6) + activemodel (= 7.0.8.6) + activesupport (= 7.0.8.6) + activestorage (7.0.8.6) + actionpack (= 7.0.8.6) + activejob (= 7.0.8.6) + activerecord (= 7.0.8.6) + activesupport (= 7.0.8.6) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.8.4) + activesupport (7.0.8.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -108,17 +108,17 @@ GEM hashdiff (1.1.1) i18n (1.14.6) concurrent-ruby (~> 1.0) - importmap-rails (2.0.1) + importmap-rails (2.0.3) actionpack (>= 6.0.0) activesupport (>= 6.0.0) railties (>= 6.0.0) - json (2.7.2) + json (2.7.4) language_server-protocol (3.17.0.3) lemonsqueezy (1.0.1) faraday (~> 2.0) lint_roller (1.1.0) logger (1.6.1) - loofah (2.22.0) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -131,12 +131,12 @@ GEM method_source (1.1.0) mini_mime (1.1.5) minitest (5.25.1) - mocha (2.4.5) + mocha (2.5.0) ruby2_keywords (>= 0.0.5) mysql2 (0.5.6) net-http (0.4.1) uri - net-imap (0.4.16) + net-imap (0.5.0) date net-protocol net-pop (0.1.2) @@ -145,7 +145,7 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.3) + nio4r (2.7.4) nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) nokogiri (1.16.7-x86_64-darwin) @@ -161,7 +161,7 @@ GEM ast (~> 2.4.1) racc pdf-core (0.10.0) - pg (1.5.8) + pg (1.5.9) prawn (2.5.0) matrix (~> 0.4) pdf-core (~> 0.10.0) @@ -172,23 +172,23 @@ GEM puma (6.4.3) nio4r (~> 2.0) racc (1.8.1) - rack (2.2.9) + rack (2.2.10) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.8.4) - actioncable (= 7.0.8.4) - actionmailbox (= 7.0.8.4) - actionmailer (= 7.0.8.4) - actionpack (= 7.0.8.4) - actiontext (= 7.0.8.4) - actionview (= 7.0.8.4) - activejob (= 7.0.8.4) - activemodel (= 7.0.8.4) - activerecord (= 7.0.8.4) - activestorage (= 7.0.8.4) - activesupport (= 7.0.8.4) + rails (7.0.8.6) + actioncable (= 7.0.8.6) + actionmailbox (= 7.0.8.6) + actionmailer (= 7.0.8.6) + actionpack (= 7.0.8.6) + actiontext (= 7.0.8.6) + actionview (= 7.0.8.6) + activejob (= 7.0.8.6) + activemodel (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) bundler (>= 1.15.0) - railties (= 7.0.8.4) + railties (= 7.0.8.6) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -196,9 +196,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.8.4) - actionpack (= 7.0.8.4) - activesupport (= 7.0.8.4) + railties (7.0.8.6) + actionpack (= 7.0.8.6) + activesupport (= 7.0.8.6) method_source rake (>= 12.2) thor (~> 1.0) @@ -209,21 +209,20 @@ GEM prawn (>= 1.3.0, < 3.0.0) prawn-table (~> 0.2.1) regexp_parser (2.9.2) - rexml (3.3.8) - rubocop (1.65.1) + rexml (3.3.9) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.32.3) parser (>= 3.3.1.0) - rubocop-performance (1.21.1) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) @@ -238,26 +237,26 @@ GEM sqlite3 (1.7.3-arm64-darwin) sqlite3 (1.7.3-x86_64-darwin) sqlite3 (1.7.3-x86_64-linux) - standard (1.40.0) + standard (1.41.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.65.0) + rubocop (~> 1.66.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.4) + standard-performance (~> 1.5) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.4.0) + standard-performance (1.5.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.21.0) + rubocop-performance (~> 1.22.0) stimulus-rails (1.3.4) railties (>= 6.0.0) - stripe (13.0.0) + stripe (13.0.2) thor (1.3.2) timeout (0.4.1) ttfunk (1.8.0) bigdecimal (~> 3.1) - turbo-rails (2.0.10) + turbo-rails (2.0.11) actionpack (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) @@ -278,7 +277,7 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.18) + zeitwerk (2.7.1) PLATFORMS arm64-darwin-21 @@ -318,4 +317,4 @@ DEPENDENCIES webmock BUNDLED WITH - 2.5.17 + 2.5.18 diff --git a/gemfiles/rails_7_1.gemfile.lock b/gemfiles/rails_7_1.gemfile.lock index 9f4bcee2..cfcc3fe3 100644 --- a/gemfiles/rails_7_1.gemfile.lock +++ b/gemfiles/rails_7_1.gemfile.lock @@ -1,8 +1,8 @@ GIT remote: https://github.com/thoughtbot/appraisal.git - revision: 24feeea4c5c1d2e7a5f95d053da61858c6bfb2b1 + revision: 602cdd9b5f8cb8f36992733422f69312b172f427 specs: - appraisal (2.5.0) + appraisal (3.0.0.rc1) bundler rake thor (>= 0.14.0) @@ -10,41 +10,41 @@ GIT PATH remote: .. specs: - pay (8.1.0) + pay (8.1.3) rails (>= 6.0.0) GEM remote: https://rubygems.org/ specs: - actioncable (7.1.4) - actionpack (= 7.1.4) - activesupport (= 7.1.4) + actioncable (7.1.4.2) + actionpack (= 7.1.4.2) + activesupport (= 7.1.4.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.4) - actionpack (= 7.1.4) - activejob (= 7.1.4) - activerecord (= 7.1.4) - activestorage (= 7.1.4) - activesupport (= 7.1.4) + actionmailbox (7.1.4.2) + actionpack (= 7.1.4.2) + activejob (= 7.1.4.2) + activerecord (= 7.1.4.2) + activestorage (= 7.1.4.2) + activesupport (= 7.1.4.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.1.4) - actionpack (= 7.1.4) - actionview (= 7.1.4) - activejob (= 7.1.4) - activesupport (= 7.1.4) + actionmailer (7.1.4.2) + actionpack (= 7.1.4.2) + actionview (= 7.1.4.2) + activejob (= 7.1.4.2) + activesupport (= 7.1.4.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.2) - actionpack (7.1.4) - actionview (= 7.1.4) - activesupport (= 7.1.4) + actionpack (7.1.4.2) + actionview (= 7.1.4.2) + activesupport (= 7.1.4.2) nokogiri (>= 1.8.5) racc rack (>= 2.2.4) @@ -52,35 +52,35 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.4) - actionpack (= 7.1.4) - activerecord (= 7.1.4) - activestorage (= 7.1.4) - activesupport (= 7.1.4) + actiontext (7.1.4.2) + actionpack (= 7.1.4.2) + activerecord (= 7.1.4.2) + activestorage (= 7.1.4.2) + activesupport (= 7.1.4.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.4) - activesupport (= 7.1.4) + actionview (7.1.4.2) + activesupport (= 7.1.4.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.4) - activesupport (= 7.1.4) + activejob (7.1.4.2) + activesupport (= 7.1.4.2) globalid (>= 0.3.6) - activemodel (7.1.4) - activesupport (= 7.1.4) - activerecord (7.1.4) - activemodel (= 7.1.4) - activesupport (= 7.1.4) + activemodel (7.1.4.2) + activesupport (= 7.1.4.2) + activerecord (7.1.4.2) + activemodel (= 7.1.4.2) + activesupport (= 7.1.4.2) timeout (>= 0.4.0) - activestorage (7.1.4) - actionpack (= 7.1.4) - activejob (= 7.1.4) - activerecord (= 7.1.4) - activesupport (= 7.1.4) + activestorage (7.1.4.2) + actionpack (= 7.1.4.2) + activejob (= 7.1.4.2) + activerecord (= 7.1.4.2) + activesupport (= 7.1.4.2) marcel (~> 1.0) - activesupport (7.1.4) + activesupport (7.1.4.2) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -119,7 +119,7 @@ GEM hashdiff (1.1.1) i18n (1.14.6) concurrent-ruby (~> 1.0) - importmap-rails (2.0.1) + importmap-rails (2.0.3) actionpack (>= 6.0.0) activesupport (>= 6.0.0) railties (>= 6.0.0) @@ -127,13 +127,13 @@ GEM irb (1.14.1) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.2) + json (2.7.4) language_server-protocol (3.17.0.3) lemonsqueezy (1.0.1) faraday (~> 2.0) lint_roller (1.1.0) logger (1.6.1) - loofah (2.22.0) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -145,13 +145,13 @@ GEM matrix (0.4.2) mini_mime (1.1.5) minitest (5.25.1) - mocha (2.4.5) + mocha (2.5.0) ruby2_keywords (>= 0.0.5) mutex_m (0.2.0) mysql2 (0.5.6) net-http (0.4.1) uri - net-imap (0.4.16) + net-imap (0.5.0) date net-protocol net-pop (0.1.2) @@ -160,7 +160,7 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.3) + nio4r (2.7.4) nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) nokogiri (1.16.7-x86_64-darwin) @@ -176,7 +176,7 @@ GEM ast (~> 2.4.1) racc pdf-core (0.10.0) - pg (1.5.8) + pg (1.5.9) prawn (2.5.0) matrix (~> 0.4) pdf-core (~> 0.10.0) @@ -189,7 +189,7 @@ GEM puma (6.4.3) nio4r (~> 2.0) racc (1.8.1) - rack (3.1.7) + rack (3.1.8) rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) @@ -197,20 +197,20 @@ GEM rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rails (7.1.4) - actioncable (= 7.1.4) - actionmailbox (= 7.1.4) - actionmailer (= 7.1.4) - actionpack (= 7.1.4) - actiontext (= 7.1.4) - actionview (= 7.1.4) - activejob (= 7.1.4) - activemodel (= 7.1.4) - activerecord (= 7.1.4) - activestorage (= 7.1.4) - activesupport (= 7.1.4) + rails (7.1.4.2) + actioncable (= 7.1.4.2) + actionmailbox (= 7.1.4.2) + actionmailer (= 7.1.4.2) + actionpack (= 7.1.4.2) + actiontext (= 7.1.4.2) + actionview (= 7.1.4.2) + activejob (= 7.1.4.2) + activemodel (= 7.1.4.2) + activerecord (= 7.1.4.2) + activestorage (= 7.1.4.2) + activesupport (= 7.1.4.2) bundler (>= 1.15.0) - railties (= 7.1.4) + railties (= 7.1.4.2) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -218,9 +218,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.1.4) - actionpack (= 7.1.4) - activesupport (= 7.1.4) + railties (7.1.4.2) + actionpack (= 7.1.4.2) + activesupport (= 7.1.4.2) irb rackup (>= 1.0.0) rake (>= 12.2) @@ -236,21 +236,20 @@ GEM regexp_parser (2.9.2) reline (0.5.10) io-console (~> 0.5) - rexml (3.3.8) - rubocop (1.65.1) + rexml (3.3.9) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.32.3) parser (>= 3.3.1.0) - rubocop-performance (1.21.1) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) @@ -265,27 +264,27 @@ GEM sqlite3 (1.7.3-arm64-darwin) sqlite3 (1.7.3-x86_64-darwin) sqlite3 (1.7.3-x86_64-linux) - standard (1.40.0) + standard (1.41.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.65.0) + rubocop (~> 1.66.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.4) + standard-performance (~> 1.5) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.4.0) + standard-performance (1.5.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.21.0) + rubocop-performance (~> 1.22.0) stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.1.1) - stripe (13.0.0) + stripe (13.0.2) thor (1.3.2) timeout (0.4.1) ttfunk (1.8.0) bigdecimal (~> 3.1) - turbo-rails (2.0.10) + turbo-rails (2.0.11) actionpack (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) @@ -307,7 +306,7 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.18) + zeitwerk (2.7.1) PLATFORMS arm64-darwin-22 @@ -344,4 +343,4 @@ DEPENDENCIES webmock BUNDLED WITH - 2.5.17 + 2.5.18 diff --git a/gemfiles/rails_7_2.gemfile.lock b/gemfiles/rails_7_2.gemfile.lock index c0c91a0e..2a8c7df8 100644 --- a/gemfiles/rails_7_2.gemfile.lock +++ b/gemfiles/rails_7_2.gemfile.lock @@ -1,8 +1,8 @@ GIT remote: https://github.com/thoughtbot/appraisal.git - revision: 24feeea4c5c1d2e7a5f95d053da61858c6bfb2b1 + revision: 602cdd9b5f8cb8f36992733422f69312b172f427 specs: - appraisal (2.5.0) + appraisal (3.0.0.rc1) bundler rake thor (>= 0.14.0) @@ -10,35 +10,35 @@ GIT PATH remote: .. specs: - pay (8.1.0) + pay (8.1.3) rails (>= 6.0.0) GEM remote: https://rubygems.org/ specs: - actioncable (7.2.1) - actionpack (= 7.2.1) - activesupport (= 7.2.1) + actioncable (7.2.1.2) + actionpack (= 7.2.1.2) + activesupport (= 7.2.1.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.1) - actionpack (= 7.2.1) - activejob (= 7.2.1) - activerecord (= 7.2.1) - activestorage (= 7.2.1) - activesupport (= 7.2.1) + actionmailbox (7.2.1.2) + actionpack (= 7.2.1.2) + activejob (= 7.2.1.2) + activerecord (= 7.2.1.2) + activestorage (= 7.2.1.2) + activesupport (= 7.2.1.2) mail (>= 2.8.0) - actionmailer (7.2.1) - actionpack (= 7.2.1) - actionview (= 7.2.1) - activejob (= 7.2.1) - activesupport (= 7.2.1) + actionmailer (7.2.1.2) + actionpack (= 7.2.1.2) + actionview (= 7.2.1.2) + activejob (= 7.2.1.2) + activesupport (= 7.2.1.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.1) - actionview (= 7.2.1) - activesupport (= 7.2.1) + actionpack (7.2.1.2) + actionview (= 7.2.1.2) + activesupport (= 7.2.1.2) nokogiri (>= 1.8.5) racc rack (>= 2.2.4, < 3.2) @@ -47,35 +47,35 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.1) - actionpack (= 7.2.1) - activerecord (= 7.2.1) - activestorage (= 7.2.1) - activesupport (= 7.2.1) + actiontext (7.2.1.2) + actionpack (= 7.2.1.2) + activerecord (= 7.2.1.2) + activestorage (= 7.2.1.2) + activesupport (= 7.2.1.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.1) - activesupport (= 7.2.1) + actionview (7.2.1.2) + activesupport (= 7.2.1.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.2.1) - activesupport (= 7.2.1) + activejob (7.2.1.2) + activesupport (= 7.2.1.2) globalid (>= 0.3.6) - activemodel (7.2.1) - activesupport (= 7.2.1) - activerecord (7.2.1) - activemodel (= 7.2.1) - activesupport (= 7.2.1) + activemodel (7.2.1.2) + activesupport (= 7.2.1.2) + activerecord (7.2.1.2) + activemodel (= 7.2.1.2) + activesupport (= 7.2.1.2) timeout (>= 0.4.0) - activestorage (7.2.1) - actionpack (= 7.2.1) - activejob (= 7.2.1) - activerecord (= 7.2.1) - activesupport (= 7.2.1) + activestorage (7.2.1.2) + actionpack (= 7.2.1.2) + activejob (= 7.2.1.2) + activerecord (= 7.2.1.2) + activesupport (= 7.2.1.2) marcel (~> 1.0) - activesupport (7.2.1) + activesupport (7.2.1.2) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) @@ -115,7 +115,7 @@ GEM hashdiff (1.1.1) i18n (1.14.6) concurrent-ruby (~> 1.0) - importmap-rails (2.0.1) + importmap-rails (2.0.3) actionpack (>= 6.0.0) activesupport (>= 6.0.0) railties (>= 6.0.0) @@ -123,13 +123,13 @@ GEM irb (1.14.1) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.2) + json (2.7.4) language_server-protocol (3.17.0.3) lemonsqueezy (1.0.1) faraday (~> 2.0) lint_roller (1.1.0) logger (1.6.1) - loofah (2.22.0) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -141,12 +141,12 @@ GEM matrix (0.4.2) mini_mime (1.1.5) minitest (5.25.1) - mocha (2.4.5) + mocha (2.5.0) ruby2_keywords (>= 0.0.5) mysql2 (0.5.6) net-http (0.4.1) uri - net-imap (0.4.16) + net-imap (0.5.0) date net-protocol net-pop (0.1.2) @@ -155,7 +155,7 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.3) + nio4r (2.7.4) nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) nokogiri (1.16.7-x86_64-darwin) @@ -171,7 +171,7 @@ GEM ast (~> 2.4.1) racc pdf-core (0.10.0) - pg (1.5.8) + pg (1.5.9) prawn (2.5.0) matrix (~> 0.4) pdf-core (~> 0.10.0) @@ -184,7 +184,7 @@ GEM puma (6.4.3) nio4r (~> 2.0) racc (1.8.1) - rack (3.1.7) + rack (3.1.8) rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) @@ -192,20 +192,20 @@ GEM rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rails (7.2.1) - actioncable (= 7.2.1) - actionmailbox (= 7.2.1) - actionmailer (= 7.2.1) - actionpack (= 7.2.1) - actiontext (= 7.2.1) - actionview (= 7.2.1) - activejob (= 7.2.1) - activemodel (= 7.2.1) - activerecord (= 7.2.1) - activestorage (= 7.2.1) - activesupport (= 7.2.1) + rails (7.2.1.2) + actioncable (= 7.2.1.2) + actionmailbox (= 7.2.1.2) + actionmailer (= 7.2.1.2) + actionpack (= 7.2.1.2) + actiontext (= 7.2.1.2) + actionview (= 7.2.1.2) + activejob (= 7.2.1.2) + activemodel (= 7.2.1.2) + activerecord (= 7.2.1.2) + activestorage (= 7.2.1.2) + activesupport (= 7.2.1.2) bundler (>= 1.15.0) - railties (= 7.2.1) + railties (= 7.2.1.2) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -213,9 +213,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.2.1) - actionpack (= 7.2.1) - activesupport (= 7.2.1) + railties (7.2.1.2) + actionpack (= 7.2.1.2) + activesupport (= 7.2.1.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -231,21 +231,20 @@ GEM regexp_parser (2.9.2) reline (0.5.10) io-console (~> 0.5) - rexml (3.3.8) - rubocop (1.65.1) + rexml (3.3.9) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.32.3) parser (>= 3.3.1.0) - rubocop-performance (1.21.1) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) @@ -258,30 +257,30 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - sqlite3 (2.1.0-arm64-darwin) - sqlite3 (2.1.0-x86_64-darwin) - sqlite3 (2.1.0-x86_64-linux-gnu) - standard (1.40.0) + sqlite3 (2.1.1-arm64-darwin) + sqlite3 (2.1.1-x86_64-darwin) + sqlite3 (2.1.1-x86_64-linux-gnu) + standard (1.41.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.65.0) + rubocop (~> 1.66.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.4) + standard-performance (~> 1.5) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.4.0) + standard-performance (1.5.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.21.0) + rubocop-performance (~> 1.22.0) stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.1.1) - stripe (13.0.0) + stripe (13.0.2) thor (1.3.2) timeout (0.4.1) ttfunk (1.8.0) bigdecimal (~> 3.1) - turbo-rails (2.0.10) + turbo-rails (2.0.11) actionpack (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) @@ -304,7 +303,7 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.18) + zeitwerk (2.7.1) PLATFORMS arm64-darwin-21 @@ -344,4 +343,4 @@ DEPENDENCIES webmock BUNDLED WITH - 2.5.17 + 2.5.18 diff --git a/gemfiles/rails_main.gemfile.lock b/gemfiles/rails_main.gemfile.lock index e515d931..76b097f5 100644 --- a/gemfiles/rails_main.gemfile.lock +++ b/gemfiles/rails_main.gemfile.lock @@ -1,31 +1,31 @@ GIT remote: https://github.com/rails/rails.git - revision: 9e49ab24edb8e79503329a44974bbb9d8e047917 + revision: 8c80b02a66fb6f2cf6940027d756bf7d94d6cf53 branch: main specs: - actioncable (8.0.0.beta1) - actionpack (= 8.0.0.beta1) - activesupport (= 8.0.0.beta1) + actioncable (8.1.0.alpha) + actionpack (= 8.1.0.alpha) + activesupport (= 8.1.0.alpha) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.0.0.beta1) - actionpack (= 8.0.0.beta1) - activejob (= 8.0.0.beta1) - activerecord (= 8.0.0.beta1) - activestorage (= 8.0.0.beta1) - activesupport (= 8.0.0.beta1) + actionmailbox (8.1.0.alpha) + actionpack (= 8.1.0.alpha) + activejob (= 8.1.0.alpha) + activerecord (= 8.1.0.alpha) + activestorage (= 8.1.0.alpha) + activesupport (= 8.1.0.alpha) mail (>= 2.8.0) - actionmailer (8.0.0.beta1) - actionpack (= 8.0.0.beta1) - actionview (= 8.0.0.beta1) - activejob (= 8.0.0.beta1) - activesupport (= 8.0.0.beta1) + actionmailer (8.1.0.alpha) + actionpack (= 8.1.0.alpha) + actionview (= 8.1.0.alpha) + activejob (= 8.1.0.alpha) + activesupport (= 8.1.0.alpha) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.0.0.beta1) - actionview (= 8.0.0.beta1) - activesupport (= 8.0.0.beta1) + actionpack (8.1.0.alpha) + actionview (= 8.1.0.alpha) + activesupport (= 8.1.0.alpha) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -33,35 +33,35 @@ GIT rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.0.0.beta1) - actionpack (= 8.0.0.beta1) - activerecord (= 8.0.0.beta1) - activestorage (= 8.0.0.beta1) - activesupport (= 8.0.0.beta1) + actiontext (8.1.0.alpha) + actionpack (= 8.1.0.alpha) + activerecord (= 8.1.0.alpha) + activestorage (= 8.1.0.alpha) + activesupport (= 8.1.0.alpha) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.0.0.beta1) - activesupport (= 8.0.0.beta1) + actionview (8.1.0.alpha) + activesupport (= 8.1.0.alpha) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (8.0.0.beta1) - activesupport (= 8.0.0.beta1) + activejob (8.1.0.alpha) + activesupport (= 8.1.0.alpha) globalid (>= 0.3.6) - activemodel (8.0.0.beta1) - activesupport (= 8.0.0.beta1) - activerecord (8.0.0.beta1) - activemodel (= 8.0.0.beta1) - activesupport (= 8.0.0.beta1) + activemodel (8.1.0.alpha) + activesupport (= 8.1.0.alpha) + activerecord (8.1.0.alpha) + activemodel (= 8.1.0.alpha) + activesupport (= 8.1.0.alpha) timeout (>= 0.4.0) - activestorage (8.0.0.beta1) - actionpack (= 8.0.0.beta1) - activejob (= 8.0.0.beta1) - activerecord (= 8.0.0.beta1) - activesupport (= 8.0.0.beta1) + activestorage (8.1.0.alpha) + actionpack (= 8.1.0.alpha) + activejob (= 8.1.0.alpha) + activerecord (= 8.1.0.alpha) + activesupport (= 8.1.0.alpha) marcel (~> 1.0) - activesupport (8.0.0.beta1) + activesupport (8.1.0.alpha) base64 benchmark (>= 0.3) bigdecimal @@ -74,23 +74,23 @@ GIT securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) - rails (8.0.0.beta1) - actioncable (= 8.0.0.beta1) - actionmailbox (= 8.0.0.beta1) - actionmailer (= 8.0.0.beta1) - actionpack (= 8.0.0.beta1) - actiontext (= 8.0.0.beta1) - actionview (= 8.0.0.beta1) - activejob (= 8.0.0.beta1) - activemodel (= 8.0.0.beta1) - activerecord (= 8.0.0.beta1) - activestorage (= 8.0.0.beta1) - activesupport (= 8.0.0.beta1) + rails (8.1.0.alpha) + actioncable (= 8.1.0.alpha) + actionmailbox (= 8.1.0.alpha) + actionmailer (= 8.1.0.alpha) + actionpack (= 8.1.0.alpha) + actiontext (= 8.1.0.alpha) + actionview (= 8.1.0.alpha) + activejob (= 8.1.0.alpha) + activemodel (= 8.1.0.alpha) + activerecord (= 8.1.0.alpha) + activestorage (= 8.1.0.alpha) + activesupport (= 8.1.0.alpha) bundler (>= 1.15.0) - railties (= 8.0.0.beta1) - railties (8.0.0.beta1) - actionpack (= 8.0.0.beta1) - activesupport (= 8.0.0.beta1) + railties (= 8.1.0.alpha) + railties (8.1.0.alpha) + actionpack (= 8.1.0.alpha) + activesupport (= 8.1.0.alpha) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -99,9 +99,9 @@ GIT GIT remote: https://github.com/thoughtbot/appraisal.git - revision: 24feeea4c5c1d2e7a5f95d053da61858c6bfb2b1 + revision: 602cdd9b5f8cb8f36992733422f69312b172f427 specs: - appraisal (2.5.0) + appraisal (3.0.0.rc1) bundler rake thor (>= 0.14.0) @@ -109,7 +109,7 @@ GIT PATH remote: .. specs: - pay (8.1.0) + pay (8.1.3) rails (>= 6.0.0) GEM @@ -145,7 +145,7 @@ GEM hashdiff (1.1.1) i18n (1.14.6) concurrent-ruby (~> 1.0) - importmap-rails (2.0.1) + importmap-rails (2.0.3) actionpack (>= 6.0.0) activesupport (>= 6.0.0) railties (>= 6.0.0) @@ -153,13 +153,13 @@ GEM irb (1.14.1) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.2) + json (2.7.4) language_server-protocol (3.17.0.3) lemonsqueezy (1.0.1) faraday (~> 2.0) lint_roller (1.1.0) logger (1.6.1) - loofah (2.22.0) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -171,12 +171,12 @@ GEM matrix (0.4.2) mini_mime (1.1.5) minitest (5.25.1) - mocha (2.4.5) + mocha (2.5.0) ruby2_keywords (>= 0.0.5) mysql2 (0.5.6) net-http (0.4.1) uri - net-imap (0.4.16) + net-imap (0.5.0) date net-protocol net-pop (0.1.2) @@ -185,7 +185,7 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.3) + nio4r (2.7.4) nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) nokogiri (1.16.7-x86_64-darwin) @@ -201,7 +201,7 @@ GEM ast (~> 2.4.1) racc pdf-core (0.10.0) - pg (1.5.8) + pg (1.5.9) prawn (2.5.0) matrix (~> 0.4) pdf-core (~> 0.10.0) @@ -214,7 +214,7 @@ GEM puma (6.4.3) nio4r (~> 2.0) racc (1.8.1) - rack (3.1.7) + rack (3.1.8) rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) @@ -239,21 +239,20 @@ GEM regexp_parser (2.9.2) reline (0.5.10) io-console (~> 0.5) - rexml (3.3.8) - rubocop (1.65.1) + rexml (3.3.9) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.32.3) parser (>= 3.3.1.0) - rubocop-performance (1.21.1) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) @@ -266,30 +265,30 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - sqlite3 (2.1.0-arm64-darwin) - sqlite3 (2.1.0-x86_64-darwin) - sqlite3 (2.1.0-x86_64-linux-gnu) - standard (1.40.0) + sqlite3 (2.1.1-arm64-darwin) + sqlite3 (2.1.1-x86_64-darwin) + sqlite3 (2.1.1-x86_64-linux-gnu) + standard (1.41.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.65.0) + rubocop (~> 1.66.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.4) + standard-performance (~> 1.5) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.4.0) + standard-performance (1.5.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.21.0) + rubocop-performance (~> 1.22.0) stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.1.1) - stripe (13.0.0) + stripe (13.0.2) thor (1.3.2) timeout (0.4.1) ttfunk (1.8.0) bigdecimal (~> 3.1) - turbo-rails (2.0.10) + turbo-rails (2.0.11) actionpack (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) @@ -312,7 +311,7 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.18) + zeitwerk (2.7.1) PLATFORMS arm64-darwin-21 diff --git a/lib/pay/version.rb b/lib/pay/version.rb index ef5fc7f0..5fc27b6d 100644 --- a/lib/pay/version.rb +++ b/lib/pay/version.rb @@ -1,3 +1,3 @@ module Pay - VERSION = "8.1.0" + VERSION = "8.1.3" end diff --git a/test/pay/stripe/subscription_test.rb b/test/pay/stripe/subscription_test.rb index 87f89897..5cefc99c 100644 --- a/test/pay/stripe/subscription_test.rb +++ b/test/pay/stripe/subscription_test.rb @@ -177,6 +177,15 @@ class Pay::Stripe::SubscriptionTest < ActiveSupport::TestCase end end + test "it will throw an error if subscription cannot be resumed" do + Pay::Stripe::Subscription.sync("123", object: fake_stripe_subscription) + + refute @pay_customer.subscription.resumable? + assert_raises Pay::Error do + @pay_customer.subscription.resume + end + end + test "syncing multiple subscription items" do pay_subscription = Pay::Stripe::Subscription.sync("123", object: fake_stripe_subscription(items: { object: "list",