public
Rubygem
Description: Rails Plugin - a Ruby way to manage your stylesheets and javascripts. Don't put all your assets in your layout; define what you need where you need them.
Homepage: http://6brand.com
Clone URL: git://github.com/JackDanger/sweet_assets.git
newlines before the first asset - makes the source a little clearer
JackDanger (author)
Mon May 26 23:29:33 -0700 2008
commit  4a93ccad8732c31fd049c7829d75916553163451
tree    cf6534b2788a844cffe267744dce40b68cbd0d81
parent  5b319ef393f3fa3766496b157de6b3c98e9212fe
...
1
2
3
4
5
6
7
8
...
14
15
16
17
18
19
20
21
22
...
60
61
62
63
64
 
 
65
66
67
...
1
 
 
 
 
2
3
4
...
10
11
12
 
 
 
13
14
15
...
53
54
55
 
 
56
57
58
59
60
0
@@ -1,8 +1,4 @@
0
 require 'cgi'
0
-require 'actionpack'
0
-require 'activesupport'
0
-require 'action_controller'
0
-require 'action_view'
0
 require 'action_view/helpers/url_helper'
0
 require 'action_view/helpers/tag_helper'
0
 require 'digest/md5'
0
@@ -14,9 +10,6 @@ require 'digest/md5'
0
 # script_like :boats
0
 
0
 module SweetAssets
0
-
0
- VERSION = '2.0.1'
0
-
0
   DEFAULT_JAVASCRIPTS = ['prototype', 'effects', 'dragdrop', 'controls']
0
   SCRIPT_PLACEHOLDER = '<!--SWEET_JAVASCRIPTS-->'
0
   STYLE_PLACEHOLDER = '<!--SWEET_STYLESHEETS-->'
0
@@ -60,8 +53,8 @@ module SweetAssets
0
 
0
         def apply_sweet_assets
0
           if response.body.respond_to?(:gsub!)
0
- response.body.gsub! SweetAssets::STYLE_PLACEHOLDER, sweet_assets.tags.stylesheets
0
- response.body.gsub! SweetAssets::SCRIPT_PLACEHOLDER, sweet_assets.tags.javascripts
0
+ response.body.gsub! SweetAssets::STYLE_PLACEHOLDER, "\n#{sweet_assets.tags.stylesheets}"
0
+ response.body.gsub! SweetAssets::SCRIPT_PLACEHOLDER, "\n#{sweet_assets.tags.javascripts}"
0
           end
0
         end
0
     end

Comments

    No one has commented yet.