rack-simple-auth 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/rack-simple-auth.rb +2 -3
  2. metadata +1 -1
@@ -1,5 +1,4 @@
1
- require 'rack'
2
- require 'rack/request'
1
+ %w[ rubygems rack rack/request openssl ].each { |s| require s }
3
2
 
4
3
  module Rack
5
4
  class SimpleAuth
@@ -16,7 +15,7 @@ module Rack
16
15
  if authenticated? request.cookies
17
16
  @app.call(env)
18
17
  else
19
- [302, {'Location' => "#{@login_url}?return_to=#{request.url}"}, ['You must be logged in to see this.']]
18
+ [302, {'Content-Type' => 'text/plain', 'Location' => "#{@login_url}?return_to=#{request.url}"}, ['You must be logged in to see this.']]
20
19
  end
21
20
  end
22
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-simple-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: