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

Exclude files with no extension from precompile #499

Conversation

jrafanie
Copy link
Member

@jrafanie jrafanie commented Sep 4, 2014

https://bugzilla.redhat.com/show_bug.cgi?id=1135050

Fixes the issue precompiling assets with sprockets >= 2.4.4:
"Asset logical path has no extension: codemirror-4.2/AUTHORS"

See the reported upstream issue here[1].
The commit that started this issue is here [2].

This has been an issue in many versions of sprockets since v2.4.4:
v2.12.1 v2.12.0 v2.11.1 v2.11.0 v2.10.1 v2.10.0 v2.9.3 v2.9.2 v2.9.1 v2.9.0 v2.8.2 v2.8.1 v2.8.0 v2.7.0 v2.6.0 v2.5.0 v2.4.5 v2.4.4

The solutions found in [1] were to either:
a) rename assets to add a file extension (such as AUTHORS -> AUTHORS.txt)
b) modify the config.assets.precompile Proc to whitelist which file extensions that were desired or to exclude files without an extension.

[1] sstephenson/sprockets#347
[2] sstephenson/sprockets@5dbd7c6

@chessbyte chessbyte added this to the Sprint 12 - Sept 9, 2014 milestone Sep 4, 2014
@jrafanie
Copy link
Member Author

jrafanie commented Sep 4, 2014

Note: codemirror has many files with no extension that cause sprockets 2.4.4+ to break during asset precompilation:

# find app/assets -type f ! -name "*.*"
app/assets/javascripts/codemirror-4.2/AUTHORS
app/assets/javascripts/codemirror-4.2/bin/compress
app/assets/javascripts/codemirror-4.2/bin/lint
app/assets/javascripts/codemirror-4.2/bin/release
app/assets/javascripts/codemirror-4.2/bin/source-highlight
app/assets/javascripts/codemirror-4.2/LICENSE

@jrafanie jrafanie force-pushed the exclude_files_with_no_extension_from_precompile branch from 9309a6d to e9b2084 Compare September 4, 2014 16:35
@jrafanie
Copy link
Member Author

jrafanie commented Sep 4, 2014

cc @Fryguy @kbrock @dclarizio all that for ''
💣

@Fryguy Fryguy removed the appliance label Sep 4, 2014
@Fryguy
Copy link
Member

Fryguy commented Sep 4, 2014

What does the config.asset_path change do? We still have assets in public, so will they be messed up?

EDIT: I read the comment...just still don't get it 😄

@kbrock
Copy link
Member

kbrock commented Sep 4, 2014

I read the comment... I read that the config option is ignored, so we just commented it out.

@jrafanie
Copy link
Member Author

jrafanie commented Sep 4, 2014

@Fryguy I assumed we were using asset pipeline only so it was confusing we set asset path which is ignored with the pipeline. If we are using both, I'll drop the commit

@dclarizio
Copy link

@jrafanie I think timelines had an issue with pipeline, so that's still in public and I still see the XML/SWF charts library in there as well.

https://bugzilla.redhat.com/show_bug.cgi?id=1135050

Fixes the issue precompiling assets with sprockets >= 2.4.4:
"Asset logical path has no extension: codemirror-4.2/AUTHORS"

See the reported upstream issue here[1].
The commit that started this issue is here [2].

This has been an issue in many versions of sprockets since v2.4.4:
v2.12.1  v2.12.0 v2.11.1 v2.11.0 v2.10.1 v2.10.0 v2.9.3 v2.9.2 v2.9.1 v2.9.0 v2.8.2 v2.8.1 v2.8.0 v2.7.0 v2.6.0 v2.5.0 v2.4.5 v2.4.4

The solutions found in [1] were to either:
a) rename assets to add a file extension (such as AUTHORS -> AUTHORS.txt)
b) modify the config.assets.precompile Proc to whitelist which file extensions that were desired or to exclude files without an extension.

[1] sstephenson/sprockets#347
[2] sstephenson/sprockets@5dbd7c6
@jrafanie jrafanie force-pushed the exclude_files_with_no_extension_from_precompile branch from e9b2084 to 569d0d8 Compare September 4, 2014 17:48
@miq-bot
Copy link
Member

miq-bot commented Sep 4, 2014

Checked commit jrafanie@569d0d8 with rubocop 0.21.0
1 file checked, 0 offenses detected
Everything looks good. 🍪

@jrafanie
Copy link
Member Author

jrafanie commented Sep 4, 2014

Ok @Fryguy @dclarizio @kbrock dropped the asset_path commit since we're half using the pipeline. Opened #502 for using the asset pipeline fully.

Fryguy added a commit that referenced this pull request Sep 4, 2014
…_from_precompile

Exclude files with no extension from precompile
@Fryguy Fryguy merged commit 226498a into ManageIQ:master Sep 4, 2014
@Fryguy Fryguy deleted the exclude_files_with_no_extension_from_precompile branch September 4, 2014 19:12
@kbrock
Copy link
Member

kbrock commented Sep 5, 2014

👍 good find / solution

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

Successfully merging this pull request may close these issues.

6 participants