Sha256: c1dcb6edbde3dafc64c0074d139eed1bb16f01bb39c1425e5b1fa9d982aa179f

Contents?: true

Size: 1.26 KB

Versions: 12

Compression:

Stored size: 1.26 KB

Contents

require 'locomotive/common'

require_relative      'steam/configuration'
require_relative_all  'steam/decorators'
require_relative      'steam/liquid'
require_relative      'steam/errors'

require_relative      'steam/models'
require_relative_all  'steam/entities'
require_relative      'steam/repositories'
require_relative      'steam/services'

module Locomotive
  module Steam

    FRONTMATTER_REGEXP = /^(?<yaml>(---\s*\n.*?\n?)^(---\s*$\n?))?(?<template>.*)/mo

    WILDCARD = 'content_type_template'.freeze

    CONTENT_ENTRY_ENGINE_CLASS_NAME = /^Locomotive::ContentEntry(.*)$/o

    IsHTTP = /\Ahttps?:\/\//o

    class << self
      attr_writer :configuration
    end

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

    def self.reset
      @configuration = Configuration.new
    end

    def self.configure
      yield(configuration)

      require_relative 'steam/initializers'
    end

    # Shortcut to build the Rack stack
    def self.to_app
      require_relative 'steam/server'
      Server.to_app
    end

    # FIXME: not sure it will ever be needed
    # class << self
    #   def method_missing(name, *args, &block)
    #     Locomotive::Steam.configuration.public_send(name)
    #   rescue
    #     super
    #   end
    # end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
locomotivecms_steam-1.0.0.rc10 lib/locomotive/steam.rb
locomotivecms_steam-1.0.0.rc9 lib/locomotive/steam.rb
locomotivecms_steam-1.0.0.rc8 lib/locomotive/steam.rb
locomotivecms_steam-1.0.0.rc6 lib/locomotive/steam.rb
locomotivecms_steam-1.0.0.rc4 lib/locomotive/steam.rb
locomotivecms_steam-1.0.0.rc3 lib/locomotive/steam.rb
locomotivecms_steam-1.0.0.rc2 lib/locomotive/steam.rb
locomotivecms_steam-1.0.0.rc1 lib/locomotive/steam.rb
locomotivecms_steam-1.0.0.pre.beta.3 lib/locomotive/steam.rb
locomotivecms_steam-1.0.0.pre.beta.2 lib/locomotive/steam.rb
locomotivecms_steam-1.0.0.pre.beta.1 lib/locomotive/steam.rb
locomotivecms_steam-1.0.0.pre.alpha.3 lib/locomotive/steam.rb