sinatra-bouncer 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/sinatra/bouncer.rb +3 -7
  2. metadata +3 -4
@@ -24,8 +24,6 @@
24
24
  module Sinatra
25
25
  module Bouncer
26
26
  def self.registered(base_class)
27
- base_class.extend ExtensionMethods
28
-
29
27
  base_class.set :bouncer, BasicBouncer.new
30
28
 
31
29
  base_class.before do
@@ -35,10 +33,8 @@ module Sinatra
35
33
  end
36
34
  end
37
35
 
38
- module ExtensionMethods
39
- def bounce_with(&block)
40
- bouncer.bounce_with = block
41
- end
36
+ def bounce_with(&block)
37
+ bouncer.bounce_with = block
42
38
  end
43
39
 
44
40
  class BasicBouncer
@@ -91,7 +87,7 @@ module Sinatra
91
87
  if bounce_with
92
88
  bounce_with.call(instance)
93
89
  else
94
- instance.halt 401
90
+ instance.halt 403
95
91
  end
96
92
  end
97
93
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-bouncer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-05-20 00:00:00.000000000 Z
13
+ date: 2015-05-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sinatra
@@ -124,8 +124,7 @@ dependencies:
124
124
  - - ! '>='
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
- description: Bouncer brings simple authorization to Sinatra, inspired by Ryan Bates'
128
- CanCan API.
127
+ description: Bouncer brings simple authorization to Sinatra.
129
128
  email: contact@tenjin.ca
130
129
  executables: []
131
130
  extensions: []