Sha256: cba630d518674bb3bcaf92576c34bebc110b377bbbe21fec736caa19450c4fcb

Contents?: true

Size: 1.05 KB

Versions: 4

Compression:

Stored size: 1.05 KB

Contents

require 'bootstrap-sass'
require 'font-awesome-sass'
require 'nprogress-rails'
require 'icheck-rails'
require 'momentjs-rails'
require 'bootstrap-daterangepicker-rails'
require 'fastclick-rails'
require 'chart-js-rails'
require 'flot-rails'
require 'datejs-rails'
require 'switchery-rails'
require 'select2-rails'
require 'parsley-rails'

module Gentelella
  class << self
    def load!
      register_rails_engine if rails?
    end

    def gem_path
      @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
    end

    def stylesheets_path
      File.join assets_path, 'stylesheets'
    end

    def fonts_path
      File.join assets_path, 'fonts'
    end

    def javascripts_path
      File.join assets_path, 'javascripts'
    end

    def assets_path
      @assets_path ||= File.join gem_path, 'assets'
    end

    # Environment detection helpers
    def sprockets?
      defined?(::Sprockets)
    end

    def rails?
      defined?(::Rails)
    end

    private

    def register_rails_engine
      require 'gentelella/engine'
    end
  end
end

Gentelella.load!

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gentelella-rails-0.1.3 lib/gentelella-rails.rb
gentelella-rails-0.1.2 lib/gentelella-rails.rb
gentelella-rails-0.1.1 lib/gentelella-rails.rb
gentelella-rails-0.1.0 lib/gentelella-rails.rb