loyal_devise 2.1.7 → 2.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +16 -46
- data/app/controllers/devise/passwords_controller.rb +1 -1
- data/app/controllers/devise/registrations_controller.rb +1 -1
- data/lib/devise/controllers/helpers.rb +3 -6
- data/lib/devise/failure_app.rb +1 -8
- data/lib/devise/hooks/lockable.rb +1 -1
- data/lib/devise/mapping.rb +6 -6
- data/lib/devise/models/authenticatable.rb +4 -4
- data/lib/devise/models/confirmable.rb +4 -12
- data/lib/devise/models/database_authenticatable.rb +1 -1
- data/lib/devise/models/lockable.rb +1 -1
- data/lib/devise/models/recoverable.rb +2 -7
- data/lib/devise/models/rememberable.rb +1 -1
- data/lib/devise/{parameter_filter.rb → param_filter.rb} +1 -1
- data/lib/devise/parameter_sanitizer.rb +3 -3
- data/lib/devise/version.rb +1 -1
- data/lib/devise.rb +1 -1
- data/lib/generators/templates/README +1 -1
- data/lib/loyal_devise.rb +1 -0
- metadata +65 -301
- data/.gitignore +0 -12
- data/.travis.yml +0 -20
- data/.yardopts +0 -9
- data/CHANGELOG.rdoc +0 -936
- data/CONTRIBUTING.md +0 -14
- data/Gemfile +0 -31
- data/Gemfile.lock +0 -160
- data/devise.gemspec +0 -26
- data/devise.png +0 -0
- data/gemfiles/Gemfile.rails-3.2.x +0 -31
- data/gemfiles/Gemfile.rails-3.2.x.lock +0 -156
- data/loyal_devise.gemspec +0 -29
- data/test/controllers/custom_strategy_test.rb +0 -62
- data/test/controllers/helpers_test.rb +0 -253
- data/test/controllers/internal_helpers_test.rb +0 -120
- data/test/controllers/passwords_controller_test.rb +0 -32
- data/test/controllers/sessions_controller_test.rb +0 -85
- data/test/controllers/url_helpers_test.rb +0 -59
- data/test/delegator_test.rb +0 -19
- data/test/devise_test.rb +0 -83
- data/test/failure_app_test.rb +0 -221
- data/test/generators/active_record_generator_test.rb +0 -73
- data/test/generators/devise_generator_test.rb +0 -39
- data/test/generators/install_generator_test.rb +0 -13
- data/test/generators/mongoid_generator_test.rb +0 -23
- data/test/generators/views_generator_test.rb +0 -67
- data/test/helpers/devise_helper_test.rb +0 -51
- data/test/integration/authenticatable_test.rb +0 -699
- data/test/integration/confirmable_test.rb +0 -299
- data/test/integration/database_authenticatable_test.rb +0 -84
- data/test/integration/http_authenticatable_test.rb +0 -115
- data/test/integration/lockable_test.rb +0 -242
- data/test/integration/omniauthable_test.rb +0 -133
- data/test/integration/recoverable_test.rb +0 -335
- data/test/integration/registerable_test.rb +0 -349
- data/test/integration/rememberable_test.rb +0 -165
- data/test/integration/timeoutable_test.rb +0 -150
- data/test/integration/token_authenticatable_test.rb +0 -205
- data/test/integration/trackable_test.rb +0 -92
- data/test/mailers/confirmation_instructions_test.rb +0 -111
- data/test/mailers/reset_password_instructions_test.rb +0 -92
- data/test/mailers/unlock_instructions_test.rb +0 -87
- data/test/mapping_test.rb +0 -127
- data/test/models/authenticatable_test.rb +0 -13
- data/test/models/confirmable_test.rb +0 -443
- data/test/models/database_authenticatable_test.rb +0 -226
- data/test/models/lockable_test.rb +0 -273
- data/test/models/omniauthable_test.rb +0 -7
- data/test/models/recoverable_test.rb +0 -222
- data/test/models/registerable_test.rb +0 -7
- data/test/models/rememberable_test.rb +0 -175
- data/test/models/serializable_test.rb +0 -49
- data/test/models/timeoutable_test.rb +0 -46
- data/test/models/token_authenticatable_test.rb +0 -55
- data/test/models/trackable_test.rb +0 -13
- data/test/models/validatable_test.rb +0 -127
- data/test/models_test.rb +0 -163
- data/test/omniauth/config_test.rb +0 -57
- data/test/omniauth/url_helpers_test.rb +0 -54
- data/test/orm/active_record.rb +0 -10
- data/test/orm/mongoid.rb +0 -13
- data/test/parameter_sanitizer_test.rb +0 -51
- data/test/rails_app/Rakefile +0 -6
- data/test/rails_app/app/active_record/admin.rb +0 -6
- data/test/rails_app/app/active_record/shim.rb +0 -2
- data/test/rails_app/app/active_record/user.rb +0 -6
- data/test/rails_app/app/controllers/admins/sessions_controller.rb +0 -6
- data/test/rails_app/app/controllers/admins_controller.rb +0 -11
- data/test/rails_app/app/controllers/application_controller.rb +0 -9
- data/test/rails_app/app/controllers/home_controller.rb +0 -25
- data/test/rails_app/app/controllers/publisher/registrations_controller.rb +0 -2
- data/test/rails_app/app/controllers/publisher/sessions_controller.rb +0 -2
- data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +0 -14
- data/test/rails_app/app/controllers/users_controller.rb +0 -31
- data/test/rails_app/app/helpers/application_helper.rb +0 -3
- data/test/rails_app/app/mailers/users/mailer.rb +0 -12
- data/test/rails_app/app/mongoid/admin.rb +0 -29
- data/test/rails_app/app/mongoid/shim.rb +0 -23
- data/test/rails_app/app/mongoid/user.rb +0 -42
- data/test/rails_app/app/views/admins/index.html.erb +0 -1
- data/test/rails_app/app/views/admins/sessions/new.html.erb +0 -2
- data/test/rails_app/app/views/home/admin_dashboard.html.erb +0 -1
- data/test/rails_app/app/views/home/index.html.erb +0 -1
- data/test/rails_app/app/views/home/join.html.erb +0 -1
- data/test/rails_app/app/views/home/private.html.erb +0 -1
- data/test/rails_app/app/views/home/user_dashboard.html.erb +0 -1
- data/test/rails_app/app/views/layouts/application.html.erb +0 -24
- data/test/rails_app/app/views/users/edit_form.html.erb +0 -1
- data/test/rails_app/app/views/users/index.html.erb +0 -1
- data/test/rails_app/app/views/users/mailer/confirmation_instructions.erb +0 -1
- data/test/rails_app/app/views/users/sessions/new.html.erb +0 -1
- data/test/rails_app/bin/bundle +0 -3
- data/test/rails_app/bin/rails +0 -4
- data/test/rails_app/bin/rake +0 -4
- data/test/rails_app/config/application.rb +0 -40
- data/test/rails_app/config/boot.rb +0 -8
- data/test/rails_app/config/database.yml +0 -18
- data/test/rails_app/config/environment.rb +0 -5
- data/test/rails_app/config/environments/development.rb +0 -34
- data/test/rails_app/config/environments/production.rb +0 -84
- data/test/rails_app/config/environments/test.rb +0 -36
- data/test/rails_app/config/initializers/backtrace_silencers.rb +0 -7
- data/test/rails_app/config/initializers/devise.rb +0 -178
- data/test/rails_app/config/initializers/inflections.rb +0 -2
- data/test/rails_app/config/initializers/secret_token.rb +0 -8
- data/test/rails_app/config/initializers/session_store.rb +0 -1
- data/test/rails_app/config/routes.rb +0 -104
- data/test/rails_app/config.ru +0 -4
- data/test/rails_app/db/migrate/20100401102949_create_tables.rb +0 -74
- data/test/rails_app/db/schema.rb +0 -52
- data/test/rails_app/lib/shared_admin.rb +0 -14
- data/test/rails_app/lib/shared_user.rb +0 -25
- data/test/rails_app/public/404.html +0 -26
- data/test/rails_app/public/422.html +0 -26
- data/test/rails_app/public/500.html +0 -26
- data/test/rails_app/public/favicon.ico +0 -0
- data/test/routes_test.rb +0 -250
- data/test/support/assertions.rb +0 -40
- data/test/support/helpers.rb +0 -91
- data/test/support/integration.rb +0 -92
- data/test/support/locale/en.yml +0 -4
- data/test/support/webrat/integrations/rails.rb +0 -24
- data/test/test_helper.rb +0 -34
- data/test/test_helpers_test.rb +0 -151
- data/test/test_models.rb +0 -26
data/CONTRIBUTING.md
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
### Please read before contributing
|
2
|
-
|
3
|
-
1) Do not post questions in the issues tracker. If you have any questions about Devise, search the [Wiki](https://github.com/plataformatec/devise/wiki) or use the [Mailing List](https://groups.google.com/group/plataformatec-devise) or [Stack Overflow](http://stackoverflow.com/questions/tagged/devise).
|
4
|
-
|
5
|
-
2) If you find a security bug, **DO NOT** submit an issue here. Please send an e-mail to [developers@plataformatec.com.br](mailto:developers@plataformatec.com.br) instead.
|
6
|
-
|
7
|
-
3) Do a small search on the issues tracker before submitting your issue to see if it was already reported / fixed.
|
8
|
-
|
9
|
-
4) When reporting an issue, include Rails, Devise and Warden versions. If you are getting exceptions, please include the full backtrace.
|
10
|
-
|
11
|
-
That's it! The more information you give, the easier it becomes for us to track it down and fix it.
|
12
|
-
Ideally, you should provide an application that reproduces the error or a test case to Devise's suite.
|
13
|
-
|
14
|
-
Thanks!
|
data/Gemfile
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
gem "rails", "~> 4.0.0.rc1"
|
6
|
-
gem "omniauth", "~> 1.0.0"
|
7
|
-
gem "omniauth-oauth2", "~> 1.0.0"
|
8
|
-
gem "rdoc"
|
9
|
-
|
10
|
-
group :test do
|
11
|
-
gem "omniauth-facebook"
|
12
|
-
gem "omniauth-openid", "~> 1.0.1"
|
13
|
-
gem "webrat", "0.7.3", :require => false
|
14
|
-
gem "mocha", "~> 0.13.1", :require => false
|
15
|
-
end
|
16
|
-
|
17
|
-
platforms :jruby do
|
18
|
-
gem "activerecord-jdbc-adapter"
|
19
|
-
gem "activerecord-jdbcsqlite3-adapter"
|
20
|
-
gem "jruby-openssl"
|
21
|
-
end
|
22
|
-
|
23
|
-
platforms :ruby do
|
24
|
-
gem "sqlite3"
|
25
|
-
end
|
26
|
-
|
27
|
-
platforms :mri_19, :mri_20 do
|
28
|
-
group :mongoid do
|
29
|
-
gem "mongoid", github: "mongoid/mongoid", branch: "master"
|
30
|
-
end
|
31
|
-
end
|
data/Gemfile.lock
DELETED
@@ -1,160 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: git://github.com/mongoid/mongoid.git
|
3
|
-
revision: fe7f43430580860db6d1d89cea27eda24ab60ab1
|
4
|
-
branch: master
|
5
|
-
specs:
|
6
|
-
mongoid (4.0.0)
|
7
|
-
activemodel (~> 4.0.0.rc1)
|
8
|
-
moped (~> 1.4.2)
|
9
|
-
origin (~> 1.0)
|
10
|
-
tzinfo (~> 0.3.22)
|
11
|
-
|
12
|
-
PATH
|
13
|
-
remote: .
|
14
|
-
specs:
|
15
|
-
devise (3.0.0.rc)
|
16
|
-
bcrypt-ruby (~> 3.0)
|
17
|
-
orm_adapter (~> 0.1)
|
18
|
-
railties (>= 3.2.6, < 5)
|
19
|
-
warden (~> 1.2.1)
|
20
|
-
|
21
|
-
GEM
|
22
|
-
remote: https://rubygems.org/
|
23
|
-
specs:
|
24
|
-
actionmailer (4.0.0.rc1)
|
25
|
-
actionpack (= 4.0.0.rc1)
|
26
|
-
mail (~> 2.5.3)
|
27
|
-
actionpack (4.0.0.rc1)
|
28
|
-
activesupport (= 4.0.0.rc1)
|
29
|
-
builder (~> 3.1.0)
|
30
|
-
erubis (~> 2.7.0)
|
31
|
-
rack (~> 1.5.2)
|
32
|
-
rack-test (~> 0.6.2)
|
33
|
-
activemodel (4.0.0.rc1)
|
34
|
-
activesupport (= 4.0.0.rc1)
|
35
|
-
builder (~> 3.1.0)
|
36
|
-
activerecord (4.0.0.rc1)
|
37
|
-
activemodel (= 4.0.0.rc1)
|
38
|
-
activerecord-deprecated_finders (~> 1.0.2)
|
39
|
-
activesupport (= 4.0.0.rc1)
|
40
|
-
arel (~> 4.0.0)
|
41
|
-
activerecord-deprecated_finders (1.0.2)
|
42
|
-
activesupport (4.0.0.rc1)
|
43
|
-
i18n (~> 0.6, >= 0.6.4)
|
44
|
-
minitest (~> 4.2)
|
45
|
-
multi_json (~> 1.3)
|
46
|
-
thread_safe (~> 0.1)
|
47
|
-
tzinfo (~> 0.3.37)
|
48
|
-
arel (4.0.0)
|
49
|
-
atomic (1.1.8)
|
50
|
-
bcrypt-ruby (3.0.1)
|
51
|
-
builder (3.1.4)
|
52
|
-
erubis (2.7.0)
|
53
|
-
faraday (0.8.7)
|
54
|
-
multipart-post (~> 1.1)
|
55
|
-
hashie (1.2.0)
|
56
|
-
hike (1.2.2)
|
57
|
-
httpauth (0.2.0)
|
58
|
-
i18n (0.6.4)
|
59
|
-
json (1.7.7)
|
60
|
-
jwt (0.1.8)
|
61
|
-
multi_json (>= 1.5)
|
62
|
-
mail (2.5.3)
|
63
|
-
i18n (>= 0.4.0)
|
64
|
-
mime-types (~> 1.16)
|
65
|
-
treetop (~> 1.4.8)
|
66
|
-
metaclass (0.0.1)
|
67
|
-
mime-types (1.23)
|
68
|
-
minitest (4.7.4)
|
69
|
-
mocha (0.13.3)
|
70
|
-
metaclass (~> 0.0.1)
|
71
|
-
moped (1.4.5)
|
72
|
-
multi_json (1.7.2)
|
73
|
-
multipart-post (1.2.0)
|
74
|
-
nokogiri (1.5.9)
|
75
|
-
oauth2 (0.8.1)
|
76
|
-
faraday (~> 0.8)
|
77
|
-
httpauth (~> 0.1)
|
78
|
-
jwt (~> 0.1.4)
|
79
|
-
multi_json (~> 1.0)
|
80
|
-
rack (~> 1.2)
|
81
|
-
omniauth (1.0.3)
|
82
|
-
hashie (~> 1.2)
|
83
|
-
rack
|
84
|
-
omniauth-facebook (1.4.0)
|
85
|
-
omniauth-oauth2 (~> 1.0.2)
|
86
|
-
omniauth-oauth2 (1.0.3)
|
87
|
-
oauth2 (~> 0.8.0)
|
88
|
-
omniauth (~> 1.0)
|
89
|
-
omniauth-openid (1.0.1)
|
90
|
-
omniauth (~> 1.0)
|
91
|
-
rack-openid (~> 1.3.1)
|
92
|
-
origin (1.1.0)
|
93
|
-
orm_adapter (0.4.0)
|
94
|
-
polyglot (0.3.3)
|
95
|
-
rack (1.5.2)
|
96
|
-
rack-openid (1.3.1)
|
97
|
-
rack (>= 1.1.0)
|
98
|
-
ruby-openid (>= 2.1.8)
|
99
|
-
rack-test (0.6.2)
|
100
|
-
rack (>= 1.0)
|
101
|
-
rails (4.0.0.rc1)
|
102
|
-
actionmailer (= 4.0.0.rc1)
|
103
|
-
actionpack (= 4.0.0.rc1)
|
104
|
-
activerecord (= 4.0.0.rc1)
|
105
|
-
activesupport (= 4.0.0.rc1)
|
106
|
-
bundler (>= 1.3.0, < 2.0)
|
107
|
-
railties (= 4.0.0.rc1)
|
108
|
-
sprockets-rails (~> 2.0.0.rc4)
|
109
|
-
railties (4.0.0.rc1)
|
110
|
-
actionpack (= 4.0.0.rc1)
|
111
|
-
activesupport (= 4.0.0.rc1)
|
112
|
-
rake (>= 0.8.7)
|
113
|
-
thor (>= 0.18.1, < 2.0)
|
114
|
-
rake (10.0.4)
|
115
|
-
rdoc (4.0.1)
|
116
|
-
json (~> 1.4)
|
117
|
-
ruby-openid (2.2.3)
|
118
|
-
sprockets (2.9.3)
|
119
|
-
hike (~> 1.2)
|
120
|
-
multi_json (~> 1.0)
|
121
|
-
rack (~> 1.0)
|
122
|
-
tilt (~> 1.1, != 1.3.0)
|
123
|
-
sprockets-rails (2.0.0.rc4)
|
124
|
-
actionpack (>= 3.0)
|
125
|
-
activesupport (>= 3.0)
|
126
|
-
sprockets (~> 2.8)
|
127
|
-
sqlite3 (1.3.7)
|
128
|
-
thor (0.18.1)
|
129
|
-
thread_safe (0.1.0)
|
130
|
-
atomic
|
131
|
-
tilt (1.4.0)
|
132
|
-
treetop (1.4.12)
|
133
|
-
polyglot
|
134
|
-
polyglot (>= 0.3.1)
|
135
|
-
tzinfo (0.3.37)
|
136
|
-
warden (1.2.1)
|
137
|
-
rack (>= 1.0)
|
138
|
-
webrat (0.7.3)
|
139
|
-
nokogiri (>= 1.2.0)
|
140
|
-
rack (>= 1.0)
|
141
|
-
rack-test (>= 0.5.3)
|
142
|
-
|
143
|
-
PLATFORMS
|
144
|
-
ruby
|
145
|
-
|
146
|
-
DEPENDENCIES
|
147
|
-
activerecord-jdbc-adapter
|
148
|
-
activerecord-jdbcsqlite3-adapter
|
149
|
-
devise!
|
150
|
-
jruby-openssl
|
151
|
-
mocha (~> 0.13.1)
|
152
|
-
mongoid!
|
153
|
-
omniauth (~> 1.0.0)
|
154
|
-
omniauth-facebook
|
155
|
-
omniauth-oauth2 (~> 1.0.0)
|
156
|
-
omniauth-openid (~> 1.0.1)
|
157
|
-
rails (~> 4.0.0.rc1)
|
158
|
-
rdoc
|
159
|
-
sqlite3
|
160
|
-
webrat (= 0.7.3)
|
data/devise.gemspec
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "devise/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = "devise"
|
7
|
-
s.version = Devise::VERSION.dup
|
8
|
-
s.platform = Gem::Platform::RUBY
|
9
|
-
s.licenses = ["MIT"]
|
10
|
-
s.summary = "Flexible authentication solution for Rails with Warden"
|
11
|
-
s.email = "contact@plataformatec.com.br"
|
12
|
-
s.homepage = "http://github.com/plataformatec/devise"
|
13
|
-
s.description = "Flexible authentication solution for Rails with Warden"
|
14
|
-
s.authors = ['José Valim', 'Carlos Antônio']
|
15
|
-
|
16
|
-
s.rubyforge_project = "devise"
|
17
|
-
|
18
|
-
s.files = `git ls-files`.split("\n")
|
19
|
-
s.test_files = `git ls-files -- test/*`.split("\n")
|
20
|
-
s.require_paths = ["lib"]
|
21
|
-
|
22
|
-
s.add_dependency("warden", "~> 1.2.1")
|
23
|
-
s.add_dependency("orm_adapter", "~> 0.1")
|
24
|
-
s.add_dependency("bcrypt-ruby", "~> 3.0")
|
25
|
-
s.add_dependency("railties", ">= 3.2.6", "< 5")
|
26
|
-
end
|
data/devise.png
DELETED
Binary file
|
@@ -1,31 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gemspec :path => '..'
|
4
|
-
|
5
|
-
gem "rails", "~> 3.2.6"
|
6
|
-
gem "omniauth", "~> 1.0.0"
|
7
|
-
gem "omniauth-oauth2", "~> 1.0.0"
|
8
|
-
gem "rdoc"
|
9
|
-
|
10
|
-
group :test do
|
11
|
-
gem "omniauth-facebook"
|
12
|
-
gem "omniauth-openid", "~> 1.0.1"
|
13
|
-
gem "webrat", "0.7.3", :require => false
|
14
|
-
gem "mocha", "~> 0.13.1", :require => false
|
15
|
-
end
|
16
|
-
|
17
|
-
platforms :jruby do
|
18
|
-
gem "activerecord-jdbc-adapter"
|
19
|
-
gem "activerecord-jdbcsqlite3-adapter"
|
20
|
-
gem "jruby-openssl"
|
21
|
-
end
|
22
|
-
|
23
|
-
platforms :ruby do
|
24
|
-
gem "sqlite3"
|
25
|
-
end
|
26
|
-
|
27
|
-
platforms :mri_19, :mri_20 do
|
28
|
-
group :mongoid do
|
29
|
-
gem "mongoid", "~> 3.0"
|
30
|
-
end
|
31
|
-
end
|
@@ -1,156 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ..
|
3
|
-
specs:
|
4
|
-
devise (3.0.0.rc)
|
5
|
-
bcrypt-ruby (~> 3.0)
|
6
|
-
orm_adapter (~> 0.1)
|
7
|
-
railties (>= 3.2.6, < 5)
|
8
|
-
warden (~> 1.2.1)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: https://rubygems.org/
|
12
|
-
specs:
|
13
|
-
actionmailer (3.2.13)
|
14
|
-
actionpack (= 3.2.13)
|
15
|
-
mail (~> 2.5.3)
|
16
|
-
actionpack (3.2.13)
|
17
|
-
activemodel (= 3.2.13)
|
18
|
-
activesupport (= 3.2.13)
|
19
|
-
builder (~> 3.0.0)
|
20
|
-
erubis (~> 2.7.0)
|
21
|
-
journey (~> 1.0.4)
|
22
|
-
rack (~> 1.4.5)
|
23
|
-
rack-cache (~> 1.2)
|
24
|
-
rack-test (~> 0.6.1)
|
25
|
-
sprockets (~> 2.2.1)
|
26
|
-
activemodel (3.2.13)
|
27
|
-
activesupport (= 3.2.13)
|
28
|
-
builder (~> 3.0.0)
|
29
|
-
activerecord (3.2.13)
|
30
|
-
activemodel (= 3.2.13)
|
31
|
-
activesupport (= 3.2.13)
|
32
|
-
arel (~> 3.0.2)
|
33
|
-
tzinfo (~> 0.3.29)
|
34
|
-
activeresource (3.2.13)
|
35
|
-
activemodel (= 3.2.13)
|
36
|
-
activesupport (= 3.2.13)
|
37
|
-
activesupport (3.2.13)
|
38
|
-
i18n (= 0.6.1)
|
39
|
-
multi_json (~> 1.0)
|
40
|
-
arel (3.0.2)
|
41
|
-
bcrypt-ruby (3.0.1)
|
42
|
-
builder (3.0.4)
|
43
|
-
erubis (2.7.0)
|
44
|
-
faraday (0.8.7)
|
45
|
-
multipart-post (~> 1.1)
|
46
|
-
hashie (1.2.0)
|
47
|
-
hike (1.2.2)
|
48
|
-
httpauth (0.2.0)
|
49
|
-
i18n (0.6.1)
|
50
|
-
journey (1.0.4)
|
51
|
-
json (1.7.7)
|
52
|
-
jwt (0.1.8)
|
53
|
-
multi_json (>= 1.5)
|
54
|
-
mail (2.5.3)
|
55
|
-
i18n (>= 0.4.0)
|
56
|
-
mime-types (~> 1.16)
|
57
|
-
treetop (~> 1.4.8)
|
58
|
-
metaclass (0.0.1)
|
59
|
-
mime-types (1.23)
|
60
|
-
mocha (0.13.3)
|
61
|
-
metaclass (~> 0.0.1)
|
62
|
-
mongoid (3.1.3)
|
63
|
-
activemodel (~> 3.2)
|
64
|
-
moped (~> 1.4.2)
|
65
|
-
origin (~> 1.0)
|
66
|
-
tzinfo (~> 0.3.22)
|
67
|
-
moped (1.4.5)
|
68
|
-
multi_json (1.7.3)
|
69
|
-
multipart-post (1.2.0)
|
70
|
-
nokogiri (1.5.9)
|
71
|
-
oauth2 (0.8.1)
|
72
|
-
faraday (~> 0.8)
|
73
|
-
httpauth (~> 0.1)
|
74
|
-
jwt (~> 0.1.4)
|
75
|
-
multi_json (~> 1.0)
|
76
|
-
rack (~> 1.2)
|
77
|
-
omniauth (1.0.3)
|
78
|
-
hashie (~> 1.2)
|
79
|
-
rack
|
80
|
-
omniauth-facebook (1.4.0)
|
81
|
-
omniauth-oauth2 (~> 1.0.2)
|
82
|
-
omniauth-oauth2 (1.0.3)
|
83
|
-
oauth2 (~> 0.8.0)
|
84
|
-
omniauth (~> 1.0)
|
85
|
-
omniauth-openid (1.0.1)
|
86
|
-
omniauth (~> 1.0)
|
87
|
-
rack-openid (~> 1.3.1)
|
88
|
-
origin (1.1.0)
|
89
|
-
orm_adapter (0.4.0)
|
90
|
-
polyglot (0.3.3)
|
91
|
-
rack (1.4.5)
|
92
|
-
rack-cache (1.2)
|
93
|
-
rack (>= 0.4)
|
94
|
-
rack-openid (1.3.1)
|
95
|
-
rack (>= 1.1.0)
|
96
|
-
ruby-openid (>= 2.1.8)
|
97
|
-
rack-ssl (1.3.3)
|
98
|
-
rack
|
99
|
-
rack-test (0.6.2)
|
100
|
-
rack (>= 1.0)
|
101
|
-
rails (3.2.13)
|
102
|
-
actionmailer (= 3.2.13)
|
103
|
-
actionpack (= 3.2.13)
|
104
|
-
activerecord (= 3.2.13)
|
105
|
-
activeresource (= 3.2.13)
|
106
|
-
activesupport (= 3.2.13)
|
107
|
-
bundler (~> 1.0)
|
108
|
-
railties (= 3.2.13)
|
109
|
-
railties (3.2.13)
|
110
|
-
actionpack (= 3.2.13)
|
111
|
-
activesupport (= 3.2.13)
|
112
|
-
rack-ssl (~> 1.3.2)
|
113
|
-
rake (>= 0.8.7)
|
114
|
-
rdoc (~> 3.4)
|
115
|
-
thor (>= 0.14.6, < 2.0)
|
116
|
-
rake (10.0.4)
|
117
|
-
rdoc (3.12.2)
|
118
|
-
json (~> 1.4)
|
119
|
-
ruby-openid (2.2.3)
|
120
|
-
sprockets (2.2.2)
|
121
|
-
hike (~> 1.2)
|
122
|
-
multi_json (~> 1.0)
|
123
|
-
rack (~> 1.0)
|
124
|
-
tilt (~> 1.1, != 1.3.0)
|
125
|
-
sqlite3 (1.3.7)
|
126
|
-
thor (0.18.1)
|
127
|
-
tilt (1.4.0)
|
128
|
-
treetop (1.4.12)
|
129
|
-
polyglot
|
130
|
-
polyglot (>= 0.3.1)
|
131
|
-
tzinfo (0.3.37)
|
132
|
-
warden (1.2.1)
|
133
|
-
rack (>= 1.0)
|
134
|
-
webrat (0.7.3)
|
135
|
-
nokogiri (>= 1.2.0)
|
136
|
-
rack (>= 1.0)
|
137
|
-
rack-test (>= 0.5.3)
|
138
|
-
|
139
|
-
PLATFORMS
|
140
|
-
ruby
|
141
|
-
|
142
|
-
DEPENDENCIES
|
143
|
-
activerecord-jdbc-adapter
|
144
|
-
activerecord-jdbcsqlite3-adapter
|
145
|
-
devise!
|
146
|
-
jruby-openssl
|
147
|
-
mocha (~> 0.13.1)
|
148
|
-
mongoid (~> 3.0)
|
149
|
-
omniauth (~> 1.0.0)
|
150
|
-
omniauth-facebook
|
151
|
-
omniauth-oauth2 (~> 1.0.0)
|
152
|
-
omniauth-openid (~> 1.0.1)
|
153
|
-
rails (~> 3.2.6)
|
154
|
-
rdoc
|
155
|
-
sqlite3
|
156
|
-
webrat (= 0.7.3)
|
data/loyal_devise.gemspec
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
# require "devise/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = "loyal_devise"
|
7
|
-
# s.version = Devise::VERSION.dup
|
8
|
-
s.version = '2.1.7'
|
9
|
-
s.platform = Gem::Platform::RUBY
|
10
|
-
s.licenses = ["MIT"]
|
11
|
-
s.summary = "Flexible authentication solution for Rails with Warden"
|
12
|
-
s.email = "andywang7259@gmail.com"
|
13
|
-
s.homepage = "http://github.com/blogsoso/devise"
|
14
|
-
s.description = "Flexible authentication solution for Rails with Warden"
|
15
|
-
s.authors = ['happy']
|
16
|
-
|
17
|
-
# s.rubyforge_project = "devise"
|
18
|
-
|
19
|
-
s.files = `git ls-files`.split("\n")
|
20
|
-
s.test_files = `git ls-files -- test/*`.split("\n")
|
21
|
-
s.require_paths = ["lib"]
|
22
|
-
|
23
|
-
s.add_dependency("loyal_warden")
|
24
|
-
|
25
|
-
# s.add_dependency("warden", "~> 1.2.1")
|
26
|
-
s.add_dependency("orm_adapter", "~> 0.1")
|
27
|
-
s.add_dependency("bcrypt-ruby", "~> 3.0")
|
28
|
-
s.add_dependency("railties", ">= 3.2.6", "< 5")
|
29
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'ostruct'
|
3
|
-
require 'warden/strategies/base'
|
4
|
-
require 'devise/test_helpers'
|
5
|
-
|
6
|
-
class CustomStrategyController < ActionController::Base
|
7
|
-
def new
|
8
|
-
warden.authenticate!(:custom_strategy)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
# These tests are to prove that a warden strategy can successfully
|
13
|
-
# return a custom response, including a specific status code and
|
14
|
-
# custom http response headers. This does work in production,
|
15
|
-
# however, at the time of writing this, the Devise test helpers do
|
16
|
-
# not recognise the custom response and proceed to calling the
|
17
|
-
# Failure App. This makes it impossible to write tests for a
|
18
|
-
# strategy that return a custom response with Devise.
|
19
|
-
class CustomStrategy < Warden::Strategies::Base
|
20
|
-
def authenticate!
|
21
|
-
custom_headers = { "X-FOO" => "BAR" }
|
22
|
-
response = Rack::Response.new("BAD REQUEST", 400, custom_headers)
|
23
|
-
custom! response.finish
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
class CustomStrategyTest < ActionController::TestCase
|
28
|
-
tests CustomStrategyController
|
29
|
-
|
30
|
-
include Devise::TestHelpers
|
31
|
-
|
32
|
-
setup do
|
33
|
-
Warden::Strategies.add(:custom_strategy, CustomStrategy)
|
34
|
-
end
|
35
|
-
|
36
|
-
teardown do
|
37
|
-
Warden::Strategies._strategies.delete(:custom_strategy)
|
38
|
-
end
|
39
|
-
|
40
|
-
test "custom strategy can return its own status code" do
|
41
|
-
ret = get :new
|
42
|
-
|
43
|
-
# check the returned rack array
|
44
|
-
assert ret.is_a?(Array)
|
45
|
-
assert_equal 400, ret.first
|
46
|
-
|
47
|
-
# check the saved response as well. This is purely so that the response is available to the testing framework
|
48
|
-
# for verification. In production, the above array would be delivered directly to Rack.
|
49
|
-
assert_response 400
|
50
|
-
end
|
51
|
-
|
52
|
-
test "custom strategy can return custom headers" do
|
53
|
-
ret = get :new
|
54
|
-
|
55
|
-
# check the returned rack array
|
56
|
-
assert ret.is_a?(Array)
|
57
|
-
assert_equal ret.third['X-FOO'], 'BAR'
|
58
|
-
|
59
|
-
# check the saved response headers as well.
|
60
|
-
assert_equal response.headers['X-FOO'], 'BAR'
|
61
|
-
end
|
62
|
-
end
|