Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-sass.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas McDonald <tom@conceptcoding.co.uk>2012-05-06 22:04:49 +0400
committerThomas McDonald <tom@conceptcoding.co.uk>2012-05-06 22:04:49 +0400
commitd68959b70823ebe5076ced99c241ac227450aa3a (patch)
treede29095ac15cc15c1a47045cfc1dc7579188ebe8
parent7a25df2ac7b3bb860103cfa2c06cd182825b62ae (diff)
check for compass before rails e.g. where using compass with rails
-rw-r--r--lib/bootstrap-sass.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/bootstrap-sass.rb b/lib/bootstrap-sass.rb
index 3fc6acc0..47beeee7 100644
--- a/lib/bootstrap-sass.rb
+++ b/lib/bootstrap-sass.rb
@@ -3,16 +3,16 @@ module Bootstrap
# Inspired by Kaminari
def self.load!
- if asset_pipeline?
- require 'sass-rails' # See: https://github.com/thomas-mcdonald/bootstrap-sass/pull/4
- require 'bootstrap-sass/engine'
- require 'bootstrap-sass/rails_extentions'
- elsif compass?
+ if compass?
require 'bootstrap-sass/compass_extensions'
base = File.join(File.dirname(__FILE__), '..')
styles = File.join(base, 'vendor', 'assets', 'stylesheets')
templates = File.join(base, 'templates')
::Compass::Frameworks.register('bootstrap', :stylesheets_directory => styles, :templates_directory => templates)
+ elsif asset_pipeline?
+ require 'sass-rails' # See: https://github.com/thomas-mcdonald/bootstrap-sass/pull/4
+ require 'bootstrap-sass/engine'
+ require 'bootstrap-sass/rails_extentions'
else
raise Bootstrap::FrameworkNotFound, "bootstrap-sass requires either Rails > 3.1 or Compass, neither of which are loaded"
end