diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2013-11-10 08:20:07 +0400 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2013-11-10 08:20:27 +0400 |
commit | a3a73162b93002e29fe4309fa3645184564193df (patch) | |
tree | 140fea796ab7b69e5aa99dd7656dc20006504eef | |
parent | ab024bc5ccd944c6e176e68a0f318f2961c9f006 (diff) |
Update lib/bootstrap-sass.rb
-rw-r--r-- | lib/bootstrap-sass.rb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/bootstrap-sass.rb b/lib/bootstrap-sass.rb index 5a0559a4..074a34ba 100644 --- a/lib/bootstrap-sass.rb +++ b/lib/bootstrap-sass.rb @@ -24,27 +24,29 @@ module Bootstrap configure_sass end + def gem_path + @gem_path ||= File.expand_path File.join('..'), File.dirname(__FILE__) + end + + def stylesheets_path + @stylesheets_path ||= File.join gem_path, 'vendor', 'assets', 'stylesheets' + end + private def configure_sass - ::Sass.load_paths << File.join(gem_path, 'vendor', 'assets', 'stylesheets') + ::Sass.load_paths << stylesheets_path # bootstrap requires minimum precision of 10, see https://github.com/thomas-mcdonald/bootstrap-sass/issues/409 ::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max end - def gem_path - @gem_path ||= File.expand_path File.join('..'), File.dirname(__FILE__) - end - def register_compass_extension - styles = File.join gem_path, 'vendor', 'assets', 'stylesheets' - templates = File.join gem_path, 'templates' ::Compass::Frameworks.register( 'bootstrap', :path => gem_path, - :stylesheets_directory => styles, - :templates_directory => templates + :stylesheets_directory => stylesheets_path, + :templates_directory => File.join(gem_path, 'templates') ) end |