GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

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/rel_1-8-0@718 
7063305b-7217-0410-af8c-cdc13e5119b9
nex3 (author)
Sun Jan 06 21:04:46 -0800 2008
commit  d80abe6e90ee79cce534b0996d0b8919088d1a28
tree    acdba16fc0ae7b3bdefcf210c38ddd8214ee1417
parent  8f2af28102bc5e7df23f5dd8ff26892554edc50f
...
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.