From 7dac08a0be0dbbd65fc39ca58c1f60c2c4f1a0c0 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Mon, 6 Nov 2023 13:48:12 +0000 Subject: [PATCH 01/12] Sets flag to create folder with Stripe version --- spec/base_spec_helper.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/base_spec_helper.rb b/spec/base_spec_helper.rb index 99aa4cf361..1660f9bb11 100644 --- a/spec/base_spec_helper.rb +++ b/spec/base_spec_helper.rb @@ -131,6 +131,21 @@ RSpec.configure do |config| end end + # Appends Stripe gem version to VCR cassette directory with ':stripe_version' flag + # + # When the Stripe gem is updated, we should re-record these cassettes: + # + # rm spec/fixtures/vcr_cassettes/Stripe-v* -r + # ./bin/rspec --tag stripe_version + config.around(:each, :stripe_version) do |example| + stripe_version = "Stripe-v#{Stripe::VERSION}" + VCR.configure do |vcr_config| + vcr_config.cassette_library_dir = "spec/fixtures/vcr_cassettes/#{stripe_version}" + vcr_config.default_cassette_options = { record: :none } if ENV["CI"] + end + example.run + end + # Geocoding config.before(:each) { allow_any_instance_of(Spree::Address).to receive(:geocode).and_return([1, 1]) From 9d50b11090b538243752c1eb05ddd0467aa40faf Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Mon, 6 Nov 2023 15:55:16 +0000 Subject: [PATCH 02/12] Adds re-recorded Stripe cassettes within Stripe gem folder name --- .../spree/credit_cards_controller_spec.rb | 2 +- .../saves_the_card_locally.yml | 204 ++++++++---------- ...t_intent_last_payment_error_as_message.yml | 114 +++++----- ...s_payment_intent_id_and_does_not_raise.yml | 96 ++++----- .../stripe/payment_intent_validator_spec.rb | 2 +- 5 files changed, 202 insertions(+), 216 deletions(-) rename spec/fixtures/vcr_cassettes/{ => Stripe-v10.0.0}/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml (53%) rename spec/fixtures/vcr_cassettes/{ => Stripe-v10.0.0}/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml (86%) rename spec/fixtures/vcr_cassettes/{ => Stripe-v10.0.0}/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml (83%) diff --git a/spec/controllers/spree/credit_cards_controller_spec.rb b/spec/controllers/spree/credit_cards_controller_spec.rb index ac996fd1a1..e41beb724d 100644 --- a/spec/controllers/spree/credit_cards_controller_spec.rb +++ b/spec/controllers/spree/credit_cards_controller_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Spree::CreditCardsController, type: :controller do - describe "using VCR", :vcr do + describe "using VCR", :vcr, :stripe_version do let(:user) { create(:user) } let(:secret) { ENV.fetch('STRIPE_SECRET_TEST_API_KEY', nil) } diff --git a/spec/fixtures/vcr_cassettes/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml similarity index 53% rename from spec/fixtures/vcr_cassettes/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml rename to spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml index 7e2bba6ffd..47583d6d0e 100644 --- a/spec/fixtures/vcr_cassettes/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml @@ -8,16 +8,18 @@ http_interactions: string: card[number]=4242424242424242&card[exp_month]=9&card[exp_year]=2024&card[cvc]=314 headers: User-Agent: - - Stripe/v1 RubyBindings/7.1.0 + - Stripe/v1 RubyBindings/10.0.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded + Stripe-Version: + - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"7.1.0","lang":"ruby","lang_version":"3.0.3 p157 (2021-11-24)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 5.15.0-48-generic (buildd@lcy02-amd64-080) (gcc (Ubuntu 11.2.0-19ubuntu1) - 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #54-Ubuntu SMP Fri Aug 26 13:26:29 - UTC 2022","hostname":"ff-LAT"}' + - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 + (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) + #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -30,45 +32,54 @@ http_interactions: Server: - nginx Date: - - Tue, 27 Sep 2022 06:15:03 GMT + - Mon, 06 Nov 2023 15:52:10 GMT Content-Type: - application/json Content-Length: - - '781' + - '800' Connection: - keep-alive Access-Control-Allow-Credentials: - 'true' Access-Control-Allow-Methods: - - GET, POST, HEAD, OPTIONS, DELETE + - GET,HEAD,PUT,PATCH,POST,DELETE Access-Control-Allow-Origin: - "*" Access-Control-Expose-Headers: - - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required Access-Control-Max-Age: - '300' Cache-Control: - no-cache, no-store + Content-Security-Policy-Report-Only: + - report-uri https://q.stripe.com/csp-report?p=v1%2Ftokens; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 8a2c6373-a053-4674-8f35-5e5b8d9cf8fb + - 4b36e5b1-ee94-4ecc-8283-cfa0d9c96480 Original-Request: - - req_4XXW0nwQlmbWiH + - req_cDbJqfdlYZdbyU Request-Id: - - req_4XXW0nwQlmbWiH + - req_cDbJqfdlYZdbyU Stripe-Should-Retry: - 'false' Stripe-Version: - - '2019-11-05' + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode Strict-Transport-Security: - max-age=63072000; includeSubDomains; preload body: encoding: UTF-8 string: |- { - "id": "tok_1LmX4NKuuB1fWySnNTd7lIuK", + "id": "tok_1O9V5yKuuB1fWySnSeAtjOj4", "object": "token", "card": { - "id": "card_1LmX4MKuuB1fWySn6nKumo1M", + "id": "card_1O9V5yKuuB1fWySnWYC2TQys", "object": "card", "address_city": null, "address_country": null, @@ -89,35 +100,38 @@ http_interactions: "last4": "4242", "metadata": {}, "name": null, - "tokenization_method": null + "tokenization_method": null, + "wallet": null }, - "client_ip": "188.251.215.147", - "created": 1664259303, + "client_ip": "89.153.187.247", + "created": 1699285930, "livemode": false, "type": "card", "used": false } - recorded_at: Tue, 27 Sep 2022 06:15:03 GMT + recorded_at: Mon, 06 Nov 2023 15:52:10 GMT - request: method: post uri: https://api.stripe.com/v1/customers body: encoding: UTF-8 - string: email=emerita_stroman%40gusikowski.ca&source=tok_1LmX4NKuuB1fWySnNTd7lIuK + string: email=maranda_kertzmann%40ferrystark.com&source=tok_1O9V5yKuuB1fWySnSeAtjOj4 headers: User-Agent: - - Stripe/v1 RubyBindings/7.1.0 + - Stripe/v1 RubyBindings/10.0.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_4XXW0nwQlmbWiH","request_duration_ms":725}}' + - '{"last_request_metrics":{"request_id":"req_cDbJqfdlYZdbyU","request_duration_ms":771}}' + Stripe-Version: + - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"7.1.0","lang":"ruby","lang_version":"3.0.3 p157 (2021-11-24)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 5.15.0-48-generic (buildd@lcy02-amd64-080) (gcc (Ubuntu 11.2.0-19ubuntu1) - 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #54-Ubuntu SMP Fri Aug 26 13:26:29 - UTC 2022","hostname":"ff-LAT"}' + - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 + (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) + #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -130,54 +144,62 @@ http_interactions: Server: - nginx Date: - - Tue, 27 Sep 2022 06:15:04 GMT + - Mon, 06 Nov 2023 15:52:11 GMT Content-Type: - application/json Content-Length: - - '1964' + - '671' Connection: - keep-alive Access-Control-Allow-Credentials: - 'true' Access-Control-Allow-Methods: - - GET, POST, HEAD, OPTIONS, DELETE + - GET,HEAD,PUT,PATCH,POST,DELETE Access-Control-Allow-Origin: - "*" Access-Control-Expose-Headers: - - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required Access-Control-Max-Age: - '300' Cache-Control: - no-cache, no-store + Content-Security-Policy-Report-Only: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fcustomers; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - a9c15df5-51a9-4aa3-9a98-89346ac4220f + - e0ba0c07-8278-4f20-9740-7c0a1ec6f77f Original-Request: - - req_Bv2J8ejL6FSWwT + - req_PRTmtmWClmWQgz Request-Id: - - req_Bv2J8ejL6FSWwT + - req_PRTmtmWClmWQgz Stripe-Should-Retry: - 'false' Stripe-Version: - - '2019-11-05' + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode Strict-Transport-Security: - max-age=63072000; includeSubDomains; preload body: encoding: UTF-8 string: |- { - "id": "cus_MVYAeGp44F6wS3", + "id": "cus_OxPvaW3mvLovLW", "object": "customer", "address": null, "balance": 0, - "created": 1664259304, + "created": 1699285931, "currency": null, - "default_currency": null, - "default_source": "card_1LmX4MKuuB1fWySn6nKumo1M", + "default_source": "card_1O9V5yKuuB1fWySnWYC2TQys", "delinquent": false, "description": null, "discount": null, - "email": "emerita_stroman@gusikowski.ca", - "invoice_prefix": "D81408D1", + "email": "maranda_kertzmann@ferrystark.com", + "invoice_prefix": "4AF66002", "invoice_settings": { "custom_fields": null, "default_payment_method": null, @@ -191,79 +213,32 @@ http_interactions: "phone": null, "preferred_locales": [], "shipping": null, - "sources": { - "object": "list", - "data": [ - { - "id": "card_1LmX4MKuuB1fWySn6nKumo1M", - "object": "card", - "address_city": null, - "address_country": null, - "address_line1": null, - "address_line1_check": null, - "address_line2": null, - "address_state": null, - "address_zip": null, - "address_zip_check": null, - "brand": "Visa", - "country": "US", - "customer": "cus_MVYAeGp44F6wS3", - "cvc_check": "pass", - "dynamic_last4": null, - "exp_month": 9, - "exp_year": 2024, - "fingerprint": "6E6tgVjx6U65iHFV", - "funding": "credit", - "last4": "4242", - "metadata": {}, - "name": null, - "tokenization_method": null - } - ], - "has_more": false, - "total_count": 1, - "url": "/v1/customers/cus_MVYAeGp44F6wS3/sources" - }, - "subscriptions": { - "object": "list", - "data": [], - "has_more": false, - "total_count": 0, - "url": "/v1/customers/cus_MVYAeGp44F6wS3/subscriptions" - }, "tax_exempt": "none", - "tax_ids": { - "object": "list", - "data": [], - "has_more": false, - "total_count": 0, - "url": "/v1/customers/cus_MVYAeGp44F6wS3/tax_ids" - }, - "tax_info": null, - "tax_info_verification": null, "test_clock": null } - recorded_at: Tue, 27 Sep 2022 06:15:04 GMT + recorded_at: Mon, 06 Nov 2023 15:52:12 GMT - request: method: get - uri: https://api.stripe.com/v1/customers/cus_MVYAeGp44F6wS3/sources?limit=1&object=card + uri: https://api.stripe.com/v1/customers/cus_OxPvaW3mvLovLW/sources?limit=1&object=card body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/7.1.0 + - Stripe/v1 RubyBindings/10.0.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_Bv2J8ejL6FSWwT","request_duration_ms":1037}}' + - '{"last_request_metrics":{"request_id":"req_PRTmtmWClmWQgz","request_duration_ms":1057}}' + Stripe-Version: + - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"7.1.0","lang":"ruby","lang_version":"3.0.3 p157 (2021-11-24)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 5.15.0-48-generic (buildd@lcy02-amd64-080) (gcc (Ubuntu 11.2.0-19ubuntu1) - 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #54-Ubuntu SMP Fri Aug 26 13:26:29 - UTC 2022","hostname":"ff-LAT"}' + - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 + (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) + #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -276,29 +251,39 @@ http_interactions: Server: - nginx Date: - - Tue, 27 Sep 2022 06:15:05 GMT + - Mon, 06 Nov 2023 15:52:12 GMT Content-Type: - application/json Content-Length: - - '790' + - '812' Connection: - keep-alive Access-Control-Allow-Credentials: - 'true' Access-Control-Allow-Methods: - - GET, POST, HEAD, OPTIONS, DELETE + - GET,HEAD,PUT,PATCH,POST,DELETE Access-Control-Allow-Origin: - "*" Access-Control-Expose-Headers: - - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required Access-Control-Max-Age: - '300' Cache-Control: - no-cache, no-store + Content-Security-Policy-Report-Only: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fcustomers%2F%3Acustomer%2Fsources; + block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action + 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; + style-src 'self' Request-Id: - - req_4NyryTpY3ov7vf + - req_6VTyanKbPfjW7u Stripe-Version: - - '2019-11-05' + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode Strict-Transport-Security: - max-age=63072000; includeSubDomains; preload body: @@ -308,7 +293,7 @@ http_interactions: "object": "list", "data": [ { - "id": "card_1LmX4MKuuB1fWySn6nKumo1M", + "id": "card_1O9V5yKuuB1fWySnWYC2TQys", "object": "card", "address_city": null, "address_country": null, @@ -320,7 +305,7 @@ http_interactions: "address_zip_check": null, "brand": "Visa", "country": "US", - "customer": "cus_MVYAeGp44F6wS3", + "customer": "cus_OxPvaW3mvLovLW", "cvc_check": "pass", "dynamic_last4": null, "exp_month": 9, @@ -330,11 +315,12 @@ http_interactions: "last4": "4242", "metadata": {}, "name": null, - "tokenization_method": null + "tokenization_method": null, + "wallet": null } ], "has_more": false, - "url": "/v1/customers/cus_MVYAeGp44F6wS3/sources" + "url": "/v1/customers/cus_OxPvaW3mvLovLW/sources" } - recorded_at: Tue, 27 Sep 2022 06:15:05 GMT -recorded_with: VCR 6.1.0 + recorded_at: Mon, 06 Nov 2023 15:52:12 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml similarity index 86% rename from spec/fixtures/vcr_cassettes/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml rename to spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml index 8b436f5f9d..fc6fc8872a 100644 --- a/spec/fixtures/vcr_cassettes/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml @@ -14,14 +14,14 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_MhJwK3bCx1nUCV","request_duration_ms":399}}' + - '{"last_request_metrics":{"request_id":"req_qjDkQl3stKfe1m","request_duration_ms":292}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-35-generic (buildd@bos03-amd64-016) (x86_64-linux-gnu-gcc-11 + version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2","hostname":"ff-LAT"}' + #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -34,7 +34,7 @@ http_interactions: Server: - nginx Date: - - Tue, 31 Oct 2023 19:02:51 GMT + - Mon, 06 Nov 2023 15:51:25 GMT Content-Type: - application/json Content-Length: @@ -59,11 +59,11 @@ http_interactions: default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - cae4cabe-d698-4d9a-a559-c7adee3b5919 + - 4fbac071-d4cb-477e-8790-e8ae12bc5941 Original-Request: - - req_4u0uONl4HDoqTP + - req_xooNPVYZPZwVf7 Request-Id: - - req_4u0uONl4HDoqTP + - req_xooNPVYZPZwVf7 Stripe-Should-Retry: - 'false' Stripe-Version: @@ -78,7 +78,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pm_1O7NDDKuuB1fWySnK7zLU5xt", + "id": "pm_1O9V5FKuuB1fWySnjblXM6DN", "object": "payment_method", "billing_details": { "address": { @@ -118,19 +118,19 @@ http_interactions: }, "wallet": null }, - "created": 1698778971, + "created": 1699285885, "customer": null, "livemode": false, "metadata": {}, "type": "card" } - recorded_at: Tue, 31 Oct 2023 19:02:51 GMT + recorded_at: Mon, 06 Nov 2023 15:51:25 GMT - request: method: post uri: https://api.stripe.com/v1/payment_intents body: encoding: UTF-8 - string: amount=100¤cy=eur&payment_method=pm_1O7NDDKuuB1fWySnK7zLU5xt&payment_method_types[0]=card&capture_method=manual + string: amount=100¤cy=eur&payment_method=pm_1O9V5FKuuB1fWySnjblXM6DN&payment_method_types[0]=card&capture_method=manual headers: User-Agent: - Stripe/v1 RubyBindings/10.0.0 @@ -139,14 +139,14 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_4u0uONl4HDoqTP","request_duration_ms":467}}' + - '{"last_request_metrics":{"request_id":"req_xooNPVYZPZwVf7","request_duration_ms":502}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-35-generic (buildd@bos03-amd64-016) (x86_64-linux-gnu-gcc-11 + version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2","hostname":"ff-LAT"}' + #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -159,7 +159,7 @@ http_interactions: Server: - nginx Date: - - Tue, 31 Oct 2023 19:02:52 GMT + - Mon, 06 Nov 2023 15:51:25 GMT Content-Type: - application/json Content-Length: @@ -184,11 +184,11 @@ http_interactions: default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 2aa0ddf3-7314-4037-b01b-94d35ccd0468 + - d22ed50d-b847-4eae-9010-9e1e4b76a457 Original-Request: - - req_Tce1DG0Fz2T18d + - req_QqdIxo9PkjL14D Request-Id: - - req_Tce1DG0Fz2T18d + - req_QqdIxo9PkjL14D Stripe-Should-Retry: - 'false' Stripe-Version: @@ -203,7 +203,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3O7NDDKuuB1fWySn0NkcMDXT", + "id": "pi_3O9V5FKuuB1fWySn1NAfVNB3", "object": "payment_intent", "amount": 100, "amount_capturable": 0, @@ -217,9 +217,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O7NDDKuuB1fWySn0NkcMDXT_secret_x4X665Kf2HS7eo6jcMjtLrmcO", + "client_secret": "pi_3O9V5FKuuB1fWySn1NAfVNB3_secret_Qbz82VCpcuteYBKnfadQzGJAJ", "confirmation_method": "automatic", - "created": 1698778971, + "created": 1699285885, "currency": "eur", "customer": null, "description": null, @@ -230,7 +230,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1O7NDDKuuB1fWySnK7zLU5xt", + "payment_method": "pm_1O9V5FKuuB1fWySnjblXM6DN", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -255,10 +255,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Tue, 31 Oct 2023 19:02:52 GMT + recorded_at: Mon, 06 Nov 2023 15:51:25 GMT - request: method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3O7NDDKuuB1fWySn0NkcMDXT/confirm + uri: https://api.stripe.com/v1/payment_intents/pi_3O9V5FKuuB1fWySn1NAfVNB3/confirm body: encoding: US-ASCII string: '' @@ -270,14 +270,14 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_Tce1DG0Fz2T18d","request_duration_ms":403}}' + - '{"last_request_metrics":{"request_id":"req_QqdIxo9PkjL14D","request_duration_ms":406}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-35-generic (buildd@bos03-amd64-016) (x86_64-linux-gnu-gcc-11 + version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2","hostname":"ff-LAT"}' + #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -290,7 +290,7 @@ http_interactions: Server: - nginx Date: - - Tue, 31 Oct 2023 19:02:53 GMT + - Mon, 06 Nov 2023 15:51:27 GMT Content-Type: - application/json Content-Length: @@ -316,11 +316,11 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 8eef3458-d952-4f5f-be7d-51a1ba26ea4e + - d4f5356f-c489-4071-92a0-14da3a986bdf Original-Request: - - req_4PX7kfhZVXH2V1 + - req_Rp8e8zwOEKyM5j Request-Id: - - req_4PX7kfhZVXH2V1 + - req_Rp8e8zwOEKyM5j Stripe-Should-Retry: - 'false' Stripe-Version: @@ -336,13 +336,13 @@ http_interactions: string: | { "error": { - "charge": "ch_3O7NDDKuuB1fWySn0iydIyVy", + "charge": "ch_3O9V5FKuuB1fWySn1FSkX2IG", "code": "card_declined", "decline_code": "insufficient_funds", "doc_url": "https://stripe.com/docs/error-codes/card-declined", "message": "Your card has insufficient funds.", "payment_intent": { - "id": "pi_3O7NDDKuuB1fWySn0NkcMDXT", + "id": "pi_3O9V5FKuuB1fWySn1NAfVNB3", "object": "payment_intent", "amount": 100, "amount_capturable": 0, @@ -357,21 +357,21 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O7NDDKuuB1fWySn0NkcMDXT_secret_x4X665Kf2HS7eo6jcMjtLrmcO", + "client_secret": "pi_3O9V5FKuuB1fWySn1NAfVNB3_secret_Qbz82VCpcuteYBKnfadQzGJAJ", "confirmation_method": "automatic", - "created": 1698778971, + "created": 1699285885, "currency": "eur", "customer": null, "description": null, "invoice": null, "last_payment_error": { - "charge": "ch_3O7NDDKuuB1fWySn0iydIyVy", + "charge": "ch_3O9V5FKuuB1fWySn1FSkX2IG", "code": "card_declined", "decline_code": "insufficient_funds", "doc_url": "https://stripe.com/docs/error-codes/card-declined", "message": "Your card has insufficient funds.", "payment_method": { - "id": "pm_1O7NDDKuuB1fWySnK7zLU5xt", + "id": "pm_1O9V5FKuuB1fWySnjblXM6DN", "object": "payment_method", "billing_details": { "address": { @@ -411,7 +411,7 @@ http_interactions: }, "wallet": null }, - "created": 1698778971, + "created": 1699285885, "customer": null, "livemode": false, "metadata": { @@ -420,7 +420,7 @@ http_interactions: }, "type": "card_error" }, - "latest_charge": "ch_3O7NDDKuuB1fWySn0iydIyVy", + "latest_charge": "ch_3O9V5FKuuB1fWySn1FSkX2IG", "livemode": false, "metadata": { }, @@ -452,7 +452,7 @@ http_interactions: "transfer_group": null }, "payment_method": { - "id": "pm_1O7NDDKuuB1fWySnK7zLU5xt", + "id": "pm_1O9V5FKuuB1fWySnjblXM6DN", "object": "payment_method", "billing_details": { "address": { @@ -492,21 +492,21 @@ http_interactions: }, "wallet": null }, - "created": 1698778971, + "created": 1699285885, "customer": null, "livemode": false, "metadata": { }, "type": "card" }, - "request_log_url": "https://dashboard.stripe.com/test/logs/req_4PX7kfhZVXH2V1?t=1698778972", + "request_log_url": "https://dashboard.stripe.com/test/logs/req_Rp8e8zwOEKyM5j?t=1699285886", "type": "card_error" } } - recorded_at: Tue, 31 Oct 2023 19:02:53 GMT + recorded_at: Mon, 06 Nov 2023 15:51:27 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3O7NDDKuuB1fWySn0NkcMDXT + uri: https://api.stripe.com/v1/payment_intents/pi_3O9V5FKuuB1fWySn1NAfVNB3 body: encoding: US-ASCII string: '' @@ -518,14 +518,14 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_Tce1DG0Fz2T18d","request_duration_ms":403}}' + - '{"last_request_metrics":{"request_id":"req_QqdIxo9PkjL14D","request_duration_ms":406}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-35-generic (buildd@bos03-amd64-016) (x86_64-linux-gnu-gcc-11 + version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2","hostname":"ff-LAT"}' + #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -538,7 +538,7 @@ http_interactions: Server: - nginx Date: - - Tue, 31 Oct 2023 19:02:53 GMT + - Mon, 06 Nov 2023 15:51:27 GMT Content-Type: - application/json Content-Length: @@ -564,7 +564,7 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_rC5iv8iHUH5Bx9 + - req_HAvin8KTnmcqUX Stripe-Version: - '2023-10-16' Vary: @@ -577,7 +577,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3O7NDDKuuB1fWySn0NkcMDXT", + "id": "pi_3O9V5FKuuB1fWySn1NAfVNB3", "object": "payment_intent", "amount": 100, "amount_capturable": 0, @@ -591,21 +591,21 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O7NDDKuuB1fWySn0NkcMDXT_secret_x4X665Kf2HS7eo6jcMjtLrmcO", + "client_secret": "pi_3O9V5FKuuB1fWySn1NAfVNB3_secret_Qbz82VCpcuteYBKnfadQzGJAJ", "confirmation_method": "automatic", - "created": 1698778971, + "created": 1699285885, "currency": "eur", "customer": null, "description": null, "invoice": null, "last_payment_error": { - "charge": "ch_3O7NDDKuuB1fWySn0iydIyVy", + "charge": "ch_3O9V5FKuuB1fWySn1FSkX2IG", "code": "card_declined", "decline_code": "insufficient_funds", "doc_url": "https://stripe.com/docs/error-codes/card-declined", "message": "Your card has insufficient funds.", "payment_method": { - "id": "pm_1O7NDDKuuB1fWySnK7zLU5xt", + "id": "pm_1O9V5FKuuB1fWySnjblXM6DN", "object": "payment_method", "billing_details": { "address": { @@ -645,7 +645,7 @@ http_interactions: }, "wallet": null }, - "created": 1698778971, + "created": 1699285885, "customer": null, "livemode": false, "metadata": {}, @@ -653,7 +653,7 @@ http_interactions: }, "type": "card_error" }, - "latest_charge": "ch_3O7NDDKuuB1fWySn0iydIyVy", + "latest_charge": "ch_3O9V5FKuuB1fWySn1FSkX2IG", "livemode": false, "metadata": {}, "next_action": null, @@ -683,5 +683,5 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Tue, 31 Oct 2023 19:02:53 GMT + recorded_at: Mon, 06 Nov 2023 15:51:27 GMT recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml similarity index 83% rename from spec/fixtures/vcr_cassettes/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml rename to spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml index 8d565e0a9d..5ed1890197 100644 --- a/spec/fixtures/vcr_cassettes/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml @@ -17,9 +17,9 @@ http_interactions: - '2023-10-16' X-Stripe-Client-User-Agent: - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-35-generic (buildd@bos03-amd64-016) (x86_64-linux-gnu-gcc-11 + version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2","hostname":"ff-LAT"}' + #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -32,7 +32,7 @@ http_interactions: Server: - nginx Date: - - Tue, 31 Oct 2023 19:02:48 GMT + - Mon, 06 Nov 2023 15:51:21 GMT Content-Type: - application/json Content-Length: @@ -57,11 +57,11 @@ http_interactions: default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - fe964a69-e54d-4063-9de0-9279a4687132 + - a2ef4e72-541e-437f-9f85-581df5c29259 Original-Request: - - req_nN1oUfa5UXec44 + - req_lr8vrJIpZhmcYq Request-Id: - - req_nN1oUfa5UXec44 + - req_lr8vrJIpZhmcYq Stripe-Should-Retry: - 'false' Stripe-Version: @@ -76,7 +76,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pm_1O7ND9KuuB1fWySnmyW2YCGo", + "id": "pm_1O9V5BKuuB1fWySnlmhXNmd5", "object": "payment_method", "billing_details": { "address": { @@ -116,19 +116,19 @@ http_interactions: }, "wallet": null }, - "created": 1698778967, + "created": 1699285881, "customer": null, "livemode": false, "metadata": {}, "type": "card" } - recorded_at: Tue, 31 Oct 2023 19:02:48 GMT + recorded_at: Mon, 06 Nov 2023 15:51:21 GMT - request: method: post uri: https://api.stripe.com/v1/payment_intents body: encoding: UTF-8 - string: amount=100¤cy=eur&payment_method=pm_1O7ND9KuuB1fWySnmyW2YCGo&payment_method_types[0]=card&capture_method=manual + string: amount=100¤cy=eur&payment_method=pm_1O9V5BKuuB1fWySnlmhXNmd5&payment_method_types[0]=card&capture_method=manual headers: User-Agent: - Stripe/v1 RubyBindings/10.0.0 @@ -137,14 +137,14 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_nN1oUfa5UXec44","request_duration_ms":789}}' + - '{"last_request_metrics":{"request_id":"req_lr8vrJIpZhmcYq","request_duration_ms":918}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-35-generic (buildd@bos03-amd64-016) (x86_64-linux-gnu-gcc-11 + version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2","hostname":"ff-LAT"}' + #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -157,7 +157,7 @@ http_interactions: Server: - nginx Date: - - Tue, 31 Oct 2023 19:02:48 GMT + - Mon, 06 Nov 2023 15:51:22 GMT Content-Type: - application/json Content-Length: @@ -182,11 +182,11 @@ http_interactions: default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 7d125bdc-3da1-4b3a-bdda-ec7acc82ac75 + - ad226562-10aa-4ced-a3d3-1d4d134d5dc1 Original-Request: - - req_GJrd6HK4e2UZdK + - req_WlxHtA7WtEeg33 Request-Id: - - req_GJrd6HK4e2UZdK + - req_WlxHtA7WtEeg33 Stripe-Should-Retry: - 'false' Stripe-Version: @@ -201,7 +201,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3O7NDAKuuB1fWySn0EzngPdL", + "id": "pi_3O9V5CKuuB1fWySn1hPtURlb", "object": "payment_intent", "amount": 100, "amount_capturable": 0, @@ -215,9 +215,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O7NDAKuuB1fWySn0EzngPdL_secret_nvyKe0sDpd5nsmKu485lNtGl3", + "client_secret": "pi_3O9V5CKuuB1fWySn1hPtURlb_secret_6uBS8k5q07jns7S1sRs0F7IZb", "confirmation_method": "automatic", - "created": 1698778968, + "created": 1699285882, "currency": "eur", "customer": null, "description": null, @@ -228,7 +228,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1O7ND9KuuB1fWySnmyW2YCGo", + "payment_method": "pm_1O9V5BKuuB1fWySnlmhXNmd5", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -253,10 +253,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Tue, 31 Oct 2023 19:02:48 GMT + recorded_at: Mon, 06 Nov 2023 15:51:22 GMT - request: method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3O7NDAKuuB1fWySn0EzngPdL/confirm + uri: https://api.stripe.com/v1/payment_intents/pi_3O9V5CKuuB1fWySn1hPtURlb/confirm body: encoding: US-ASCII string: '' @@ -268,14 +268,14 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_GJrd6HK4e2UZdK","request_duration_ms":609}}' + - '{"last_request_metrics":{"request_id":"req_WlxHtA7WtEeg33","request_duration_ms":655}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-35-generic (buildd@bos03-amd64-016) (x86_64-linux-gnu-gcc-11 + version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2","hostname":"ff-LAT"}' + #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -288,7 +288,7 @@ http_interactions: Server: - nginx Date: - - Tue, 31 Oct 2023 19:02:49 GMT + - Mon, 06 Nov 2023 15:51:23 GMT Content-Type: - application/json Content-Length: @@ -314,11 +314,11 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 8f195fa2-ecd1-403b-b70e-9b4d9a768a09 + - 3f02d64f-02e0-4d1a-970a-e8677abb3327 Original-Request: - - req_nWd6JD2SbU0eH6 + - req_YwSK1TvEuzvKWm Request-Id: - - req_nWd6JD2SbU0eH6 + - req_YwSK1TvEuzvKWm Stripe-Should-Retry: - 'false' Stripe-Version: @@ -333,7 +333,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3O7NDAKuuB1fWySn0EzngPdL", + "id": "pi_3O9V5CKuuB1fWySn1hPtURlb", "object": "payment_intent", "amount": 100, "amount_capturable": 100, @@ -347,20 +347,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O7NDAKuuB1fWySn0EzngPdL_secret_nvyKe0sDpd5nsmKu485lNtGl3", + "client_secret": "pi_3O9V5CKuuB1fWySn1hPtURlb_secret_6uBS8k5q07jns7S1sRs0F7IZb", "confirmation_method": "automatic", - "created": 1698778968, + "created": 1699285882, "currency": "eur", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3O7NDAKuuB1fWySn01eDFLcJ", + "latest_charge": "ch_3O9V5CKuuB1fWySn1rAvcdei", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1O7ND9KuuB1fWySnmyW2YCGo", + "payment_method": "pm_1O9V5BKuuB1fWySnlmhXNmd5", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -385,10 +385,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Tue, 31 Oct 2023 19:02:49 GMT + recorded_at: Mon, 06 Nov 2023 15:51:23 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3O7NDAKuuB1fWySn0EzngPdL + uri: https://api.stripe.com/v1/payment_intents/pi_3O9V5CKuuB1fWySn1hPtURlb body: encoding: US-ASCII string: '' @@ -400,14 +400,14 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_nWd6JD2SbU0eH6","request_duration_ms":922}}' + - '{"last_request_metrics":{"request_id":"req_YwSK1TvEuzvKWm","request_duration_ms":1321}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-35-generic (buildd@bos03-amd64-016) (x86_64-linux-gnu-gcc-11 + version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2","hostname":"ff-LAT"}' + #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -420,7 +420,7 @@ http_interactions: Server: - nginx Date: - - Tue, 31 Oct 2023 19:02:51 GMT + - Mon, 06 Nov 2023 15:51:24 GMT Content-Type: - application/json Content-Length: @@ -446,7 +446,7 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_MhJwK3bCx1nUCV + - req_qjDkQl3stKfe1m Stripe-Version: - '2023-10-16' Vary: @@ -459,7 +459,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3O7NDAKuuB1fWySn0EzngPdL", + "id": "pi_3O9V5CKuuB1fWySn1hPtURlb", "object": "payment_intent", "amount": 100, "amount_capturable": 100, @@ -473,20 +473,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O7NDAKuuB1fWySn0EzngPdL_secret_nvyKe0sDpd5nsmKu485lNtGl3", + "client_secret": "pi_3O9V5CKuuB1fWySn1hPtURlb_secret_6uBS8k5q07jns7S1sRs0F7IZb", "confirmation_method": "automatic", - "created": 1698778968, + "created": 1699285882, "currency": "eur", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3O7NDAKuuB1fWySn01eDFLcJ", + "latest_charge": "ch_3O9V5CKuuB1fWySn1rAvcdei", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1O7ND9KuuB1fWySnmyW2YCGo", + "payment_method": "pm_1O9V5BKuuB1fWySnlmhXNmd5", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -511,5 +511,5 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Tue, 31 Oct 2023 19:02:51 GMT + recorded_at: Mon, 06 Nov 2023 15:51:24 GMT recorded_with: VCR 6.2.0 diff --git a/spec/lib/stripe/payment_intent_validator_spec.rb b/spec/lib/stripe/payment_intent_validator_spec.rb index bb0f95ea2b..3f1e246a8f 100644 --- a/spec/lib/stripe/payment_intent_validator_spec.rb +++ b/spec/lib/stripe/payment_intent_validator_spec.rb @@ -19,7 +19,7 @@ module Stripe Stripe.api_key = secret end - describe "#call", :vcr do + describe "#call", :vcr, :stripe_version do let(:payment) { create(:payment, amount: payment_intent.amount, payment_method:, response_code: payment_intent.id, source:) From 7dd0d0581cd6225adbb0197f3ea6c4f724759899 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 8 Nov 2023 15:05:54 +1100 Subject: [PATCH 03/12] Codify re-recording of Stripe cassettes --- script/test-stripe-live | 6 ++++++ spec/base_spec_helper.rb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100755 script/test-stripe-live diff --git a/script/test-stripe-live b/script/test-stripe-live new file mode 100755 index 0000000000..14833043af --- /dev/null +++ b/script/test-stripe-live @@ -0,0 +1,6 @@ +#!/usr/bin/env sh +# +# Test Stripe API integration and record new cassettes. + +rm spec/fixtures/vcr_cassettes/Stripe-v* -r +./bin/rspec --tag stripe_version diff --git a/spec/base_spec_helper.rb b/spec/base_spec_helper.rb index 1660f9bb11..aecfe9c5fa 100644 --- a/spec/base_spec_helper.rb +++ b/spec/base_spec_helper.rb @@ -135,8 +135,8 @@ RSpec.configure do |config| # # When the Stripe gem is updated, we should re-record these cassettes: # - # rm spec/fixtures/vcr_cassettes/Stripe-v* -r - # ./bin/rspec --tag stripe_version + # ./script/test-stripe-live + # config.around(:each, :stripe_version) do |example| stripe_version = "Stripe-v#{Stripe::VERSION}" VCR.configure do |vcr_config| From cb57807466b2da14798460e753f7d50ff923a5e7 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 9 Nov 2023 08:52:06 +1100 Subject: [PATCH 04/12] Streamline stripe test recording updates --- script/test-stripe-live | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/test-stripe-live b/script/test-stripe-live index 14833043af..530bd8c5ad 100755 --- a/script/test-stripe-live +++ b/script/test-stripe-live @@ -2,5 +2,5 @@ # # Test Stripe API integration and record new cassettes. -rm spec/fixtures/vcr_cassettes/Stripe-v* -r +git rm spec/fixtures/vcr_cassettes/Stripe-v* -r ./bin/rspec --tag stripe_version From 4c1334fb69d5e9392e65c53e457b6694e5fa4483 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 9 Nov 2023 08:56:46 +1100 Subject: [PATCH 05/12] Record new version of Stripe requests --- .../saves_the_card_locally.yml | 96 ++++++------ ...t_intent_last_payment_error_as_message.yml | 146 +++++++++--------- ...s_payment_intent_id_and_does_not_raise.yml | 130 ++++++++-------- 3 files changed, 187 insertions(+), 185 deletions(-) rename spec/fixtures/vcr_cassettes/{Stripe-v10.0.0 => Stripe-v10.1.0}/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml (75%) rename spec/fixtures/vcr_cassettes/{Stripe-v10.0.0 => Stripe-v10.1.0}/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml (81%) rename spec/fixtures/vcr_cassettes/{Stripe-v10.0.0 => Stripe-v10.1.0}/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml (78%) diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.1.0/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml similarity index 75% rename from spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml rename to spec/fixtures/vcr_cassettes/Stripe-v10.1.0/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml index 47583d6d0e..5878deea2e 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.1.0/Spree_CreditCardsController/using_VCR/_new_from_token/when_the_request_to_store_the_customer/card_with_Stripe_is_successful/saves_the_card_locally.yml @@ -8,7 +8,7 @@ http_interactions: string: card[number]=4242424242424242&card[exp_month]=9&card[exp_year]=2024&card[cvc]=314 headers: User-Agent: - - Stripe/v1 RubyBindings/10.0.0 + - Stripe/v1 RubyBindings/10.1.0 Authorization: - Bearer Content-Type: @@ -16,10 +16,10 @@ http_interactions: Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 - (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' + - '{"bindings_version":"10.1.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.1.0-12-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) + 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian + 6.1.52-1 (2023-09-07)","hostname":"blackbox"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -32,7 +32,7 @@ http_interactions: Server: - nginx Date: - - Mon, 06 Nov 2023 15:52:10 GMT + - Wed, 08 Nov 2023 21:53:49 GMT Content-Type: - application/json Content-Length: @@ -52,16 +52,16 @@ http_interactions: - '300' Cache-Control: - no-cache, no-store - Content-Security-Policy-Report-Only: + Content-Security-Policy: - report-uri https://q.stripe.com/csp-report?p=v1%2Ftokens; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 4b36e5b1-ee94-4ecc-8283-cfa0d9c96480 + - c4d99b66-fe74-488e-958e-69eca92c35be Original-Request: - - req_cDbJqfdlYZdbyU + - req_1hXs9SUU8IKjKg Request-Id: - - req_cDbJqfdlYZdbyU + - req_1hXs9SUU8IKjKg Stripe-Should-Retry: - 'false' Stripe-Version: @@ -76,10 +76,10 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "tok_1O9V5yKuuB1fWySnSeAtjOj4", + "id": "tok_1OAJh2KuuB1fWySnFuyE55Xo", "object": "token", "card": { - "id": "card_1O9V5yKuuB1fWySnWYC2TQys", + "id": "card_1OAJh2KuuB1fWySn1bi0QzS0", "object": "card", "address_city": null, "address_country": null, @@ -103,35 +103,35 @@ http_interactions: "tokenization_method": null, "wallet": null }, - "client_ip": "89.153.187.247", - "created": 1699285930, + "client_ip": "220.253.195.13", + "created": 1699480428, "livemode": false, "type": "card", "used": false } - recorded_at: Mon, 06 Nov 2023 15:52:10 GMT + recorded_at: Wed, 08 Nov 2023 21:53:49 GMT - request: method: post uri: https://api.stripe.com/v1/customers body: encoding: UTF-8 - string: email=maranda_kertzmann%40ferrystark.com&source=tok_1O9V5yKuuB1fWySnSeAtjOj4 + string: email=german_jerde%40kubschmeler.ca&source=tok_1OAJh2KuuB1fWySnFuyE55Xo headers: User-Agent: - - Stripe/v1 RubyBindings/10.0.0 + - Stripe/v1 RubyBindings/10.1.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_cDbJqfdlYZdbyU","request_duration_ms":771}}' + - '{"last_request_metrics":{"request_id":"req_1hXs9SUU8IKjKg","request_duration_ms":747}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 - (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' + - '{"bindings_version":"10.1.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.1.0-12-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) + 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian + 6.1.52-1 (2023-09-07)","hostname":"blackbox"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -144,11 +144,11 @@ http_interactions: Server: - nginx Date: - - Mon, 06 Nov 2023 15:52:11 GMT + - Wed, 08 Nov 2023 21:53:50 GMT Content-Type: - application/json Content-Length: - - '671' + - '666' Connection: - keep-alive Access-Control-Allow-Credentials: @@ -164,16 +164,16 @@ http_interactions: - '300' Cache-Control: - no-cache, no-store - Content-Security-Policy-Report-Only: + Content-Security-Policy: - report-uri https://q.stripe.com/csp-report?p=v1%2Fcustomers; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - e0ba0c07-8278-4f20-9740-7c0a1ec6f77f + - e8aa29da-1d01-48db-9ba0-db2df6d51a04 Original-Request: - - req_PRTmtmWClmWQgz + - req_pdc1GBlN0NvenY Request-Id: - - req_PRTmtmWClmWQgz + - req_pdc1GBlN0NvenY Stripe-Should-Retry: - 'false' Stripe-Version: @@ -188,18 +188,18 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "cus_OxPvaW3mvLovLW", + "id": "cus_OyGDSPQMHTtArJ", "object": "customer", "address": null, "balance": 0, - "created": 1699285931, + "created": 1699480429, "currency": null, - "default_source": "card_1O9V5yKuuB1fWySnWYC2TQys", + "default_source": "card_1OAJh2KuuB1fWySn1bi0QzS0", "delinquent": false, "description": null, "discount": null, - "email": "maranda_kertzmann@ferrystark.com", - "invoice_prefix": "4AF66002", + "email": "german_jerde@kubschmeler.ca", + "invoice_prefix": "EE42E7FD", "invoice_settings": { "custom_fields": null, "default_payment_method": null, @@ -216,29 +216,29 @@ http_interactions: "tax_exempt": "none", "test_clock": null } - recorded_at: Mon, 06 Nov 2023 15:52:12 GMT + recorded_at: Wed, 08 Nov 2023 21:53:50 GMT - request: method: get - uri: https://api.stripe.com/v1/customers/cus_OxPvaW3mvLovLW/sources?limit=1&object=card + uri: https://api.stripe.com/v1/customers/cus_OyGDSPQMHTtArJ/sources?limit=1&object=card body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.0.0 + - Stripe/v1 RubyBindings/10.1.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_PRTmtmWClmWQgz","request_duration_ms":1057}}' + - '{"last_request_metrics":{"request_id":"req_pdc1GBlN0NvenY","request_duration_ms":1084}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 - (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' + - '{"bindings_version":"10.1.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.1.0-12-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) + 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian + 6.1.52-1 (2023-09-07)","hostname":"blackbox"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -251,7 +251,7 @@ http_interactions: Server: - nginx Date: - - Mon, 06 Nov 2023 15:52:12 GMT + - Wed, 08 Nov 2023 21:53:50 GMT Content-Type: - application/json Content-Length: @@ -271,13 +271,13 @@ http_interactions: - '300' Cache-Control: - no-cache, no-store - Content-Security-Policy-Report-Only: + Content-Security-Policy: - report-uri https://q.stripe.com/csp-report?p=v1%2Fcustomers%2F%3Acustomer%2Fsources; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_6VTyanKbPfjW7u + - req_TC9pbExmRgIvbf Stripe-Version: - '2023-10-16' Vary: @@ -293,7 +293,7 @@ http_interactions: "object": "list", "data": [ { - "id": "card_1O9V5yKuuB1fWySnWYC2TQys", + "id": "card_1OAJh2KuuB1fWySn1bi0QzS0", "object": "card", "address_city": null, "address_country": null, @@ -305,7 +305,7 @@ http_interactions: "address_zip_check": null, "brand": "Visa", "country": "US", - "customer": "cus_OxPvaW3mvLovLW", + "customer": "cus_OyGDSPQMHTtArJ", "cvc_check": "pass", "dynamic_last4": null, "exp_month": 9, @@ -320,7 +320,7 @@ http_interactions: } ], "has_more": false, - "url": "/v1/customers/cus_OxPvaW3mvLovLW/sources" + "url": "/v1/customers/cus_OyGDSPQMHTtArJ/sources" } - recorded_at: Mon, 06 Nov 2023 15:52:12 GMT + recorded_at: Wed, 08 Nov 2023 21:53:50 GMT recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.1.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml similarity index 81% rename from spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml rename to spec/fixtures/vcr_cassettes/Stripe-v10.1.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml index fc6fc8872a..b077322100 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.1.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_contains_an_error/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml @@ -8,20 +8,20 @@ http_interactions: string: type=card&card[number]=4000000000009995&card[exp_month]=12&card[exp_year]=2034&card[cvc]=314 headers: User-Agent: - - Stripe/v1 RubyBindings/10.0.0 + - Stripe/v1 RubyBindings/10.1.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_qjDkQl3stKfe1m","request_duration_ms":292}}' + - '{"last_request_metrics":{"request_id":"req_lDPJ62zgG8A9FL","request_duration_ms":372}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 - (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' + - '{"bindings_version":"10.1.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.1.0-12-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) + 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian + 6.1.52-1 (2023-09-07)","hostname":"blackbox"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -34,7 +34,7 @@ http_interactions: Server: - nginx Date: - - Mon, 06 Nov 2023 15:51:25 GMT + - Wed, 08 Nov 2023 21:53:53 GMT Content-Type: - application/json Content-Length: @@ -54,16 +54,16 @@ http_interactions: - '300' Cache-Control: - no-cache, no-store - Content-Security-Policy-Report-Only: + Content-Security-Policy: - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 4fbac071-d4cb-477e-8790-e8ae12bc5941 + - 75a4ebeb-6038-4dad-b537-211f6f71b7f1 Original-Request: - - req_xooNPVYZPZwVf7 + - req_CXWU1cVDbwleGf Request-Id: - - req_xooNPVYZPZwVf7 + - req_CXWU1cVDbwleGf Stripe-Should-Retry: - 'false' Stripe-Version: @@ -78,7 +78,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pm_1O9V5FKuuB1fWySnjblXM6DN", + "id": "pm_1OAJh7KuuB1fWySnzX7O7p6v", "object": "payment_method", "billing_details": { "address": { @@ -118,35 +118,35 @@ http_interactions: }, "wallet": null }, - "created": 1699285885, + "created": 1699480433, "customer": null, "livemode": false, "metadata": {}, "type": "card" } - recorded_at: Mon, 06 Nov 2023 15:51:25 GMT + recorded_at: Wed, 08 Nov 2023 21:53:53 GMT - request: method: post uri: https://api.stripe.com/v1/payment_intents body: encoding: UTF-8 - string: amount=100¤cy=eur&payment_method=pm_1O9V5FKuuB1fWySnjblXM6DN&payment_method_types[0]=card&capture_method=manual + string: amount=100¤cy=eur&payment_method=pm_1OAJh7KuuB1fWySnzX7O7p6v&payment_method_types[0]=card&capture_method=manual headers: User-Agent: - - Stripe/v1 RubyBindings/10.0.0 + - Stripe/v1 RubyBindings/10.1.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_xooNPVYZPZwVf7","request_duration_ms":502}}' + - '{"last_request_metrics":{"request_id":"req_CXWU1cVDbwleGf","request_duration_ms":504}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 - (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' + - '{"bindings_version":"10.1.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.1.0-12-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) + 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian + 6.1.52-1 (2023-09-07)","hostname":"blackbox"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -159,7 +159,7 @@ http_interactions: Server: - nginx Date: - - Mon, 06 Nov 2023 15:51:25 GMT + - Wed, 08 Nov 2023 21:53:54 GMT Content-Type: - application/json Content-Length: @@ -179,16 +179,16 @@ http_interactions: - '300' Cache-Control: - no-cache, no-store - Content-Security-Policy-Report-Only: + Content-Security-Policy: - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - d22ed50d-b847-4eae-9010-9e1e4b76a457 + - 7ce09a3a-1ae3-44bf-a4a1-b4892300bee8 Original-Request: - - req_QqdIxo9PkjL14D + - req_7vL6AMoApGaPOn Request-Id: - - req_QqdIxo9PkjL14D + - req_7vL6AMoApGaPOn Stripe-Should-Retry: - 'false' Stripe-Version: @@ -203,7 +203,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3O9V5FKuuB1fWySn1NAfVNB3", + "id": "pi_3OAJh8KuuB1fWySn0KV6OR9K", "object": "payment_intent", "amount": 100, "amount_capturable": 0, @@ -217,9 +217,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O9V5FKuuB1fWySn1NAfVNB3_secret_Qbz82VCpcuteYBKnfadQzGJAJ", + "client_secret": "pi_3OAJh8KuuB1fWySn0KV6OR9K_secret_GwjdRrh93OZLch9K7bSGXthZQ", "confirmation_method": "automatic", - "created": 1699285885, + "created": 1699480434, "currency": "eur", "customer": null, "description": null, @@ -230,7 +230,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1O9V5FKuuB1fWySnjblXM6DN", + "payment_method": "pm_1OAJh7KuuB1fWySnzX7O7p6v", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -255,29 +255,29 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 06 Nov 2023 15:51:25 GMT + recorded_at: Wed, 08 Nov 2023 21:53:54 GMT - request: method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3O9V5FKuuB1fWySn1NAfVNB3/confirm + uri: https://api.stripe.com/v1/payment_intents/pi_3OAJh8KuuB1fWySn0KV6OR9K/confirm body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.0.0 + - Stripe/v1 RubyBindings/10.1.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_QqdIxo9PkjL14D","request_duration_ms":406}}' + - '{"last_request_metrics":{"request_id":"req_7vL6AMoApGaPOn","request_duration_ms":481}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 - (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' + - '{"bindings_version":"10.1.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.1.0-12-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) + 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian + 6.1.52-1 (2023-09-07)","hostname":"blackbox"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -290,7 +290,7 @@ http_interactions: Server: - nginx Date: - - Mon, 06 Nov 2023 15:51:27 GMT + - Wed, 08 Nov 2023 21:53:55 GMT Content-Type: - application/json Content-Length: @@ -310,17 +310,17 @@ http_interactions: - '300' Cache-Control: - no-cache, no-store - Content-Security-Policy-Report-Only: + Content-Security-Policy: - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent%2Fconfirm; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - d4f5356f-c489-4071-92a0-14da3a986bdf + - f1ac8418-72c6-40a2-83a3-2e43b42f9338 Original-Request: - - req_Rp8e8zwOEKyM5j + - req_T5Mfbcixmq8B95 Request-Id: - - req_Rp8e8zwOEKyM5j + - req_T5Mfbcixmq8B95 Stripe-Should-Retry: - 'false' Stripe-Version: @@ -336,13 +336,13 @@ http_interactions: string: | { "error": { - "charge": "ch_3O9V5FKuuB1fWySn1FSkX2IG", + "charge": "ch_3OAJh8KuuB1fWySn0ZBV99yj", "code": "card_declined", "decline_code": "insufficient_funds", "doc_url": "https://stripe.com/docs/error-codes/card-declined", "message": "Your card has insufficient funds.", "payment_intent": { - "id": "pi_3O9V5FKuuB1fWySn1NAfVNB3", + "id": "pi_3OAJh8KuuB1fWySn0KV6OR9K", "object": "payment_intent", "amount": 100, "amount_capturable": 0, @@ -357,21 +357,21 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O9V5FKuuB1fWySn1NAfVNB3_secret_Qbz82VCpcuteYBKnfadQzGJAJ", + "client_secret": "pi_3OAJh8KuuB1fWySn0KV6OR9K_secret_GwjdRrh93OZLch9K7bSGXthZQ", "confirmation_method": "automatic", - "created": 1699285885, + "created": 1699480434, "currency": "eur", "customer": null, "description": null, "invoice": null, "last_payment_error": { - "charge": "ch_3O9V5FKuuB1fWySn1FSkX2IG", + "charge": "ch_3OAJh8KuuB1fWySn0ZBV99yj", "code": "card_declined", "decline_code": "insufficient_funds", "doc_url": "https://stripe.com/docs/error-codes/card-declined", "message": "Your card has insufficient funds.", "payment_method": { - "id": "pm_1O9V5FKuuB1fWySnjblXM6DN", + "id": "pm_1OAJh7KuuB1fWySnzX7O7p6v", "object": "payment_method", "billing_details": { "address": { @@ -411,7 +411,7 @@ http_interactions: }, "wallet": null }, - "created": 1699285885, + "created": 1699480433, "customer": null, "livemode": false, "metadata": { @@ -420,7 +420,7 @@ http_interactions: }, "type": "card_error" }, - "latest_charge": "ch_3O9V5FKuuB1fWySn1FSkX2IG", + "latest_charge": "ch_3OAJh8KuuB1fWySn0ZBV99yj", "livemode": false, "metadata": { }, @@ -452,7 +452,7 @@ http_interactions: "transfer_group": null }, "payment_method": { - "id": "pm_1O9V5FKuuB1fWySnjblXM6DN", + "id": "pm_1OAJh7KuuB1fWySnzX7O7p6v", "object": "payment_method", "billing_details": { "address": { @@ -492,40 +492,40 @@ http_interactions: }, "wallet": null }, - "created": 1699285885, + "created": 1699480433, "customer": null, "livemode": false, "metadata": { }, "type": "card" }, - "request_log_url": "https://dashboard.stripe.com/test/logs/req_Rp8e8zwOEKyM5j?t=1699285886", + "request_log_url": "https://dashboard.stripe.com/test/logs/req_T5Mfbcixmq8B95?t=1699480434", "type": "card_error" } } - recorded_at: Mon, 06 Nov 2023 15:51:27 GMT + recorded_at: Wed, 08 Nov 2023 21:53:55 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3O9V5FKuuB1fWySn1NAfVNB3 + uri: https://api.stripe.com/v1/payment_intents/pi_3OAJh8KuuB1fWySn0KV6OR9K body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.0.0 + - Stripe/v1 RubyBindings/10.1.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_QqdIxo9PkjL14D","request_duration_ms":406}}' + - '{"last_request_metrics":{"request_id":"req_7vL6AMoApGaPOn","request_duration_ms":481}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 - (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' + - '{"bindings_version":"10.1.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.1.0-12-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) + 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian + 6.1.52-1 (2023-09-07)","hostname":"blackbox"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -538,7 +538,7 @@ http_interactions: Server: - nginx Date: - - Mon, 06 Nov 2023 15:51:27 GMT + - Wed, 08 Nov 2023 21:53:55 GMT Content-Type: - application/json Content-Length: @@ -558,13 +558,13 @@ http_interactions: - '300' Cache-Control: - no-cache, no-store - Content-Security-Policy-Report-Only: + Content-Security-Policy: - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_HAvin8KTnmcqUX + - req_oFg3Mxdsl0kbmA Stripe-Version: - '2023-10-16' Vary: @@ -577,7 +577,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3O9V5FKuuB1fWySn1NAfVNB3", + "id": "pi_3OAJh8KuuB1fWySn0KV6OR9K", "object": "payment_intent", "amount": 100, "amount_capturable": 0, @@ -591,21 +591,21 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O9V5FKuuB1fWySn1NAfVNB3_secret_Qbz82VCpcuteYBKnfadQzGJAJ", + "client_secret": "pi_3OAJh8KuuB1fWySn0KV6OR9K_secret_GwjdRrh93OZLch9K7bSGXthZQ", "confirmation_method": "automatic", - "created": 1699285885, + "created": 1699480434, "currency": "eur", "customer": null, "description": null, "invoice": null, "last_payment_error": { - "charge": "ch_3O9V5FKuuB1fWySn1FSkX2IG", + "charge": "ch_3OAJh8KuuB1fWySn0ZBV99yj", "code": "card_declined", "decline_code": "insufficient_funds", "doc_url": "https://stripe.com/docs/error-codes/card-declined", "message": "Your card has insufficient funds.", "payment_method": { - "id": "pm_1O9V5FKuuB1fWySnjblXM6DN", + "id": "pm_1OAJh7KuuB1fWySnzX7O7p6v", "object": "payment_method", "billing_details": { "address": { @@ -645,7 +645,7 @@ http_interactions: }, "wallet": null }, - "created": 1699285885, + "created": 1699480433, "customer": null, "livemode": false, "metadata": {}, @@ -653,7 +653,7 @@ http_interactions: }, "type": "card_error" }, - "latest_charge": "ch_3O9V5FKuuB1fWySn1FSkX2IG", + "latest_charge": "ch_3OAJh8KuuB1fWySn0ZBV99yj", "livemode": false, "metadata": {}, "next_action": null, @@ -683,5 +683,5 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 06 Nov 2023 15:51:27 GMT + recorded_at: Wed, 08 Nov 2023 21:53:56 GMT recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.1.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml similarity index 78% rename from spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml rename to spec/fixtures/vcr_cassettes/Stripe-v10.1.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml index 5ed1890197..38458b8c94 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.0.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.1.0/Stripe_PaymentIntentValidator/_call/when_payment_intent_is_valid/returns_payment_intent_id_and_does_not_raise.yml @@ -8,18 +8,20 @@ http_interactions: string: type=card&card[number]=4242424242424242&card[exp_month]=12&card[exp_year]=2034&card[cvc]=314 headers: User-Agent: - - Stripe/v1 RubyBindings/10.0.0 + - Stripe/v1 RubyBindings/10.1.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_TC9pbExmRgIvbf","request_duration_ms":286}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 - (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' + - '{"bindings_version":"10.1.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.1.0-12-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) + 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian + 6.1.52-1 (2023-09-07)","hostname":"blackbox"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -32,7 +34,7 @@ http_interactions: Server: - nginx Date: - - Mon, 06 Nov 2023 15:51:21 GMT + - Wed, 08 Nov 2023 21:53:51 GMT Content-Type: - application/json Content-Length: @@ -52,16 +54,16 @@ http_interactions: - '300' Cache-Control: - no-cache, no-store - Content-Security-Policy-Report-Only: + Content-Security-Policy: - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - a2ef4e72-541e-437f-9f85-581df5c29259 + - 6fc875e5-de6b-4f25-b196-674293d7d70f Original-Request: - - req_lr8vrJIpZhmcYq + - req_DrCawewCGirS4u Request-Id: - - req_lr8vrJIpZhmcYq + - req_DrCawewCGirS4u Stripe-Should-Retry: - 'false' Stripe-Version: @@ -76,7 +78,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pm_1O9V5BKuuB1fWySnlmhXNmd5", + "id": "pm_1OAJh4KuuB1fWySn6Sm53upC", "object": "payment_method", "billing_details": { "address": { @@ -116,35 +118,35 @@ http_interactions: }, "wallet": null }, - "created": 1699285881, + "created": 1699480430, "customer": null, "livemode": false, "metadata": {}, "type": "card" } - recorded_at: Mon, 06 Nov 2023 15:51:21 GMT + recorded_at: Wed, 08 Nov 2023 21:53:51 GMT - request: method: post uri: https://api.stripe.com/v1/payment_intents body: encoding: UTF-8 - string: amount=100¤cy=eur&payment_method=pm_1O9V5BKuuB1fWySnlmhXNmd5&payment_method_types[0]=card&capture_method=manual + string: amount=100¤cy=eur&payment_method=pm_1OAJh4KuuB1fWySn6Sm53upC&payment_method_types[0]=card&capture_method=manual headers: User-Agent: - - Stripe/v1 RubyBindings/10.0.0 + - Stripe/v1 RubyBindings/10.1.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_lr8vrJIpZhmcYq","request_duration_ms":918}}' + - '{"last_request_metrics":{"request_id":"req_DrCawewCGirS4u","request_duration_ms":461}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 - (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' + - '{"bindings_version":"10.1.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.1.0-12-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) + 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian + 6.1.52-1 (2023-09-07)","hostname":"blackbox"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -157,7 +159,7 @@ http_interactions: Server: - nginx Date: - - Mon, 06 Nov 2023 15:51:22 GMT + - Wed, 08 Nov 2023 21:53:51 GMT Content-Type: - application/json Content-Length: @@ -177,16 +179,16 @@ http_interactions: - '300' Cache-Control: - no-cache, no-store - Content-Security-Policy-Report-Only: + Content-Security-Policy: - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - ad226562-10aa-4ced-a3d3-1d4d134d5dc1 + - 2228abfe-aefe-45da-a235-6b1608f97198 Original-Request: - - req_WlxHtA7WtEeg33 + - req_M77hwHJKl3kOmG Request-Id: - - req_WlxHtA7WtEeg33 + - req_M77hwHJKl3kOmG Stripe-Should-Retry: - 'false' Stripe-Version: @@ -201,7 +203,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3O9V5CKuuB1fWySn1hPtURlb", + "id": "pi_3OAJh5KuuB1fWySn1teF24aw", "object": "payment_intent", "amount": 100, "amount_capturable": 0, @@ -215,9 +217,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O9V5CKuuB1fWySn1hPtURlb_secret_6uBS8k5q07jns7S1sRs0F7IZb", + "client_secret": "pi_3OAJh5KuuB1fWySn1teF24aw_secret_zkEDdwGwOiCRYocuOOF6hlDyl", "confirmation_method": "automatic", - "created": 1699285882, + "created": 1699480431, "currency": "eur", "customer": null, "description": null, @@ -228,7 +230,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1O9V5BKuuB1fWySnlmhXNmd5", + "payment_method": "pm_1OAJh4KuuB1fWySn6Sm53upC", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -253,29 +255,29 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 06 Nov 2023 15:51:22 GMT + recorded_at: Wed, 08 Nov 2023 21:53:51 GMT - request: method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3O9V5CKuuB1fWySn1hPtURlb/confirm + uri: https://api.stripe.com/v1/payment_intents/pi_3OAJh5KuuB1fWySn1teF24aw/confirm body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.0.0 + - Stripe/v1 RubyBindings/10.1.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_WlxHtA7WtEeg33","request_duration_ms":655}}' + - '{"last_request_metrics":{"request_id":"req_M77hwHJKl3kOmG","request_duration_ms":512}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 - (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' + - '{"bindings_version":"10.1.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.1.0-12-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) + 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian + 6.1.52-1 (2023-09-07)","hostname":"blackbox"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -288,7 +290,7 @@ http_interactions: Server: - nginx Date: - - Mon, 06 Nov 2023 15:51:23 GMT + - Wed, 08 Nov 2023 21:53:52 GMT Content-Type: - application/json Content-Length: @@ -308,17 +310,17 @@ http_interactions: - '300' Cache-Control: - no-cache, no-store - Content-Security-Policy-Report-Only: + Content-Security-Policy: - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent%2Fconfirm; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 3f02d64f-02e0-4d1a-970a-e8677abb3327 + - e90c558a-5e35-4550-a5d2-b513c1b00819 Original-Request: - - req_YwSK1TvEuzvKWm + - req_DlfzVAQPPatmxi Request-Id: - - req_YwSK1TvEuzvKWm + - req_DlfzVAQPPatmxi Stripe-Should-Retry: - 'false' Stripe-Version: @@ -333,7 +335,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3O9V5CKuuB1fWySn1hPtURlb", + "id": "pi_3OAJh5KuuB1fWySn1teF24aw", "object": "payment_intent", "amount": 100, "amount_capturable": 100, @@ -347,20 +349,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O9V5CKuuB1fWySn1hPtURlb_secret_6uBS8k5q07jns7S1sRs0F7IZb", + "client_secret": "pi_3OAJh5KuuB1fWySn1teF24aw_secret_zkEDdwGwOiCRYocuOOF6hlDyl", "confirmation_method": "automatic", - "created": 1699285882, + "created": 1699480431, "currency": "eur", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3O9V5CKuuB1fWySn1rAvcdei", + "latest_charge": "ch_3OAJh5KuuB1fWySn1DrvKdoY", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1O9V5BKuuB1fWySnlmhXNmd5", + "payment_method": "pm_1OAJh4KuuB1fWySn6Sm53upC", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -385,29 +387,29 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 06 Nov 2023 15:51:23 GMT + recorded_at: Wed, 08 Nov 2023 21:53:52 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3O9V5CKuuB1fWySn1hPtURlb + uri: https://api.stripe.com/v1/payment_intents/pi_3OAJh5KuuB1fWySn1teF24aw body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.0.0 + - Stripe/v1 RubyBindings/10.1.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_YwSK1TvEuzvKWm","request_duration_ms":1321}}' + - '{"last_request_metrics":{"request_id":"req_DlfzVAQPPatmxi","request_duration_ms":1021}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.0.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - version 6.2.0-36-generic (buildd@lcy02-amd64-050) (x86_64-linux-gnu-gcc-11 - (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) - #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2","hostname":"ff-LAT"}' + - '{"bindings_version":"10.1.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 6.1.0-12-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) + 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian + 6.1.52-1 (2023-09-07)","hostname":"blackbox"}' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -420,7 +422,7 @@ http_interactions: Server: - nginx Date: - - Mon, 06 Nov 2023 15:51:24 GMT + - Wed, 08 Nov 2023 21:53:53 GMT Content-Type: - application/json Content-Length: @@ -440,13 +442,13 @@ http_interactions: - '300' Cache-Control: - no-cache, no-store - Content-Security-Policy-Report-Only: + Content-Security-Policy: - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_qjDkQl3stKfe1m + - req_lDPJ62zgG8A9FL Stripe-Version: - '2023-10-16' Vary: @@ -459,7 +461,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3O9V5CKuuB1fWySn1hPtURlb", + "id": "pi_3OAJh5KuuB1fWySn1teF24aw", "object": "payment_intent", "amount": 100, "amount_capturable": 100, @@ -473,20 +475,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3O9V5CKuuB1fWySn1hPtURlb_secret_6uBS8k5q07jns7S1sRs0F7IZb", + "client_secret": "pi_3OAJh5KuuB1fWySn1teF24aw_secret_zkEDdwGwOiCRYocuOOF6hlDyl", "confirmation_method": "automatic", - "created": 1699285882, + "created": 1699480431, "currency": "eur", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3O9V5CKuuB1fWySn1rAvcdei", + "latest_charge": "ch_3OAJh5KuuB1fWySn1DrvKdoY", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1O9V5BKuuB1fWySnlmhXNmd5", + "payment_method": "pm_1OAJh4KuuB1fWySn6Sm53upC", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -511,5 +513,5 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 06 Nov 2023 15:51:24 GMT + recorded_at: Wed, 08 Nov 2023 21:53:53 GMT recorded_with: VCR 6.2.0 From d5dca97438d0a4713a257a0521d72c0ce5e0a6c4 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 2 Nov 2023 16:22:21 +1100 Subject: [PATCH 06/12] Spec tiny bug which caused a flaky spec It still needs solving. --- spec/system/admin/order_spec.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/spec/system/admin/order_spec.rb b/spec/system/admin/order_spec.rb index bc398e7673..5ef3ec7fe1 100644 --- a/spec/system/admin/order_spec.rb +++ b/spec/system/admin/order_spec.rb @@ -350,7 +350,17 @@ describe ' fill_in(:quantity, with: max_quantity + 1) find("a.save-item").click end - click_button("OK") + + pending "Reload bug" + # The following modal is displayed but disappears straight away because the + # page is reloaded after the click on the save button. Somehow this happens + # only the first time the page is loaded and after that this logic seems to + # work fine. + sleep 1 + within(".modal") do + expect(page).to have_content "Quantity unchanged from previous amount" + click_on "OK" + end expect(page).to_not have_content "Loading..." within("tr.stock-item", text: order.products.first.name) do From efc338aeeb223b8759ba071265b01ae92634f6c3 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 3 Nov 2023 14:15:16 +1100 Subject: [PATCH 07/12] Don't update order when not enough stock There's a user-facing change here. When you tried to update the quantity of a line item beyond available stock, two things used to happen: 1. A warning was displayed. 2. The item's quantity was updated to the highest possible. Unfortunately, the logic to update the line item was also reloading the page and the warning message disappeared before it could be acknowledged. The easiest fix was to skip the update request. And in my opinion, it's even better to let the user decide if they still want to update or cancel the update. Eventually, we want to replace all this custom Javascript logic with StimulusJS anyway. So let's not put too much effort into this. It was important though to resolve the flaky spec which made many builds fail. --- .../spree/orders/variant_autocomplete.js.erb | 4 ++-- spec/system/admin/order_spec.rb | 19 ++++++------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb b/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb index a8a96ec36b..bf054b0cd1 100644 --- a/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb +++ b/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb @@ -51,10 +51,10 @@ $(document).ready(function() { quantity = maxQuantity; save.parents('tr').find('input.line_item_quantity').val(maxQuantity); ofnAlert(t("js.admin.orders.quantity_adjusted")); + } else { + adjustItems(shipment_number, variant_id, quantity, true); } - toggleItemEdit(); - adjustItems(shipment_number, variant_id, quantity, true); return false; } $('a.save-item').click(handle_save_click); diff --git a/spec/system/admin/order_spec.rb b/spec/system/admin/order_spec.rb index 5ef3ec7fe1..1a94f4ca0f 100644 --- a/spec/system/admin/order_spec.rb +++ b/spec/system/admin/order_spec.rb @@ -339,34 +339,27 @@ describe ' login_as_admin visit spree.edit_admin_order_path(order) - quantity = order.line_items.first.quantity - max_quantity = 0 + item = order.line_items.first + quantity = item.quantity + max_quantity = quantity + item.variant.on_hand total = order.display_total within("tr.stock-item", text: order.products.first.name) do find("a.edit-item").click expect(page).to have_input(:quantity) - max_quantity = find("input[name='quantity']")["max"].to_i fill_in(:quantity, with: max_quantity + 1) find("a.save-item").click end - pending "Reload bug" - # The following modal is displayed but disappears straight away because the - # page is reloaded after the click on the save button. Somehow this happens - # only the first time the page is loaded and after that this logic seems to - # work fine. - sleep 1 within(".modal") do - expect(page).to have_content "Quantity unchanged from previous amount" + expect(page).to have_content "Insufficient stock available" click_on "OK" end - expect(page).to_not have_content "Loading..." within("tr.stock-item", text: order.products.first.name) do - expect(page).to have_text(max_quantity.to_s) + expect(page).to have_field :quantity, with: max_quantity.to_s end - expect(order.reload.line_items.first.quantity).to eq(max_quantity) + expect { item.reload }.to_not change { item.quantity } end it "there are infinite items available (variant is on demand)" do From 71c50e1fcffeb589ad7240e26450ec2620b63ecb Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 3 Nov 2023 14:31:29 +1100 Subject: [PATCH 08/12] Update warning message for item quantity --- .../javascripts/admin/spree/orders/variant_autocomplete.js.erb | 2 +- config/locales/en.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb b/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb index bf054b0cd1..001055417e 100644 --- a/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb +++ b/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb @@ -50,7 +50,7 @@ $(document).ready(function() { if (quantity > maxQuantity) { quantity = maxQuantity; save.parents('tr').find('input.line_item_quantity').val(maxQuantity); - ofnAlert(t("js.admin.orders.quantity_adjusted")); + ofnAlert(t("js.admin.orders.quantity_unavailable")); } else { adjustItems(shipment_number, variant_id, quantity, true); } diff --git a/config/locales/en.yml b/config/locales/en.yml index 583a2962f7..1927079a11 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3440,7 +3440,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using processing: "processing" void: "void" invalid: "invalid" - quantity_adjusted: "Insufficient stock available. Line item updated to maximum available quantity." + quantity_unavailable: "Insufficient stock available. Line item unsaved!" quantity_unchanged: "Quantity unchanged from previous amount." cancel_the_order_html: "This will cancel the current order.
Are you sure you want to proceed?" cancel_the_order_send_cancelation_email: "Send a cancellation email to the customer" From f754eac3a0e32932c77d34ed4fc6163c856f7fae Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 9 Nov 2023 17:24:41 +1100 Subject: [PATCH 09/12] Add script for preparing translations --- script/release/prepare | 11 +++++++++++ script/{tag_release => release/tag} | 0 script/release/update_locales | 23 +++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100755 script/release/prepare rename script/{tag_release => release/tag} (100%) create mode 100755 script/release/update_locales diff --git a/script/release/prepare b/script/release/prepare new file mode 100755 index 0000000000..cfc16b0577 --- /dev/null +++ b/script/release/prepare @@ -0,0 +1,11 @@ +#!/bin/sh + +# Execute preparation tasks for a regular patch release. Requires admin permission on the repo. +# +set -e + +# Download translations and push to master +$(dirname "$0")/update_locales + +# Bump the patch version and push the tag +$(dirname "$0")/tag diff --git a/script/tag_release b/script/release/tag similarity index 100% rename from script/tag_release rename to script/release/tag diff --git a/script/release/update_locales b/script/release/update_locales new file mode 100755 index 0000000000..186ea1c262 --- /dev/null +++ b/script/release/update_locales @@ -0,0 +1,23 @@ +#!/bin/sh + +# Download and commit the latest Transifex translations +# + +# Exit on error or uncommitted changes +# TODO: check that master matches upstream/master +set -e +if [ ! -z "$(git status --porcelain)" ]; then + echo "Aborted: git working directory is not clean." + exit 1 +fi + +echo "\n*** Checking out latest master... ***\n" +git checkout master +git pull upstream master + +echo "\n*** Downloading latest Transifex translations... ***\n" +tx pull --force +git commit -a -m "Update all locales with the latest Transifex translations" + +echo "\n*** Pushing to master... ***\n" +git push upstream master From 0f30836c1d5e9639c91a25b9ab1b3223c3994a27 Mon Sep 17 00:00:00 2001 From: Dusan Orlovic Date: Thu, 9 Nov 2023 09:45:19 +0100 Subject: [PATCH 10/12] Check for .present? for ENV GOOGLE variables --- app/views/shared/_google_maps_js.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_google_maps_js.html.haml b/app/views/shared/_google_maps_js.html.haml index 515c0220a5..73202ada9f 100644 --- a/app/views/shared/_google_maps_js.html.haml +++ b/app/views/shared/_google_maps_js.html.haml @@ -1,2 +1,2 @@ - if !ContentConfig.open_street_map_enabled - %script{src: "https://maps.googleapis.com/maps/api/js?libraries=places,geometry#{ ENV['GOOGLE_MAPS_API_KEY'] ? '&key=' + ENV['GOOGLE_MAPS_API_KEY'] : ''}#{ ENV['GOOGLE_MAPS_REGION'] ? '®ion=' + ENV['GOOGLE_MAPS_REGION'] : ''} "} + %script{src: "https://maps.googleapis.com/maps/api/js?libraries=places,geometry#{ ENV['GOOGLE_MAPS_API_KEY'].present? ? '&key=' + ENV['GOOGLE_MAPS_API_KEY'] : ''}#{ ENV['GOOGLE_MAPS_REGION'].present? ? '®ion=' + ENV['GOOGLE_MAPS_REGION'] : ''} "} From 0c6608f828d5327306672579ee8e199010b10c74 Mon Sep 17 00:00:00 2001 From: David Cook Date: Fri, 10 Nov 2023 11:46:48 +1100 Subject: [PATCH 11/12] Add comments --- .github/ISSUE_TEMPLATE/release.md | 15 ++------------- script/release/prepare | 2 ++ script/release/tag | 5 +++++ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md index e9d9864496..2412f5e7c3 100644 --- a/.github/ISSUE_TEMPLATE/release.md +++ b/.github/ISSUE_TEMPLATE/release.md @@ -10,20 +10,9 @@ assignees: '' ## 1. Preparation on Thursday - [ ] Merge pull requests in the [Ready To Go] column -- [ ] Include translations -
Command line instructions: -
-    
-    git checkout master
-    git pull upstream master
-    tx pull --force
-    git commit -a -m "Update all locales with the latest Transifex translations"
-    git push upstream master
-    
-    
-
+- [ ] Include translations: `script/release/udpate_locales` - [ ] Create a tag: - - `script/tag_release` will auto increment patch version, otherwise + - `script/release/tag` will auto increment patch version, otherwise - `git push upstream HEAD:refs/tags/vX.Y.Z` - [ ] [Draft new release]. Look at previous [releases] for inspiration. - Select new release tag diff --git a/script/release/prepare b/script/release/prepare index cfc16b0577..64eb366a17 100755 --- a/script/release/prepare +++ b/script/release/prepare @@ -4,6 +4,8 @@ # set -e +# todo: ask to confirm, and remind to check the ready to go column. + # Download translations and push to master $(dirname "$0")/update_locales diff --git a/script/release/tag b/script/release/tag index 718397ef27..1cdeb103d9 100755 --- a/script/release/tag +++ b/script/release/tag @@ -5,6 +5,8 @@ # This supports only patch releases at the moment but can be developed # further. +puts "\n*** Fetching latest release tag... ***\n" + # Fetch current tags first: `git fetch upstream --tags` @@ -18,7 +20,10 @@ latest_version = Gem::Version.new(latest_tag[1..-1]) major, minor, patch = latest_version.segments next_tag = "v#{major}.#{minor}.#{patch.succ}" +# Push the new tag +puts "\n*** Pushing new release tag #{next_tag}... ***\n" puts `git push upstream 'HEAD:refs/tags/#{next_tag}'` +# Shortcuts puts "Draft a new release with this tag: https://github.com/openfoodfoundation/openfoodnetwork/releases/new?tag=#{next_tag}&title=#{next_tag}+Code+Name" From d47128e355e2d49e96ef9abcd6ca18657ccfa918 Mon Sep 17 00:00:00 2001 From: David Cook Date: Fri, 10 Nov 2023 12:14:52 +1100 Subject: [PATCH 12/12] Describe how to choose version number Thanks Maikel for summarising this: https://community.openfoodnetwork.org/t/release-numbering/105/6 --- .github/ISSUE_TEMPLATE/release.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md index 2412f5e7c3..8d4f82b4a6 100644 --- a/.github/ISSUE_TEMPLATE/release.md +++ b/.github/ISSUE_TEMPLATE/release.md @@ -11,9 +11,10 @@ assignees: '' - [ ] Merge pull requests in the [Ready To Go] column - [ ] Include translations: `script/release/udpate_locales` -- [ ] Create a tag: - - `script/release/tag` will auto increment patch version, otherwise - - `git push upstream HEAD:refs/tags/vX.Y.Z` +- [ ] Increment version number: `git push upstream HEAD:refs/tags/vX.Y.Z` + - Major: if server changes are required (eg. provision with ofn-install) + - Minor: larger change that is irreversible (eg. migration deleting data) + - Patch: all others. Shortcut: `script/release/tag` - [ ] [Draft new release]. Look at previous [releases] for inspiration. - Select new release tag - _Generate release notes_ and check to ensure all items are arranged in the right category.