From ae15504aa15ba91089d8c9f84fbc418fde40cd96 Mon Sep 17 00:00:00 2001 From: Thomas Rausch Date: Sat, 23 Nov 2024 18:15:37 +0100 Subject: [PATCH 1/2] upgrade localstripe to 1.15.6 and release stripe extensions 0.2.0 --- README.md | 2 +- stripe/localstack_stripe/__init__.py | 2 +- stripe/setup.cfg | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bc8eafc..4b5d196 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ You can install the respective extension by calling `localstack install =1.3 install_requires = - stevedore>=3.4 plux>=1.3 - localstack-localstripe>=1.13.8 + localstack-localstripe>=1.15.6 test_requires = pytest>=6.2.4 From bfe53c0462c3ea60398e37932b658cc3b1081ee5 Mon Sep 17 00:00:00 2001 From: Thomas Rausch Date: Sat, 23 Nov 2024 18:19:51 +0100 Subject: [PATCH 2/2] add /_extension submount --- stripe/localstack_stripe/extension.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/stripe/localstack_stripe/extension.py b/stripe/localstack_stripe/extension.py index 1944252..d719471 100644 --- a/stripe/localstack_stripe/extension.py +++ b/stripe/localstack_stripe/extension.py @@ -25,7 +25,7 @@ def update_gateway_routes(self, router: http.Router[http.RouteHandler]): # a ProxyHandler forwards all incoming requests to the backend URL endpoint = http.ProxyHandler(self.backend_url) - # add path routes for localhost:4566/stripe + # add path routes for localhost:4566/stripe (backwards compatibility) router.add( "/stripe", endpoint=endpoint, @@ -34,6 +34,15 @@ def update_gateway_routes(self, router: http.Router[http.RouteHandler]): "/stripe/", endpoint=endpoint, ) + # modern mounts + router.add( + "/_extension/stripe", + endpoint=endpoint, + ) + router.add( + "/_extension/stripe/", + endpoint=endpoint, + ) # add alternative host routes for stripe.localhost.localstack.cloud:4566 router.add( "/",