1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Steve Klabnik
afb053b4d3 Respect absolute paths in compute_source_path.
When using compute_source_path to determine the full path of an
asset, if our source begins with '/', we don't want to include
the directory. Examples are illustrative:

> compute_source_path("foo", "stylesheets", "css")
=> "/Users/steve/src/my_app/public/stylesheets/foo.css"
> compute_source_path("/foo", "stylesheets", "css")
=> "/Users/steve/src/my_app/public/foo.css"

Before this patch, the second example would return the same as the
first.

Fixes #5680.
2012-06-16 18:06:15 +02:00
Andrew White
1ef12fd172 Remove fixture files with Windows incompatible filenames
Windows doesn't allow `\ / : * ? " < > |` in filenames so create
the fixture files at runtime and ignore the incompatible ones when
running on Windows.
2012-02-20 04:46:45 +00:00
Andrew White
ceb288b8ce Fix ActionDispatch::Static to serve files with unencoded PCHAR
RFC 3986[1] allows sub-delim characters in path segments unencoded,
however Rack::File requires them to be encoded so we use URI's
unescape method to leave them alone and then escape them again.

Also since the path gets passed to Dir[] we need to escape any glob
characters in the path.

[1]: http://www.ietf.org/rfc/rfc3986.txt
2012-02-17 14:07:48 +00:00
Sergey Nartimov
d07b2f3e29 escape static file path to prevent double unescaping 2012-02-16 21:50:07 +03:00
kennyj
1ec5c2674f Add testcase for non english filename. Related to #2982. 2012-02-05 22:34:29 +09:00
Joshua Peek
ef58194129 Move Rails::Static into ActionDispatch 2009-09-26 11:37:42 -05:00
Pratik Naik
9533e0eca7 Ignore everything under test/fixtures/public/absolute 2009-07-27 17:21:52 +01:00
Christos Zisopoulos
18a97a6601 Handle missing javascript/stylesheets assets by raising an exception
An exception will be raised if a local javascript/stylesheet file included
by the stylesheet_link_tag or javascript_include_tag can not be found.

When caching is enabled, we use atomic_write to ensure that the cache file
is not created with zero length.

Signed-off-by: Michael Koziarski <michael@koziarski.com>

[#2738 state:committed]
2009-06-26 16:47:15 +12:00
Joshua Peek
b598baf813 ignore absolute tmp directory 2009-06-25 14:52:58 -05:00
José Valim
2ecc678ed6 Added localized rescue (404.da.html) [#1835 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-02-02 17:56:22 +01:00
Damian Janowski
91320f2a80 Add :recursive option to javascript_include_tag and stylesheet_link_tag to be used along with :all. [#480 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-08 13:50:59 +01:00
Stephen Celis
89237fe07e Scripts and styles with multiple dots in the filename should cache 2008-04-12 18:43:38 -05:00
Jeremy Kemper
d8f76e66a1 Missed adds. References #10350.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9066 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-20 16:51:06 +00:00
Jeremy Kemper
bd940d98bd Re-added ActionView::Helpers::register_javascript/stylesheet_expansion to make it easier for plugin developers to inject multiple assets. Closes #10350.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9065 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-20 16:26:04 +00:00
David Heinemeier Hansson
aad7fbde68 Added caching option to AssetTagHelper#stylesheet_link_tag and AssetTagHelper#javascript_include_tag [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6164 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-18 23:54:20 +00:00
Jeremy Kemper
d5f642294c test javascript include with and without application.js
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5875 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-08 17:30:46 +00:00
Jeremy Kemper
f0753992ab test controller rescues
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-13 02:03:50 +00:00
David Heinemeier Hansson
91383e0426 Added automated timestamping to AssetTagHelper methods for stylesheets, javascripts, and images when Action Controller is run under Rails [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4098 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-29 20:57:53 +00:00