Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the name of the service in this addon to make it compatible with ember-stripe-service #29

Open
arthur5005 opened this issue May 29, 2017 · 4 comments

Comments

@arthur5005
Copy link

Due to the naming of the service bundled with this addon, there's a name collision with this addon:
https://github.com/code-corps/ember-stripe-service

It would be nice if we could use both the ember-stripe-service addon and the ember-cli-stripe together.

@vladucu
Copy link
Member

vladucu commented Jun 20, 2017

@arthur5005 sorry for the delay...I see what you mean and will consider something like this if more people ask for it.
As a work-around for now, extending the service in your app and export as a different name should do it I think.

// app/services/my-stripe.js
export { default } from 'ember-cli-stripe/services/stripe';

// Using 
myStripe: Ember.inject.service()

@arthur5005
Copy link
Author

arthur5005 commented Jun 20, 2017

I think you mean to say that I should import and use ember-stripe-service under a different name.

I'm not exactly sure your workaround works tbh, the problem I was having was that ember-cli-stripe was accidentally importing ember-stripe-service as the service to use internally.

With the exact same name in the project:

stripe: Ember.inject.service()

is ambiguous, remember: components & services are not namespaced or free of collisions from external actors inside your addon.

@vladucu
Copy link
Member

vladucu commented Jun 20, 2017

@arthur5005 thanks, makes sense!
I don't really think we considered other similar addons when we named this service

@slateb
Copy link

slateb commented Oct 4, 2017

@arthur5005 were you able to get the 2 addons working together?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants