hancock-client 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.
- data/README.md +3 -2
- data/Rakefile +1 -1
- data/lib/sinatra/hancock/sso.rb +5 -1
- data/spec/client.rb +0 -1
- data/spec/hancock_sinatra_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -2
- metadata +2 -2
data/README.md
CHANGED
@@ -14,13 +14,14 @@ Dependencies
|
|
14
14
|
% sudo gem sources -a http://gems.github.com
|
15
15
|
http://gems.github.com added to sources
|
16
16
|
|
17
|
-
% sudo gem install sinatra
|
18
|
-
% sudo gem install atmos-hancock
|
17
|
+
% sudo gem install sinatra hancock haml
|
19
18
|
|
20
19
|
testing
|
21
20
|
=======
|
22
21
|
Rake works but I'm not 100% sure how to test this correctly
|
23
22
|
|
23
|
+
% sudo gem install rcov rack-test rspec safariwatir cucumber
|
24
|
+
|
24
25
|
Application
|
25
26
|
===========
|
26
27
|
The goal is to make it simple to write sso enabled apps.
|
data/Rakefile
CHANGED
data/lib/sinatra/hancock/sso.rb
CHANGED
@@ -21,7 +21,11 @@ module Sinatra
|
|
21
21
|
app.helpers Hancock::SSO::Helpers
|
22
22
|
app.enable :sessions
|
23
23
|
app.disable :raise_errors
|
24
|
-
|
24
|
+
app.before do
|
25
|
+
unless request.path_info == '/sso/login'
|
26
|
+
throw(:halt, [302, {'Location' => '/sso/login'}, '']) unless session[:user_id]
|
27
|
+
end
|
28
|
+
end
|
25
29
|
|
26
30
|
app.get '/sso/login' do
|
27
31
|
if contact_id = params['id']
|
data/spec/client.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hancock-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Donohoe
|
@@ -9,7 +9,7 @@ autorequire: hancock-client
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-03-
|
12
|
+
date: 2009-03-23 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|