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

Make options available in all Blueprint hooks as this.options #5421

Merged
merged 1 commit into from Feb 4, 2016

Conversation

trentmwillis
Copy link
Member

Currently, not all the available Blueprint hooks receive the options hash (e.g., filesPath and normalizeEntityName). This is a simple change to ensure that all hooks can access the options via this.options.

cc @rwjblue

@rwjblue
Copy link
Member

rwjblue commented Feb 3, 2016

I'm 👍 on passing in options. Can you add a test that confirms this.options is present in files hook (or another hook if there are easier ones)?

@trentmwillis
Copy link
Member Author

Will add a test. Would you want me to pass this.options into filesPath as an argument (e.g., this.filesPath(this.options))? Or should just having this.options be fine?

@trentmwillis
Copy link
Member Author

Added tests. I noticed that most of the blueprint hooks didn't really have any tests, so I just added some simple ones to make sure they get called with the proper arguments during install/uninstall.

Also documented filesPath as one of the available hooks and set it up so that it got options as an argument (similar to the other hooks).

@rwjblue
Copy link
Member

rwjblue commented Feb 4, 2016

Awesome, thank you!

rwjblue added a commit that referenced this pull request Feb 4, 2016
Make options available in all Blueprint hooks as this.options
@rwjblue rwjblue merged commit fe68827 into ember-cli:master Feb 4, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants