Sha256: f9c7f1a9edddb45fe21fd02ef36ce3441f140a649deca784ebfa66f8638a3c7f

Contents?: true

Size: 374 Bytes

Versions: 30

Compression:

Stored size: 374 Bytes

Contents

module Locomotive::Steam
  module Middlewares

    class Robots

      include Helpers

      attr_accessor_initialize :app

      def call(env)
        if env['PATH_INFO'] == '/robots.txt'
          site = env['steam.site']
          render_response(site[:robots_txt] || '', 200, 'text/plain')
        else
          app.call(env)
        end
      end

    end

  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

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