Sha256: ab0157332bf9a2ccdce26aea4c51910ba8bd8875a230b9b3ec1cdc5a9fa15782

Contents?: true

Size: 1.02 KB

Versions: 24

Compression:

Stored size: 1.02 KB

Contents

require 'active_support/all'
require 'dashing-contrib/version'

# configuration helpers
require 'dashing-contrib/configuration'

# history module and overall states management
require 'dashing-contrib/history'
require 'dashing-contrib/bottles/dashing'
require 'dashing-contrib/bottles/time'

# additional routes
require 'dashing-contrib/routes'

# contrib job extension
require 'dashing-contrib/runnable_job'
require 'dotenv'


module DashingContrib
  class << self
    attr_writer :configuration
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield configuration if block_given?
    self.configure_sprockets
    Dotenv.load
  end

  private
  def self.configure_sprockets
    configuration.template_paths.each do |path|
      self.append_sprockets_path(path)
    end
  end

  def self.append_sprockets_path(path)
    puts "append to sprockets path: #{path}"
    puts Sinatra::Application.settings.sprockets

    Sinatra::Application.settings.sprockets.append_path(path)
  end
end


Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
dashing-contrib-0.2.9 lib/dashing-contrib.rb
dashing-contrib-0.2.8 lib/dashing-contrib.rb
dashing-contrib-0.2.7 lib/dashing-contrib.rb
dashing-contrib-0.2.6 lib/dashing-contrib.rb
dashing-contrib-0.2.5 lib/dashing-contrib.rb
dashing-contrib-0.2.4 lib/dashing-contrib.rb
dashing-contrib-0.2.3 lib/dashing-contrib.rb
dashing-contrib-0.2.2 lib/dashing-contrib.rb
dashing-contrib-0.2.1 lib/dashing-contrib.rb
dashing-contrib-0.2.0 lib/dashing-contrib.rb
dashing-contrib-0.1.14 lib/dashing-contrib.rb
dashing-contrib-0.1.12 lib/dashing-contrib.rb
dashing-contrib-0.1.11 lib/dashing-contrib.rb
dashing-contrib-0.1.10 lib/dashing-contrib.rb
dashing-contrib-0.1.9 lib/dashing-contrib.rb
dashing-contrib-0.1.8 lib/dashing-contrib.rb
dashing-contrib-0.1.7 lib/dashing-contrib.rb
dashing-contrib-0.1.6 lib/dashing-contrib.rb
dashing-contrib-0.1.5 lib/dashing-contrib.rb
dashing-contrib-0.1.4 lib/dashing-contrib.rb