Commit da1ac64ab7939b92df9c9a5d20f2ae960bf1fd98
1 parent
d4faecd1
Exists in
master
and in
29 other branches
rails3: write cached assets to a cache/ subdirectory
This fixes a problem with the packaged production environment where Rails 3 expects write access to the entire directory instead of to just the file it actually needs to write
Showing
6 changed files
with
5 additions
and
9 deletions
Show diff stats
app/helpers/layout_helper.rb
@@ -33,7 +33,7 @@ module LayoutHelper | @@ -33,7 +33,7 @@ module LayoutHelper | ||
33 | plugins_stylesheets = @plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') } | 33 | plugins_stylesheets = @plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') } |
34 | 34 | ||
35 | output = '' | 35 | output = '' |
36 | - output += stylesheet_link_tag standard_stylesheets, :cache => 'cache' | 36 | + output += stylesheet_link_tag standard_stylesheets, :cache => 'cache/application' |
37 | output += stylesheet_link_tag template_stylesheet_path | 37 | output += stylesheet_link_tag template_stylesheet_path |
38 | output += stylesheet_link_tag icon_theme_stylesheet_path | 38 | output += stylesheet_link_tag icon_theme_stylesheet_path |
39 | output += stylesheet_link_tag jquery_ui_theme_stylesheet_path | 39 | output += stylesheet_link_tag jquery_ui_theme_stylesheet_path |
app/views/layouts/_javascript.html.erb
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | 'jquery-ui-1.8.2.custom.min', 'jquery.scrollTo', 'jquery.form.js', 'jquery-validation/jquery.validate', | 3 | 'jquery-ui-1.8.2.custom.min', 'jquery.scrollTo', 'jquery.form.js', 'jquery-validation/jquery.validate', |
4 | 'jquery.cookie', 'jquery.ba-bbq.min.js', 'reflection', 'jquery.tokeninput', | 4 | 'jquery.cookie', 'jquery.ba-bbq.min.js', 'reflection', 'jquery.tokeninput', |
5 | 'add-and-join', 'report-abuse', 'catalog', 'manage-products', | 5 | 'add-and-join', 'report-abuse', 'catalog', 'manage-products', |
6 | -'jquery-ui-timepicker-addon', 'application.js', 'rails.js', :cache => 'cache-general' %> | 6 | +'jquery-ui-timepicker-addon', 'application.js', 'rails.js', :cache => 'cache/application' %> |
7 | 7 | ||
8 | <% language = FastGettext.locale %> | 8 | <% language = FastGettext.locale %> |
9 | <% %w{messages methods}.each do |type| %> | 9 | <% %w{messages methods}.each do |type| %> |
app/views/layouts/chat.html.erb
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <meta name="description" content="<%= @environment.name %>" /> | 6 | <meta name="description" content="<%= @environment.name %>" /> |
7 | <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" /> | 7 | <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" /> |
8 | <%= noosfero_javascript %> | 8 | <%= noosfero_javascript %> |
9 | - <%= javascript_include_tag 'prototype', 'jquery.scrollabletab', 'strophejs-1.0.1/strophe', 'jquery.emoticon', '../designs/icons/pidgin/emoticons.js', 'ba-linkify', 'jquery.ba-hashchange', 'jquery.sound', 'chat', :cache => 'cache-chat' %> | 9 | + <%= javascript_include_tag 'prototype', 'jquery.scrollabletab', 'strophejs-1.0.1/strophe', 'jquery.emoticon', '../designs/icons/pidgin/emoticons.js', 'ba-linkify', 'jquery.ba-hashchange', 'jquery.sound', 'chat', :cache => 'cache/chat' %> |
10 | <%= noosfero_stylesheets %> | 10 | <%= noosfero_stylesheets %> |
11 | <%= stylesheet_link_tag icon_theme_stylesheet_path %> | 11 | <%= stylesheet_link_tag icon_theme_stylesheet_path %> |
12 | <%= stylesheet_link_tag theme_stylesheet_path %> | 12 | <%= stylesheet_link_tag theme_stylesheet_path %> |
app/views/layouts/slideshow.html.erb
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | %></title> | 11 | %></title> |
12 | 12 | ||
13 | <%= stylesheet_import "slideshow" %> | 13 | <%= stylesheet_import "slideshow" %> |
14 | - <%= javascript_include_tag 'jquery-latest', 'sliderjs', 'pikachoose', :cache => 'cache-slideshow' %> | 14 | + <%= javascript_include_tag 'jquery-latest', 'sliderjs', 'pikachoose', :cache => 'cache/slideshow' %> |
15 | <script type="text/javascript"> | 15 | <script type="text/javascript"> |
16 | $(document).ready(function (){ | 16 | $(document).ready(function (){ |
17 | $("#slideshow").PikaChoose({ | 17 | $("#slideshow").PikaChoose({ |
debian/noosfero.links
@@ -7,11 +7,6 @@ etc/noosfero/plugins usr/share/noosfero/config/pl | @@ -7,11 +7,6 @@ etc/noosfero/plugins usr/share/noosfero/config/pl | ||
7 | etc/noosfero/noosfero.yml usr/share/noosfero/config/noosfero.yml | 7 | etc/noosfero/noosfero.yml usr/share/noosfero/config/noosfero.yml |
8 | etc/noosfero/local.rb usr/share/noosfero/config/local.rb | 8 | etc/noosfero/local.rb usr/share/noosfero/config/local.rb |
9 | var/lib/noosfero-data/index usr/share/noosfero/index | 9 | var/lib/noosfero-data/index usr/share/noosfero/index |
10 | -var/lib/noosfero-data/cache/cache-general.js usr/share/noosfero/public/javascripts/cache-general.js | ||
11 | -var/lib/noosfero-data/cache/cache-chat.js usr/share/noosfero/public/javascripts/cache-chat.js | ||
12 | -var/lib/noosfero-data/cache/cache-slideshow.js usr/share/noosfero/public/javascripts/cache-slideshow.js | ||
13 | -var/lib/noosfero-data/cache/cache.css usr/share/noosfero/public/stylesheets/cache.css | ||
14 | -var/lib/noosfero-data/cache/cache-media-listing.css usr/share/noosfero/public/stylesheets/cache-media-listing.css | ||
15 | var/lib/noosfero-data/cache usr/share/noosfero/public/javascripts/cache | 10 | var/lib/noosfero-data/cache usr/share/noosfero/public/javascripts/cache |
16 | var/lib/noosfero-data/cache usr/share/noosfero/public/stylesheets/cache | 11 | var/lib/noosfero-data/cache usr/share/noosfero/public/stylesheets/cache |
17 | var/lib/noosfero-data/public/articles usr/share/noosfero/public/articles | 12 | var/lib/noosfero-data/public/articles usr/share/noosfero/public/articles |