Skip to content

Use relative binary path for jammit on the command-line#233

Merged
jashkenas merged 3 commits intomasterfrom
bin_root
May 21, 2012
Merged

Use relative binary path for jammit on the command-line#233
jashkenas merged 3 commits intomasterfrom
bin_root

Conversation

@samuelclay
Copy link
Copy Markdown
Member

I wrote this a while ago, but I think it's time for a pull request to at least debate its merits. Uses realpath instead of wrongpath.

* 'master' of https://github.com/documentcloud/jammit:
  Jammit 0.6.5
  Jammit 0.6.4
  fix nasty-ish bug where JS would always be recompiled, regardless.
  Accept an options parameter in Jammit::Helper#include_javascripts (cherry picked from commit 9da79ca)
  Adding command-line and config_file option for overriding PUBLIC_ROOT.
  Read JS files as UTF-8. Fixes #198
… bin_root

* 'master' of https://github.com/documentcloud/jammit:
  Fixes a typo.
  Fixed SASS test, it actually cares about single vs double quotes.
  Actually sets :jsmin as DEFAULT_JAVASCRIPT_COMPRESSOR AND :cssmin as DEFAULT_CSS_COMPRESSOR. They both are loaded inside `lib/jammit/dependencies.rb`
  cssmin and jsmin is the new minimum requirements of jammit. YUI is now optional.
  Added sass, cssmin, and jsmin to Gemfile as part of development+test requirements.
  Removed unecessary abstraction of YUI compressors.
  Refactor of Jammit.
  Late instantiation of Jammit::Compressor
  Added test for no-rewrite-relative-paths.
  Replace invalid font/* MIME types with valid ones, to suppress WebKit warnings
  Bad merge.
  Added rewrite_relative_paths.
  Erase has_rdoc
  Edit s.date = to current date time with proper format
  Fix for undefined RAILS_ENV (when running under Rake there's no Rails.env).
@jashkenas
Copy link
Copy Markdown
Member

What exactly does it fix? When does __FILE__ not work currently?

@samuelclay
Copy link
Copy Markdown
Member Author

If the binary is a symlink, then __FILE__ is pointing to the wrong place. realpath dereferences the binary, so the relative path works correctly. Ran into this issue.

jashkenas added a commit that referenced this pull request May 21, 2012
Use relative binary path for jammit on the command-line
@jashkenas jashkenas merged commit a5f80ca into master May 21, 2012
@reefdog reefdog deleted the bin_root branch October 30, 2015 16:29
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.

2 participants