Nothing Special   »   [go: up one dir, main page]

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

Apply clean-base-url to config.rootURL #6600

Merged
merged 1 commit into from
Dec 23, 2016
Merged

Apply clean-base-url to config.rootURL #6600

merged 1 commit into from
Dec 23, 2016

Conversation

nathanhammond
Copy link
Contributor
@nathanhammond nathanhammond commented Dec 22, 2016

So here's the deal: this is an improvement but it is actually a change. This method has not changed:

We would populate the base tag with / if the provided value was falsey, but the config value would always be the original as specified by the user.

Flipping through the switchover commit you can see that we didn't adjust what appears in the config module in any way.

I'm in favor of this change since this is what we do internally for all usages. Exposing it to the user in the "canonical" format is probably a better decision. However it is a change and could be considered breaking. I require a +1 from @rwjblue and @Turbo87 to ship.

Closes #6599. Discarding this also should close #6599.

Copy link
Member
@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any obvious problems with this change, but the code could use a comment since it's not obvious that calculateRootURL only appends a / at the end if necessary.

@nathanhammond
Copy link
Contributor Author

@Turbo87 I added a comment. It doesn't merely ensure leading/trailing slashes since it runs things through clean-base-url so I described the intent, not the result.

@rwjblue
Copy link
Member
rwjblue commented Dec 23, 2016

@homu r+

@homu
Copy link
Contributor
homu commented Dec 23, 2016

📌 Commit 502a523 has been approved by rwjblue

@homu
Copy link
Contributor
homu commented Dec 23, 2016

⌛ Testing commit 502a523 with merge 47af2e3...

homu added a commit that referenced this pull request Dec 23, 2016
Apply clean-base-url to config.rootURL

So here's the deal: this is an improvement but it is actually a change. This method has not changed:
- [In 2.4, before all `baseURL` changes.](https://github.com/ember-cli/ember-cli/blob/v2.4.3/lib/broccoli/ember-app.js#L1656-L1663)
- [In `master` after changes.](https://github.com/ember-cli/ember-cli/blob/9e674547c82fa6747895e2b5b7f6a53e73d0226f/lib/broccoli/ember-app.js#L1752-L1759)

We would populate the `base` tag with `/` if the provided value was falsey, but the config value would always be the original as specified by the user.

[Flipping through the switchover commit you can see that we didn't adjust what appears in the config module in any way.](#5792)

I'm in favor of this change since this is what we do internally for all usages. Exposing it to the user in the "canonical" format is probably a better decision. However it _is_ a change and could be considered breaking. I require a +1 from @rwjblue and @Turbo87 to ship.

Closes #6599. Discarding this also should close #6599.
@homu
Copy link
Contributor
homu commented Dec 23, 2016

☀️ Test successful - status

@homu homu merged commit 502a523 into master Dec 23, 2016
@nathanhammond nathanhammond deleted the clean-root-url branch December 23, 2016 14:32
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.

Lost assertion when rootURL does not end in /.
4 participants