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

Static view registrations with package root asset specifications #1377

Merged
merged 3 commits into from
Nov 13, 2014

Conversation

tilgovi
Copy link
Contributor

@tilgovi tilgovi commented Jul 10, 2014

I'm not entirely sure this isn't the intended behavior, but I ran into this and couldn't find anyone discussing exactly this in a previous PR or issue.

Rather than bother you all with whether or not to fix/change this, I thought it was a good opportunity to dig in and just see how some of the internals work to try to fix it.

Here's a PR with a failing test in one commit and then a subsequent commit that fixes it and adds a CHANGES comment.

Let me know if I'm mistaken and this is inappropriate or something needs re-working / re-wording since it's my first time contributing to Pyramid and I may have missed some aspect of process / policy.

Thanks!

tilgovi added a commit to hypothesis/h that referenced this pull request Jul 18, 2014
There are a number of reasons to isolate the static assets into their
own directory.

- An edge case in Pyramid: Pylons/pyramid#1377
- Make serving them with a reverse proxy safer by ensuring that no code
  or configuration lives beneath the static directory
- Cleanliness

To avoid a big move happening shortly after this, also rename some of
the asset subdirectories to close #1317.

- js -> scripts
- css -> stylesheets
- lib -> scripts/vendor
- lib/images -> images
- browser/chrome/js/background.js -> browser/chrome/background.js
- browser/chrome/public/js/destroy.js -> browser/chrome/public/destroy.js

Finally, the locale directory was totally busted. The annotator.po file
included is the defualt locale, and it should have been .pot. Since it
includes only the default strings, there's no reason to serve it. I've
stripped it and we'll reinstate it correctly later.

Close #1311
tilgovi added a commit to hypothesis/h that referenced this pull request Jul 18, 2014
There are a number of reasons to isolate the static assets into their
own directory.

- An edge case in Pyramid: Pylons/pyramid#1377
- Make serving them with a reverse proxy safer by ensuring that no code
  or configuration lives beneath the static directory
- Cleanliness

To avoid a big move happening shortly after this, also rename some of
the asset subdirectories to close #1317.

- js -> scripts
- css -> stylesheets
- lib -> scripts/vendor
- lib/images -> images
- browser/chrome/js/background.js -> browser/chrome/background.js
- browser/chrome/public/js/destroy.js -> browser/chrome/public/destroy.js

Finally, the locale directory was totally busted. The annotator.po file
included is the defualt locale, and it should have been .pot. Since it
includes only the default strings, there's no reason to serve it. I've
stripped it and we'll reinstate it correctly later.

Close #1311
@mmerickel
Copy link
Member

This fix looks good. Can you push another commit signing the contributors.txt?

@tilgovi tilgovi force-pushed the package-root-static-view-spec branch from 4339608 to 0b0551c Compare November 11, 2014 08:43
@tilgovi tilgovi force-pushed the package-root-static-view-spec branch from 0b0551c to 0b0ea0a Compare November 11, 2014 08:46
@tilgovi
Copy link
Contributor Author

tilgovi commented Nov 11, 2014

@mmerickel rebased, tweaked the changes message, and added myself to contributors. Thanks!

@tseaver
Copy link
Member

tseaver commented Nov 11, 2014

LGTM.

mmerickel added a commit that referenced this pull request Nov 13, 2014
Static view registrations with package root asset specifications
@mmerickel mmerickel merged commit af02904 into Pylons:master Nov 13, 2014
@mmerickel
Copy link
Member

Thanks again @tilgovi!

@tilgovi tilgovi deleted the package-root-static-view-spec branch November 13, 2014 21:57
@tilgovi
Copy link
Contributor Author

tilgovi commented Nov 13, 2014

Cheers.

@mmerickel mmerickel added this to the 1.6 milestone Feb 6, 2015
nickstenning pushed a commit to hypothesis/browser-extension that referenced this pull request Jul 8, 2016
There are a number of reasons to isolate the static assets into their
own directory.

- An edge case in Pyramid: Pylons/pyramid#1377
- Make serving them with a reverse proxy safer by ensuring that no code
  or configuration lives beneath the static directory
- Cleanliness

To avoid a big move happening shortly after this, also rename some of
the asset subdirectories to close #1317.

- js -> scripts
- css -> stylesheets
- lib -> scripts/vendor
- lib/images -> images
- browser/chrome/js/background.js -> browser/chrome/background.js
- browser/chrome/public/js/destroy.js -> browser/chrome/public/destroy.js

Finally, the locale directory was totally busted. The annotator.po file
included is the defualt locale, and it should have been .pot. Since it
includes only the default strings, there's no reason to serve it. I've
stripped it and we'll reinstate it correctly later.

Close #1311
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.

3 participants