1 require 'bootstrap-sass/version'
6 register_compass_extension if compass?
21 @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
25 File.join assets_path, 'stylesheets'
29 File.join assets_path, 'fonts'
33 File.join assets_path, 'javascripts'
37 @assets_path ||= File.join gem_path, 'assets'
40 # Environment detection helpers
46 defined?(::Compass::Frameworks)
62 ::Sass.load_paths << stylesheets_path
64 # bootstrap requires minimum precision of 8, see https://github.com/twbs/bootstrap-sass/issues/409
65 ::Sass::Script::Number.precision = [8, ::Sass::Script::Number.precision].max
68 def register_compass_extension
69 ::Compass::Frameworks.register(
71 :version => Bootstrap::VERSION,
73 :stylesheets_directory => stylesheets_path,
74 :templates_directory => File.join(gem_path, 'templates')
78 def register_rails_engine
79 require 'bootstrap-sass/engine'
83 Lotus::Assets.sources << assets_path
86 def register_sprockets
87 Sprockets.append_path(stylesheets_path)
88 Sprockets.append_path(fonts_path)
89 Sprockets.append_path(javascripts_path)