lib/ustyle.rb in ustyle-1.11.1 vs lib/ustyle.rb in ustyle-1.12.0

- old
+ new

@@ -2,18 +2,20 @@ $LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir) require "ustyle/version" require "ustyle/utils" require "ustyle/hash" +require "ustyle/middleware/icon_middleware" module Ustyle class << self def load! require "ustyle/sass_functions" require "ustyle/icons" + require "ustyle/helpers/icon_helper" - if defined?(::Rails) + if rails? require "ustyle/engine" elsif sprockets? require "ustyle/sprockets" require "ustyle/sinatra" end @@ -21,9 +23,13 @@ ::Sass.load_paths << File.join(assets_path, "stylesheets") end def sprockets? defined?(::Sprockets) + end + + def rails? + defined?(::Rails) end def gem_path @gem_path ||= File.expand_path "..", File.dirname(__FILE__) end