simple_admin_auth 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98c29dd68bd81a74dea530e3ea8ca8ba68269af6
4
- data.tar.gz: 4cd9263c01366f771ef4f5d393907d5822a4425f
3
+ metadata.gz: 1a51f3f683ce73420e6650166618575cc9909421
4
+ data.tar.gz: b1c88dca7905f43ba7ed76ab1890fa13e462cdf6
5
5
  SHA512:
6
- metadata.gz: ea4985da24de96b94f27ec7574c8ab4b0afbf17559ec5efae1ec7916ba299c83ee7ba580cf30e548db108223c095172ea1794a6ec3925db595a7c5a1ed88884a
7
- data.tar.gz: ee994b9bc4c4e9ce25c0c8553771478d108bac033dc51164af2dc81563fae59d9e7cc5101caad9978df288561e682ef8d447f0ac2a9f1e30e29411c36c31a9dc
6
+ metadata.gz: 5d0d4ed426f856c653cd61bee754c857b9f1794a9ec714684a68fbcce1f769e93f8b76802ad0b870bba4630c2b080c6bfa80aa67103e57a35d427abba1e97b8b
7
+ data.tar.gz: e9362cc0715c3e52da81bde31d4dc1d1f0cfc015fb71eafa17ea6f0038838fceb17544aaa4d5bab18a6eaed23b139816d74af32826f491fb5e70c842b6b2de4c
data/README.md CHANGED
@@ -26,29 +26,34 @@ An user may be logged out by linking to `/auth/admin/logout`, or by clearing `se
26
26
 
27
27
  ## Usage with Sinatra/Rack-based apps
28
28
 
29
- require 'rack/builder'
30
- require 'simple_admin_auth'
31
- require 'simple_admin_auth/rack'
32
-
33
- app = Rack::Builder.new do
34
- use Rack::Session::Cookie, secret: 'change_me'
35
-
36
- use SimpleAdminAuth::Builder do
37
- provider :google_apps, :domain => 'yourdomain.com', :name => 'admin'
38
- end
39
-
40
- map "/your_protected_area" do
41
- use SimpleAdminAuth::Rack
42
- run YourProtectedArea.new
43
- end
44
-
45
- map "/" do
46
- use SimpleAdminAuth::Application
47
- run YourMainSite.new
29
+ Sample config.ru:
30
+
31
+ require 'rack/builder'
32
+ require 'simple_admin_auth'
33
+ require 'simple_admin_auth/rack'
34
+ require 'rack/cascade'
35
+
36
+ app = Rack::Builder.new do
37
+ use Rack::Session::Cookie, secret: 'change_me'
38
+
39
+ use SimpleAdminAuth::Builder do
40
+ provider :google_apps, :domain => 'yourdomain.com', :name => 'admin'
41
+ end
42
+
43
+ map "/your_protected_area" do
44
+ use SimpleAdminAuth::Rack
45
+ run YourProtectedArea.new
46
+ end
47
+
48
+ map "/" do
49
+ run Rack::Cascade.new [
50
+ YourMainSite.new,
51
+ SimpleAdminAuth::Application
52
+ ]
53
+ end
48
54
  end
49
- end
50
55
 
51
- run app
56
+ run app
52
57
 
53
58
 
54
59
  ## Contributing
@@ -5,6 +5,7 @@ module SimpleAdminAuth
5
5
  enable :inline_templates
6
6
  set :raise_errors, true
7
7
  set :show_exceptions, false
8
+ set :logging, nil
8
9
 
9
10
  def self.get_or_post(path, opts={}, &block)
10
11
  get(path, opts, &block)
@@ -1,3 +1,3 @@
1
1
  module SimpleAdminAuth
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_admin_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ralf Kistner