module Solstice
Constants
- VERSION
Public Class Methods
assets_path()
click to toggle source
# File lib/solstice.rb, line 28 def assets_path @assets_path ||= File.join gem_path, 'assets' end
compass?()
click to toggle source
# File lib/solstice.rb, line 34 def compass? defined?(::Compass::Frameworks) end
fonts_path()
click to toggle source
# File lib/solstice.rb, line 22 def fonts_path File.join assets_path, 'fonts' end
gem_path()
click to toggle source
# File lib/solstice.rb, line 16 def gem_path @gem_path ||= File.expand_path '..', File.dirname(__FILE__) end
javascripts_path()
click to toggle source
# File lib/solstice.rb, line 25 def javascripts_path File.join assets_path, 'javascripts' end
load!()
click to toggle source
# File lib/solstice.rb, line 5 def load! register_compass_extension if compass? if rails? register_rails_engine elsif lotus? register_lotus elsif sprockets? register_sprockets end configure_sass end
lotus?()
click to toggle source
# File lib/solstice.rb, line 40 def lotus? defined?(::Lotus) end
rails?()
click to toggle source
# File lib/solstice.rb, line 37 def rails? defined?(::Rails) end
sprockets?()
click to toggle source
# File lib/solstice.rb, line 31 def sprockets? defined?(::Sprockets) end
stylesheets_path()
click to toggle source
# File lib/solstice.rb, line 19 def stylesheets_path File.join assets_path, 'stylesheets' end
Private Class Methods
configure_sass()
click to toggle source
# File lib/solstice.rb, line 44 def configure_sass require 'sass' ::Sass.load_paths << stylesheets_path ::Sass::Script::Number.precision = [8, ::Sass::Script::Number.precision].max end
register_compass_extension()
click to toggle source
# File lib/solstice.rb, line 49 def register_compass_extension ::Compass::Frameworks.register( 'solstice', :version => Solstice::VERSION, :path => gem_path, :stylesheets => stylesheets_path, :templates => File.join(gem_path, 'templates') ) end
register_lotus()
click to toggle source
# File lib/solstice.rb, line 58 def register_lotus Lotus::Assets.sources << assets end
register_sprockets()
click to toggle source
# File lib/solstice.rb, line 61 def register_sprockets Sprockets.append_path(stylesheets_path) Sprockets.append_path(fonts_path) Sprockets.append_path(javascripts_path) end