Sha256: c9dfb5eeb319b54f874c89a632ce8916791a7520112ab1c9503de45f93295454

Contents?: true

Size: 490 Bytes

Versions: 33

Compression:

Stored size: 490 Bytes

Contents

module Locomotive::Steam
  module Middlewares

    class DefaultEnv

      attr_accessor_initialize :app

      def call(env)
        request = Rack::Request.new(env)

        env['steam.request']        = request
        env['steam.services']       = build_services(request)
        env['steam.liquid_assigns'] = {}

        app.call(env)
      end

      private

      def build_services(request)
        Locomotive::Steam::Services.build_instance(request)
      end

    end

  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
locomotivecms_steam-1.5.0.beta3 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.5.0.beta2 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.5.0.beta1 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.4.1 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.4.0 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.4.0.rc2 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.4.0.rc1 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.4.0.pre.rc.1 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.3.0 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.3.0.rc2 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.1.2 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.2.1 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.3.0.rc1 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.2.0 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.2.0.rc3 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.2.0.rc2 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.2.0.rc1 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.2.0.beta1 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.1.1 lib/locomotive/steam/middlewares/default_env.rb
locomotivecms_steam-1.1.0 lib/locomotive/steam/middlewares/default_env.rb