Sha256: 5e40c15517e30d0147e18d7011f02beb646bc7eff9d1418d2f60205534660e2f

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 KB

Contents

require 'rack'
require 'tilt'
require 'json'
require 'mime-types'
require 'content-type'
require 'class_config'
require 'forwardable'
require 'logger'
require 'hash_ext'
require 'broadcaster'

require_relative 'web/route'
require_relative 'web/router'
require_relative 'web/endpoint'
require_relative 'web/application'
require_relative 'web/template'
require_relative 'web/view_context'
require_relative 'web/render'
require_relative 'web/request'
require_relative 'web/controller'
require_relative 'web/channel'
require_relative 'web/stream'
require_relative 'web/server_sent_event'
require_relative 'web/version'

module Rasti
  module Web
    ROUTE_PARAMS = 'rack.request.route_params'

    extend ClassConfig

    attr_config :views_path, File.join(Dir.pwd, 'views')
    attr_config :template_engines, [:erb]
    attr_config :default_layout, 'layout'
    attr_config :helpers, []
    attr_config :logger, Logger.new(STDOUT)
    attr_config :channels_prefix, 'rasti-web:channels'

    after_config do |config|
      config.helpers.each { |h| ViewContext.send :include, h }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rasti-web-0.2.3 lib/rasti/web.rb
rasti-web-0.2.2 lib/rasti/web.rb