| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Pathname doesn't respond to to_path
|
|
|
|
|
| |
The PR #8756 uses Sprockets for resolving files that already exists on disk, for those files their extensions don't need to be rewritten.
Fixes #9803
|
|\
| |
| | |
Fix javascript_include_tag when no js runtime is available
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In a production environment where the assets have been precompiled, we
don't want an assets compile step to happen on the application server at
all. To ensure this, a js runtime may not be available on the app
servers. In this environment, pages using javascript_include_tag for
assets with non-standard or chained extensions were throwing 500 errors.
For instance, `javascript_include_tag('jquery.min')` would blow up.
Sprockets was attempting to build the assets being included during the
rewrite_extension step (responsible for appending a '.js' extension to
assets being included by the basename rather than a fully qualified
name). This was happening as a step to resolve #6310, which required
checking for the presence of an asset with a non-standard extension
before appending the extension.
We can check for the presence of an asset without invoking the asset
build step by using Sprockets' resolve method, which will search for the
base file without building it (and is the method that find_asset uses
internally to get the path to the asset before attempting to build it).
When rewriting the extension on an asset, these are the steps:
- If the source does not have an extension, assume that the default
extension is desired and append it.
- If there is an extension and it doesn't match the default extension,
check to see if a file with the precise name specified exists amongst
the assets; if it is present, do not append the default extension.
(This is the step that resolves #6310).
|
|/
|
|
|
| |
- addresses the problem by calling flatten on asset array before calling uniq.
- adds note to CHANGELOG.
|
| |
|
|
|
|
|
|
| |
This reverts commit 54f55746a70a7091341e84236498203118a7fbb4.
Reason: the last commit fixed the failing case
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 1ac19c11792a745cd654f02dfaed8e93f95b3c70.
Conflicts:
actionpack/CHANGELOG.md
Reason: This is causing failures in the railties build.
See http://travis-ci.org/#!/rails/rails/jobs/2491787
Related with #7672
|
|
|
|
|
|
|
| |
Previously, the `asset_path` internals only respected the `:digest`
option, but ignored the global config setting. This meant that
`config.digest = false` could not be used in conjunction with
`config.compile = false` this corrects the behavior.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the fix done in 39f9f02a, there are cases that will not work
correctly. If you have file with "2 extensions", like foo.min.js and you
reference the file without extension, like:
javascript_include_tag "foo.min"
it will fail because sprockets finds foo.min.js with foo.min argument.
This commit fixes this case and will get the right file even when
referrencing it without extension.
(closes #6598)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should lookup if asset without appended extension exists.
When sprockets are disabled the asset tag helpers incorporate
this logic. When sprockets are enabled we should have the same
logic.
For example, we have style.ext file in app/assets/stylesheets and
we use stylesheet_link_tag in the layout. In this case we should
have /assets/style.ext instead of /assets/style.ext.css in the
output.
Closes #6310
|
|
|
|
| |
sprockets/helpers/rails_helper.rb discard duplicated assets
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
throw Sprockets::FileOutsidePaths exception anymore
|
|
|
|
|
|
|
|
| |
assets_path.
Conflicts:
actionpack/test/template/sprockets_helper_test.rb
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Give precedence to `config.digest = false` over the existence of manifest.yml asset digests
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
completely avoid the digest generation.
|
|
|
|
|
|
| |
Sprockets. Fix #2435
See https://github.com/rails/sass-rails/issues/42 for details
|
| |
|
|\
| |
| | |
Add config.allow_debugging option
|
| |
| |
| |
| | |
param can be passed by user
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
| |
If two different environments are configured to use the pipeline, but
one has an extra step (such as compression) then without taking the
environment into account you may end up serving wrong assets
|
|
|
|
| |
warnings because of a missing instance variable
|
| |
|
| |
|
| |
|
|
|
| |
Unfortunately #respond_to?(:controller) won't work as suggested, nor will respond_to?(:params), as #controller is present and #params is delegated to #controller. #delegate makes respond_to? return true regardless whether the target responds to it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
config.action_controller.default_asset_host_protocol
It's best to leave this unset.
When unset the :request protocol is used whenever it can be and
:relative is used in the other situations.
When set to :request then assets hosts will be disabled when there
is no request in scope and will use the request protocol whenever a
request is in scope.
If set to :relative, then a relative protocol is always used except
for stylesheet link tags which must use the :request protocol to
avoid double downloads in IE6&7.
Conflicts:
actionpack/lib/sprockets/helpers/rails_helper.rb
actionpack/test/template/sprockets_helper_test.rb
|
|
|
|
|
|
|
|
|
|
| |
used during asset precompilation.
Conflicts:
actionpack/lib/action_view/asset_paths.rb
actionpack/lib/sprockets/helpers/rails_helper.rb
actionpack/test/template/sprockets_helper_test.rb
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
override the old behavior
|
|
|
|
| |
extensions
|
| |
|