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

Any way to configure a api namespace for FactoryGuyTestMixin? #16

Closed
taboularasa opened this issue Aug 15, 2014 · 6 comments
Closed

Any way to configure a api namespace for FactoryGuyTestMixin? #16

taboularasa opened this issue Aug 15, 2014 · 6 comments

Comments

@taboularasa
Copy link

I've added a namepace to my RESTAdapter:

DS.RESTAdapter.reopen({
  namespace: 'api/v1'
});

FactoryGuyTestMixin request handlers ( e.g. FactoryGuyTestMixin#handleFind ) construct a url that's inferred from the name of the factory:
https://github.com/danielspaniel/ember-data-factory-guy/blob/c22a7c4bf459ba8c49e1be15afc520d66d95992b/src/factory_guy_test_mixin.js#L127

Would it be reasonable to add a configuration setting to FactoryGuyTestMixin for a base url and then prepend that to the url while building the mockjax request here?:
https://github.com/danielspaniel/ember-data-factory-guy/blob/c22a7c4bf459ba8c49e1be15afc520d66d95992b/src/factory_guy_test_mixin.js#L69

@danielspaniel
Copy link
Collaborator

@taboularasa .. I am on internet free vacation for another few days .. will get to back to you on monday :)

@taboularasa
Copy link
Author

@danielspaniel 👍

@danielspaniel
Copy link
Collaborator

@taboularasa .. good idea .. will get this out soon.

@taboularasa
Copy link
Author

@danielspaniel awesome thanks, let me know if I can help at all

@danielspaniel
Copy link
Collaborator

@taboularasa .. version 0.5.3 fixes this issue by using the underlying RESTAdapter to build the URL .. which I should have been doing in the first place ( so thanks for pointing this out )

@taboularasa
Copy link
Author

👏

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

2 participants