Skip to content

Commit

Permalink
refactor(localstripe.js): Rename JavaScript part to localstripe.js
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienverge committed Jul 10, 2019
1 parent dc73076 commit 740cb2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Element {
}

const span = document.createElement('span');
span.textContent = 'Fake Stripe: ';
span.textContent = 'localstripe: ';
domElement.appendChild(span);

const inputs = {
Expand Down
6 changes: 3 additions & 3 deletions localstripe/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ async def f(request):
app.router.add_route(method, url, func(cls, url))


def fake_stripe_js(request):
path = os.path.dirname(os.path.realpath(__file__)) + '/fake-stripe-v3.js'
def localstripe_js(request):
path = os.path.dirname(os.path.realpath(__file__)) + '/localstripe-v3.js'
with open(path) as f:
return web.Response(text=f.read(),
content_type='application/javascript')


app.router.add_get('/js.stripe.com/v3/', fake_stripe_js)
app.router.add_get('/js.stripe.com/v3/', localstripe_js)


async def config_webhook(request):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
entry_points={'console_scripts':
['localstripe=localstripe.server:start']},
package_data={
'localstripe': ['fake-stripe-v3.js'],
'localstripe': ['localstripe-v3.js'],
},
install_requires=[
'aiohttp >=2.3.2',
Expand Down

0 comments on commit 740cb2b

Please sign in to comment.