Environment detection helpers
# File lib/bootstrap-sass.rb, line 40 def asset_pipeline? defined?(::Sprockets) end
# File lib/bootstrap-sass.rb, line 35 def assets_path @assets_path ||= File.join gem_path, 'vendor', 'assets' end
# File lib/bootstrap-sass.rb, line 44 def compass? defined?(::Compass) end
# File lib/bootstrap-sass.rb, line 27 def fonts_path File.join assets_path, 'fonts' end
Paths
# File lib/bootstrap-sass.rb, line 19 def gem_path @gem_path ||= File.expand_path '..', File.dirname(__FILE__) end
# File lib/bootstrap-sass.rb, line 31 def javascripts_path File.join assets_path, 'javascripts' end
Inspired by Kaminari
# File lib/bootstrap-sass.rb, line 6 def load! require 'bootstrap-sass/sass_functions' register_compass_extension if compass? if rails? require 'sass-rails' register_rails_engine end configure_sass end
# File lib/bootstrap-sass.rb, line 48 def rails? defined?(::Rails) end
# File lib/bootstrap-sass.rb, line 23 def stylesheets_path File.join assets_path, 'stylesheets' end