contour 1.0.0.beta11 → 1.0.0.beta12
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/CHANGELOG.rdoc +1 -1
- data/README.rdoc +0 -8
- data/app/assets/stylesheets/bootstrap-base-overrides.css +4 -0
- data/config/initializers/devise.rb +29 -0
- data/contour.gemspec +4 -4
- data/lib/contour/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +1320 -0
- metadata +28 -28
data/CHANGELOG.rdoc
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
* All icons other than Gentleface 16x16 have been removed
|
19
19
|
* User model no longer requires a name attribute or method
|
20
20
|
* Authentication model is no longer required to be the user model
|
21
|
-
* Authentication model creation no longer assigns application specific variables
|
21
|
+
* Authentication model creation no longer assigns application specific variables, i.e. first_name, last_name
|
22
22
|
|
23
23
|
== 0.10.2
|
24
24
|
|
data/README.rdoc
CHANGED
@@ -76,20 +76,12 @@ Create a root in your config/routes.rb
|
|
76
76
|
|
77
77
|
Add the following to your app/models/user.rb
|
78
78
|
|
79
|
-
attr_accessible :first_name, :last_name
|
80
|
-
|
81
|
-
# Model Validation
|
82
|
-
validates_presence_of :first_name
|
83
|
-
validates_presence_of :last_name
|
84
|
-
|
85
79
|
# Model Relationships
|
86
80
|
has_many :authentications
|
87
81
|
|
88
82
|
def apply_omniauth(omniauth)
|
89
83
|
unless omniauth['info'].blank?
|
90
84
|
self.email = omniauth['info']['email'] if email.blank?
|
91
|
-
self.first_name = omniauth['info']['first_name'] if first_name.blank?
|
92
|
-
self.last_name = omniauth['info']['last_name'] if last_name.blank?
|
93
85
|
end
|
94
86
|
authentications.build( provider: omniauth['provider'], uid: omniauth['uid'] )
|
95
87
|
end
|
@@ -1,3 +1,32 @@
|
|
1
1
|
Devise.setup do |config|
|
2
2
|
config.router_name = :main_app
|
3
3
|
end
|
4
|
+
|
5
|
+
module Devise
|
6
|
+
class FailureApp < ActionController::Metal
|
7
|
+
|
8
|
+
protected
|
9
|
+
|
10
|
+
def scope_path
|
11
|
+
opts = {}
|
12
|
+
route = :"new_#{scope}_session_path"
|
13
|
+
opts[:format] = request_format unless skip_format?
|
14
|
+
# The 2.1.0.rc of Devise has the following line. I've commented it out since it
|
15
|
+
# breaks subdomain redirects when failing to login.
|
16
|
+
# Until 2.1.0.rc2 is out, use the following from:
|
17
|
+
# https://github.com/plataformatec/devise/commit/ad0aed3ba5ab58cbe2f54b1a5bd760642c1c689c
|
18
|
+
# Thanks @josevalim !
|
19
|
+
opts[:script_name] = Rails.application.config.relative_url_root
|
20
|
+
|
21
|
+
context = send(Devise.available_router_name)
|
22
|
+
|
23
|
+
if context.respond_to?(route)
|
24
|
+
context.send(route, opts)
|
25
|
+
elsif respond_to?(:root_path)
|
26
|
+
root_path(opts)
|
27
|
+
else
|
28
|
+
"/"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/contour.gemspec
CHANGED
@@ -25,14 +25,14 @@ Gem::Specification.new do |s|
|
|
25
25
|
|
26
26
|
s.add_dependency 'rails', '~> 3.2.3'
|
27
27
|
s.add_dependency 'jquery-rails', '~> 2.0.2'
|
28
|
-
s.add_dependency 'devise', '~> 2.0.
|
29
|
-
s.add_dependency 'omniauth', '~> 1.0
|
28
|
+
s.add_dependency 'devise', '~> 2.1.0.rc'
|
29
|
+
s.add_dependency 'omniauth', '~> 1.1.0'
|
30
30
|
s.add_dependency 'omniauth-openid', '~> 1.0.1'
|
31
31
|
s.add_dependency 'omniauth-ldap', '~> 1.0.2'
|
32
32
|
s.add_dependency 'omniauth-twitter', '~> 0.0.11'
|
33
|
-
s.add_dependency 'omniauth-facebook', '~> 1.
|
33
|
+
s.add_dependency 'omniauth-facebook', '~> 1.3.0'
|
34
34
|
s.add_dependency 'omniauth-linkedin', '~> 0.0.6'
|
35
|
-
s.add_dependency 'omniauth-cas', '~> 0.0.
|
35
|
+
s.add_dependency 'omniauth-cas', '~> 0.0.7'
|
36
36
|
|
37
37
|
s.add_development_dependency "sqlite3"
|
38
38
|
end
|
data/lib/contour/version.rb
CHANGED
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|