sinatra_warden 0.1.4 → 0.1.5
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.
- data/VERSION +1 -1
- data/lib/sinatra_warden.rb +0 -1
- data/sinatra_warden.gemspec +2 -2
- data/spec/sinatra_warden_spec.rb +5 -5
- data/spec/spec.opts +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/lib/sinatra_warden.rb
CHANGED
data/sinatra_warden.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
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.5"
|
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"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-12-08}
|
13
13
|
s.description = %q{basic helpers and authentication methods for using warden with sinatra also providing some hooks into Rack::Flash}
|
14
14
|
s.email = %q{justin.smestad@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/sinatra_warden_spec.rb
CHANGED
@@ -45,7 +45,7 @@ describe "Sinatra::Warden" do
|
|
45
45
|
|
46
46
|
it "should allow access if user is logged in" do
|
47
47
|
post '/login', 'email' => 'justin.smestad@gmail.com', 'password' => 'thedude'
|
48
|
-
last_request.env['warden'].authenticated?.should
|
48
|
+
last_request.env['warden'].authenticated?.should be_true
|
49
49
|
get '/dashboard'
|
50
50
|
last_response.body.should == "My Dashboard"
|
51
51
|
end
|
@@ -54,7 +54,7 @@ describe "Sinatra::Warden" do
|
|
54
54
|
context "the user helper" do
|
55
55
|
before(:each) do
|
56
56
|
post '/login', 'email' => 'justin.smestad@gmail.com', 'password' => 'thedude'
|
57
|
-
last_request.env['warden'].authenticated?.should
|
57
|
+
last_request.env['warden'].authenticated?.should be_true
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should be aliased to current_user" do
|
@@ -79,7 +79,7 @@ describe "Sinatra::Warden" do
|
|
79
79
|
context "the logged_in/authenticated? helper" do
|
80
80
|
before(:each) do
|
81
81
|
post '/login', 'email' => 'justin.smestad@gmail.com', 'password' => 'thedude'
|
82
|
-
last_request.env['warden'].authenticated?.should
|
82
|
+
last_request.env['warden'].authenticated?.should be_true
|
83
83
|
end
|
84
84
|
|
85
85
|
it "should be aliased as logged_in?" do
|
@@ -89,7 +89,7 @@ describe "Sinatra::Warden" do
|
|
89
89
|
|
90
90
|
it "should return false when a user is not authenticated" do
|
91
91
|
get '/logout'
|
92
|
-
last_request.env['warden'].authenticated?.should
|
92
|
+
last_request.env['warden'].authenticated?.should be_false
|
93
93
|
|
94
94
|
get '/check_login'
|
95
95
|
last_response.body.should == "Get out!"
|
@@ -100,7 +100,7 @@ describe "Sinatra::Warden" do
|
|
100
100
|
context "the warden helper" do
|
101
101
|
before(:each) do
|
102
102
|
post '/login', 'email' => 'justin.smestad@gmail.com', 'password' => 'thedude'
|
103
|
-
last_request.env['warden'].authenticated?.should
|
103
|
+
last_request.env['warden'].authenticated?.should be_true
|
104
104
|
end
|
105
105
|
|
106
106
|
it "returns the environment variables from warden" do
|
data/spec/spec.opts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--color
|
1
|
+
-fs --color
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra_warden
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Smestad
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-12-08 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|