sinatra_warden 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -2
- data/VERSION +1 -1
- data/lib/sinatra_warden/sinatra.rb +2 -2
- data/sinatra_warden.gemspec +1 -1
- metadata +1 -1
data/Gemfile
CHANGED
@@ -5,10 +5,10 @@ gem 'warden', '>= 0.5.3'
|
|
5
5
|
|
6
6
|
only :testing do
|
7
7
|
gem 'rake'
|
8
|
-
gem 'jeweler'
|
8
|
+
gem 'jeweler'
|
9
9
|
gem 'bundler'
|
10
10
|
gem 'rspec', '~> 1.2.9', :require_as => 'spec'
|
11
|
-
gem 'yard'
|
11
|
+
gem 'yard', '~> 0.4.0'
|
12
12
|
gem 'rack-test', '~> 0.5.0', :require_as => 'rack/test'
|
13
13
|
gem 'rcov'
|
14
14
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
@@ -22,14 +22,14 @@ module Sinatra
|
|
22
22
|
# Set the currently logged in user
|
23
23
|
# Usage: self.user = @user
|
24
24
|
#
|
25
|
-
# @
|
25
|
+
# @param [User] the user you want to log in
|
26
26
|
def user=(new_user)
|
27
27
|
warden.set_user(new_user)
|
28
28
|
end
|
29
29
|
alias_method :current_user=, :user=
|
30
30
|
|
31
31
|
# Require authorization for an action
|
32
|
-
# @
|
32
|
+
# @param [String] path to redirect to if user is unauthenticated
|
33
33
|
def authorize!(failure_path=nil)
|
34
34
|
redirect(failure_path ? failure_path : options.auth_failure_path) unless authenticated?
|
35
35
|
end
|
data/sinatra_warden.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sinatra_warden}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Justin Smestad", "Daniel Neighman"]
|