Permalink
Browse files

Support older Rails versions.

  • Loading branch information...
1 parent 66f2c9f commit 4b7992f12c7275725df79748f744e5154f30b024 @nex3 nex3 committed Sep 7, 2010
Showing with 19 additions and 0 deletions.
  1. +18 −0 init.rb
  2. +1 −0 rails/init.rb
View
18 init.rb
@@ -0,0 +1,18 @@
+begin
+ require File.join(File.dirname(__FILE__), 'lib', 'sass') # From here
+rescue LoadError
+ begin
+ require 'sass' # From gem
+ rescue LoadError => e
+ # gems:install may be run to install Haml with the skeleton plugin
+ # but not the gem itself installed.
+ # Don't die if this is the case.
+ raise e unless defined?(Rake) &&
+ (Rake.application.top_level_tasks.include?('gems') ||
+ Rake.application.top_level_tasks.include?('gems:install'))
+ end
+end
+
+# Load Sass.
+# Sass may be undefined if we're running gems:install.
+require 'sass/plugin' if defined?(Sass)
View
@@ -0,0 +1 @@
+Kernel.load File.join(File.dirname(__FILE__), '..', 'init.rb')

0 comments on commit 4b7992f

Please sign in to comment.