public
Rubygem
Fork of nex3/haml
Description: HTML Abstraction Markup Language - A Markup Haiku
Homepage: http://haml.hamptoncatlin.com
Clone URL: git://github.com/chriseppstein/haml.git
Fixing a benchmark failure.

git-svn-id: svn://hamptoncatlin.com/haml/tags/stable@718 
7063305b-7217-0410-af8c-cdc13e5119b9
nex3 (author)
Sun Jan 06 21:04:46 -0800 2008
commit  e5f591000dff5fe9494a3a4c121939c2d0ccfbc1
tree    acdba16fc0ae7b3bdefcf210c38ddd8214ee1417
parent  0880f0b38794a12ad4153f78927808708a8be6b2
...
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
 
 
 
 
 
 
 
 
 
 
 
 
44
...
30
31
32
 
 
 
 
 
 
 
 
 
 
 
33
34
35
36
37
38
39
40
41
42
43
44
45
46
0
@@ -30,15 +30,17 @@ else
0
   require 'haml/template/patch'
0
 end
0
 
0
-# Update init.rb to the current version
0
-# if it's out of date.
0
-#
0
-# We can probably remove this as of v1.9,
0
-# because the new init file is sufficiently flexible
0
-# to not need updating.
0
-rails_init_file = File.join(RAILS_ROOT, 'vendor', 'plugins', 'haml', 'init.rb')
0
-haml_init_file = File.join(File.dirname(__FILE__), '..', '..', 'init.rb')
0
-if File.exists?(rails_init_file)
0
- require 'fileutils'
0
- FileUtils.cp(haml_init_file, rails_init_file) unless FileUtils.cmp(rails_init_file, haml_init_file)
0
+if defined?(RAILS_ROOT)
0
+ # Update init.rb to the current version
0
+ # if it's out of date.
0
+ #
0
+ # We can probably remove this as of v1.9,
0
+ # because the new init file is sufficiently flexible
0
+ # to not need updating.
0
+ rails_init_file = File.join(RAILS_ROOT, 'vendor', 'plugins', 'haml', 'init.rb')
0
+ haml_init_file = File.join(File.dirname(__FILE__), '..', '..', 'init.rb')
0
+ if File.exists?(rails_init_file)
0
+ require 'fileutils'
0
+ FileUtils.cp(haml_init_file, rails_init_file) unless FileUtils.cmp(rails_init_file, haml_init_file)
0
+ end
0
 end

Comments

    No one has commented yet.