devise 3.5.10 → 4.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +265 -1129
- data/MIT-LICENSE +2 -1
- data/README.md +291 -96
- data/app/controllers/devise/confirmations_controller.rb +3 -1
- data/app/controllers/devise/omniauth_callbacks_controller.rb +8 -6
- data/app/controllers/devise/passwords_controller.rb +7 -4
- data/app/controllers/devise/registrations_controller.rb +39 -18
- data/app/controllers/devise/sessions_controller.rb +9 -7
- data/app/controllers/devise/unlocks_controller.rb +4 -2
- data/app/controllers/devise_controller.rb +25 -12
- data/app/helpers/devise_helper.rb +23 -18
- data/app/mailers/devise/mailer.rb +10 -4
- data/app/views/devise/confirmations/new.html.erb +2 -2
- data/app/views/devise/mailer/email_changed.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +3 -3
- data/app/views/devise/passwords/new.html.erb +2 -2
- data/app/views/devise/registrations/edit.html.erb +9 -5
- data/app/views/devise/registrations/new.html.erb +4 -4
- data/app/views/devise/sessions/new.html.erb +4 -4
- data/app/views/devise/shared/_error_messages.html.erb +15 -0
- data/app/views/devise/shared/_links.html.erb +7 -7
- data/app/views/devise/unlocks/new.html.erb +2 -2
- data/config/locales/en.yml +5 -2
- data/lib/devise/controllers/helpers.rb +30 -27
- data/lib/devise/controllers/rememberable.rb +3 -1
- data/lib/devise/controllers/scoped_views.rb +2 -0
- data/lib/devise/controllers/sign_in_out.rb +37 -14
- data/lib/devise/controllers/store_location.rb +25 -7
- data/lib/devise/controllers/url_helpers.rb +3 -1
- data/lib/devise/delegator.rb +2 -0
- data/lib/devise/encryptor.rb +6 -4
- data/lib/devise/failure_app.rb +75 -38
- data/lib/devise/hooks/activatable.rb +2 -0
- data/lib/devise/hooks/csrf_cleaner.rb +2 -0
- data/lib/devise/hooks/forgetable.rb +2 -0
- data/lib/devise/hooks/lockable.rb +6 -1
- data/lib/devise/hooks/proxy.rb +3 -1
- data/lib/devise/hooks/rememberable.rb +2 -0
- data/lib/devise/hooks/timeoutable.rb +4 -2
- data/lib/devise/hooks/trackable.rb +2 -0
- data/lib/devise/mailers/helpers.rb +7 -4
- data/lib/devise/mapping.rb +3 -1
- data/lib/devise/models/authenticatable.rb +57 -31
- data/lib/devise/models/confirmable.rb +90 -29
- data/lib/devise/models/database_authenticatable.rb +93 -22
- data/lib/devise/models/lockable.rb +11 -5
- data/lib/devise/models/omniauthable.rb +2 -0
- data/lib/devise/models/recoverable.rb +33 -21
- data/lib/devise/models/registerable.rb +4 -0
- data/lib/devise/models/rememberable.rb +6 -11
- data/lib/devise/models/timeoutable.rb +2 -0
- data/lib/devise/models/trackable.rb +15 -1
- data/lib/devise/models/validatable.rb +10 -3
- data/lib/devise/models.rb +3 -1
- data/lib/devise/modules.rb +2 -0
- data/lib/devise/omniauth/config.rb +2 -0
- data/lib/devise/omniauth/url_helpers.rb +14 -5
- data/lib/devise/omniauth.rb +2 -0
- data/lib/devise/orm/active_record.rb +5 -1
- data/lib/devise/orm/mongoid.rb +6 -2
- data/lib/devise/parameter_filter.rb +4 -0
- data/lib/devise/parameter_sanitizer.rb +139 -65
- data/lib/devise/rails/routes.rb +48 -37
- data/lib/devise/rails/warden_compat.rb +3 -10
- data/lib/devise/rails.rb +7 -16
- data/lib/devise/secret_key_finder.rb +27 -0
- data/lib/devise/strategies/authenticatable.rb +3 -1
- data/lib/devise/strategies/base.rb +2 -0
- data/lib/devise/strategies/database_authenticatable.rb +11 -4
- data/lib/devise/strategies/rememberable.rb +2 -0
- data/lib/devise/test/controller_helpers.rb +167 -0
- data/lib/devise/test/integration_helpers.rb +63 -0
- data/lib/devise/test_helpers.rb +7 -124
- data/lib/devise/time_inflector.rb +2 -0
- data/lib/devise/token_generator.rb +3 -41
- data/lib/devise/version.rb +3 -1
- data/lib/devise.rb +57 -40
- data/lib/generators/active_record/devise_generator.rb +29 -10
- data/lib/generators/active_record/templates/migration.rb +4 -2
- data/lib/generators/active_record/templates/migration_existing.rb +4 -2
- data/lib/generators/devise/controllers_generator.rb +3 -1
- data/lib/generators/devise/devise_generator.rb +5 -3
- data/lib/generators/devise/install_generator.rb +18 -5
- data/lib/generators/devise/orm_helpers.rb +10 -21
- data/lib/generators/devise/views_generator.rb +8 -9
- data/lib/generators/mongoid/devise_generator.rb +7 -5
- data/lib/generators/templates/README +9 -8
- data/lib/generators/templates/controllers/confirmations_controller.rb +2 -0
- data/lib/generators/templates/controllers/omniauth_callbacks_controller.rb +3 -1
- data/lib/generators/templates/controllers/passwords_controller.rb +2 -0
- data/lib/generators/templates/controllers/registrations_controller.rb +6 -4
- data/lib/generators/templates/controllers/sessions_controller.rb +4 -2
- data/lib/generators/templates/controllers/unlocks_controller.rb +2 -0
- data/lib/generators/templates/devise.rb +63 -21
- data/lib/generators/templates/markerb/email_changed.markerb +7 -0
- data/lib/generators/templates/markerb/password_change.markerb +2 -2
- data/lib/generators/templates/simple_form_for/confirmations/new.html.erb +5 -1
- data/lib/generators/templates/simple_form_for/passwords/edit.html.erb +10 -2
- data/lib/generators/templates/simple_form_for/passwords/new.html.erb +4 -1
- data/lib/generators/templates/simple_form_for/registrations/edit.html.erb +11 -3
- data/lib/generators/templates/simple_form_for/registrations/new.html.erb +11 -3
- data/lib/generators/templates/simple_form_for/sessions/new.html.erb +7 -2
- data/lib/generators/templates/simple_form_for/unlocks/new.html.erb +4 -1
- metadata +15 -314
- data/.gitignore +0 -10
- data/.travis.yml +0 -44
- data/.yardopts +0 -9
- data/CODE_OF_CONDUCT.md +0 -22
- data/CONTRIBUTING.md +0 -16
- data/Gemfile +0 -30
- data/Gemfile.lock +0 -187
- data/Rakefile +0 -36
- data/devise.gemspec +0 -27
- data/devise.png +0 -0
- data/gemfiles/Gemfile.rails-3.2-stable +0 -29
- data/gemfiles/Gemfile.rails-3.2-stable.lock +0 -172
- data/gemfiles/Gemfile.rails-4.0-stable +0 -30
- data/gemfiles/Gemfile.rails-4.0-stable.lock +0 -166
- data/gemfiles/Gemfile.rails-4.1-stable +0 -30
- data/gemfiles/Gemfile.rails-4.1-stable.lock +0 -171
- data/gemfiles/Gemfile.rails-4.2-stable +0 -30
- data/gemfiles/Gemfile.rails-4.2-stable.lock +0 -193
- data/script/cached-bundle +0 -49
- data/script/s3-put +0 -71
- data/test/controllers/custom_registrations_controller_test.rb +0 -40
- data/test/controllers/custom_strategy_test.rb +0 -62
- data/test/controllers/helper_methods_test.rb +0 -21
- data/test/controllers/helpers_test.rb +0 -316
- data/test/controllers/inherited_controller_i18n_messages_test.rb +0 -51
- data/test/controllers/internal_helpers_test.rb +0 -129
- data/test/controllers/load_hooks_controller_test.rb +0 -19
- data/test/controllers/passwords_controller_test.rb +0 -31
- data/test/controllers/sessions_controller_test.rb +0 -103
- data/test/controllers/url_helpers_test.rb +0 -65
- data/test/delegator_test.rb +0 -19
- data/test/devise_test.rb +0 -107
- data/test/failure_app_test.rb +0 -315
- data/test/generators/active_record_generator_test.rb +0 -109
- data/test/generators/controllers_generator_test.rb +0 -48
- 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 -103
- data/test/helpers/devise_helper_test.rb +0 -49
- data/test/integration/authenticatable_test.rb +0 -729
- data/test/integration/confirmable_test.rb +0 -324
- data/test/integration/database_authenticatable_test.rb +0 -95
- data/test/integration/http_authenticatable_test.rb +0 -105
- data/test/integration/lockable_test.rb +0 -239
- data/test/integration/omniauthable_test.rb +0 -135
- data/test/integration/recoverable_test.rb +0 -347
- data/test/integration/registerable_test.rb +0 -359
- data/test/integration/rememberable_test.rb +0 -214
- data/test/integration/timeoutable_test.rb +0 -184
- data/test/integration/trackable_test.rb +0 -92
- data/test/mailers/confirmation_instructions_test.rb +0 -115
- data/test/mailers/reset_password_instructions_test.rb +0 -96
- data/test/mailers/unlock_instructions_test.rb +0 -91
- data/test/mapping_test.rb +0 -134
- data/test/models/authenticatable_test.rb +0 -23
- data/test/models/confirmable_test.rb +0 -511
- data/test/models/database_authenticatable_test.rb +0 -269
- data/test/models/lockable_test.rb +0 -350
- data/test/models/omniauthable_test.rb +0 -7
- data/test/models/recoverable_test.rb +0 -251
- data/test/models/registerable_test.rb +0 -7
- data/test/models/rememberable_test.rb +0 -169
- data/test/models/serializable_test.rb +0 -49
- data/test/models/timeoutable_test.rb +0 -51
- data/test/models/trackable_test.rb +0 -41
- data/test/models/validatable_test.rb +0 -127
- data/test/models_test.rb +0 -153
- 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 -81
- 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/active_record/user_on_engine.rb +0 -7
- data/test/rails_app/app/active_record/user_on_main_app.rb +0 -7
- data/test/rails_app/app/active_record/user_without_email.rb +0 -8
- data/test/rails_app/app/controllers/admins/sessions_controller.rb +0 -6
- data/test/rails_app/app/controllers/admins_controller.rb +0 -6
- data/test/rails_app/app/controllers/application_controller.rb +0 -12
- data/test/rails_app/app/controllers/application_with_fake_engine.rb +0 -30
- data/test/rails_app/app/controllers/custom/registrations_controller.rb +0 -31
- 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/from_proc_mailer.rb +0 -3
- data/test/rails_app/app/mailers/users/mailer.rb +0 -3
- data/test/rails_app/app/mailers/users/reply_to_mailer.rb +0 -4
- 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 -39
- data/test/rails_app/app/mongoid/user_on_engine.rb +0 -39
- data/test/rails_app/app/mongoid/user_on_main_app.rb +0 -39
- data/test/rails_app/app/mongoid/user_without_email.rb +0 -33
- 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 -14
- 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 -30
- data/test/rails_app/config/environments/production.rb +0 -84
- data/test/rails_app/config/environments/test.rb +0 -41
- data/test/rails_app/config/initializers/backtrace_silencers.rb +0 -7
- data/test/rails_app/config/initializers/devise.rb +0 -180
- 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 -125
- data/test/rails_app/config.ru +0 -4
- data/test/rails_app/db/migrate/20100401102949_create_tables.rb +0 -71
- data/test/rails_app/db/schema.rb +0 -55
- data/test/rails_app/lib/shared_admin.rb +0 -17
- data/test/rails_app/lib/shared_user.rb +0 -29
- data/test/rails_app/lib/shared_user_without_email.rb +0 -26
- data/test/rails_app/lib/shared_user_without_omniauth.rb +0 -13
- 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/rails_test.rb +0 -9
- data/test/routes_test.rb +0 -264
- data/test/support/action_controller/record_identifier.rb +0 -10
- data/test/support/assertions.rb +0 -39
- data/test/support/helpers.rb +0 -77
- data/test/support/integration.rb +0 -92
- data/test/support/locale/en.yml +0 -8
- data/test/support/mongoid.yml +0 -6
- data/test/support/webrat/integrations/rails.rb +0 -24
- data/test/test_helper.rb +0 -34
- data/test/test_helpers_test.rb +0 -178
- data/test/test_models.rb +0 -33
- data/test/time_helpers.rb +0 -137
@@ -1,171 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: git://github.com/rails/rails.git
|
3
|
-
revision: 41b4d81b4fd14cbf43060c223bea0f461256d099
|
4
|
-
branch: 4-1-stable
|
5
|
-
specs:
|
6
|
-
actionmailer (4.1.15)
|
7
|
-
actionpack (= 4.1.15)
|
8
|
-
actionview (= 4.1.15)
|
9
|
-
mail (~> 2.5, >= 2.5.4)
|
10
|
-
actionpack (4.1.15)
|
11
|
-
actionview (= 4.1.15)
|
12
|
-
activesupport (= 4.1.15)
|
13
|
-
rack (~> 1.5.2)
|
14
|
-
rack-test (~> 0.6.2)
|
15
|
-
actionview (4.1.15)
|
16
|
-
activesupport (= 4.1.15)
|
17
|
-
builder (~> 3.1)
|
18
|
-
erubis (~> 2.7.0)
|
19
|
-
activemodel (4.1.15)
|
20
|
-
activesupport (= 4.1.15)
|
21
|
-
builder (~> 3.1)
|
22
|
-
activerecord (4.1.15)
|
23
|
-
activemodel (= 4.1.15)
|
24
|
-
activesupport (= 4.1.15)
|
25
|
-
arel (~> 5.0.0)
|
26
|
-
activesupport (4.1.15)
|
27
|
-
i18n (~> 0.6, >= 0.6.9)
|
28
|
-
json (~> 1.7, >= 1.7.7)
|
29
|
-
minitest (~> 5.1)
|
30
|
-
thread_safe (~> 0.1)
|
31
|
-
tzinfo (~> 1.1)
|
32
|
-
rails (4.1.15)
|
33
|
-
actionmailer (= 4.1.15)
|
34
|
-
actionpack (= 4.1.15)
|
35
|
-
actionview (= 4.1.15)
|
36
|
-
activemodel (= 4.1.15)
|
37
|
-
activerecord (= 4.1.15)
|
38
|
-
activesupport (= 4.1.15)
|
39
|
-
bundler (>= 1.3.0, < 2.0)
|
40
|
-
railties (= 4.1.15)
|
41
|
-
sprockets-rails (~> 2.0)
|
42
|
-
railties (4.1.15)
|
43
|
-
actionpack (= 4.1.15)
|
44
|
-
activesupport (= 4.1.15)
|
45
|
-
rake (>= 0.8.7)
|
46
|
-
thor (>= 0.18.1, < 2.0)
|
47
|
-
|
48
|
-
PATH
|
49
|
-
remote: ..
|
50
|
-
specs:
|
51
|
-
devise (3.5.8)
|
52
|
-
bcrypt (~> 3.0)
|
53
|
-
orm_adapter (~> 0.1)
|
54
|
-
railties (>= 3.2.6, < 5)
|
55
|
-
responders
|
56
|
-
thread_safe (~> 0.1)
|
57
|
-
warden (~> 1.2.3)
|
58
|
-
|
59
|
-
GEM
|
60
|
-
remote: https://rubygems.org/
|
61
|
-
specs:
|
62
|
-
arel (5.0.1.20140414130214)
|
63
|
-
bcrypt (3.1.11)
|
64
|
-
bson (3.2.6)
|
65
|
-
builder (3.2.2)
|
66
|
-
concurrent-ruby (1.0.1)
|
67
|
-
connection_pool (2.2.0)
|
68
|
-
erubis (2.7.0)
|
69
|
-
faraday (0.9.2)
|
70
|
-
multipart-post (>= 1.2, < 3)
|
71
|
-
hashie (3.4.3)
|
72
|
-
i18n (0.7.0)
|
73
|
-
json (1.8.3)
|
74
|
-
jwt (1.5.4)
|
75
|
-
mail (2.6.4)
|
76
|
-
mime-types (>= 1.16, < 4)
|
77
|
-
metaclass (0.0.4)
|
78
|
-
mime-types (2.99.1)
|
79
|
-
mini_portile2 (2.0.0)
|
80
|
-
minitest (5.8.4)
|
81
|
-
mocha (1.1.0)
|
82
|
-
metaclass (~> 0.0.1)
|
83
|
-
mongoid (4.0.2)
|
84
|
-
activemodel (~> 4.0)
|
85
|
-
moped (~> 2.0.0)
|
86
|
-
origin (~> 2.1)
|
87
|
-
tzinfo (>= 0.3.37)
|
88
|
-
moped (2.0.7)
|
89
|
-
bson (~> 3.0)
|
90
|
-
connection_pool (~> 2.0)
|
91
|
-
optionable (~> 0.2.0)
|
92
|
-
multi_json (1.11.3)
|
93
|
-
multi_xml (0.5.5)
|
94
|
-
multipart-post (2.0.0)
|
95
|
-
nokogiri (1.6.7.2)
|
96
|
-
mini_portile2 (~> 2.0.0.rc2)
|
97
|
-
oauth2 (0.9.4)
|
98
|
-
faraday (>= 0.8, < 0.10)
|
99
|
-
jwt (~> 1.0)
|
100
|
-
multi_json (~> 1.3)
|
101
|
-
multi_xml (~> 0.5)
|
102
|
-
rack (~> 1.2)
|
103
|
-
omniauth (1.2.2)
|
104
|
-
hashie (>= 1.2, < 4)
|
105
|
-
rack (~> 1.0)
|
106
|
-
omniauth-facebook (1.6.0)
|
107
|
-
omniauth-oauth2 (~> 1.1)
|
108
|
-
omniauth-oauth2 (1.1.2)
|
109
|
-
faraday (>= 0.8, < 0.10)
|
110
|
-
multi_json (~> 1.3)
|
111
|
-
oauth2 (~> 0.9.3)
|
112
|
-
omniauth (~> 1.2)
|
113
|
-
omniauth-openid (1.0.1)
|
114
|
-
omniauth (~> 1.0)
|
115
|
-
rack-openid (~> 1.3.1)
|
116
|
-
optionable (0.2.0)
|
117
|
-
origin (2.2.0)
|
118
|
-
orm_adapter (0.5.0)
|
119
|
-
rack (1.5.5)
|
120
|
-
rack-openid (1.3.1)
|
121
|
-
rack (>= 1.1.0)
|
122
|
-
ruby-openid (>= 2.1.8)
|
123
|
-
rack-test (0.6.3)
|
124
|
-
rack (>= 1.0)
|
125
|
-
rake (11.1.2)
|
126
|
-
rdoc (4.2.2)
|
127
|
-
json (~> 1.4)
|
128
|
-
responders (1.1.2)
|
129
|
-
railties (>= 3.2, < 4.2)
|
130
|
-
ruby-openid (2.7.0)
|
131
|
-
sprockets (3.6.0)
|
132
|
-
concurrent-ruby (~> 1.0)
|
133
|
-
rack (> 1, < 3)
|
134
|
-
sprockets-rails (2.3.3)
|
135
|
-
actionpack (>= 3.0)
|
136
|
-
activesupport (>= 3.0)
|
137
|
-
sprockets (>= 2.8, < 4.0)
|
138
|
-
sqlite3 (1.3.11)
|
139
|
-
thor (0.19.1)
|
140
|
-
thread_safe (0.3.5)
|
141
|
-
tzinfo (1.2.2)
|
142
|
-
thread_safe (~> 0.1)
|
143
|
-
warden (1.2.6)
|
144
|
-
rack (>= 1.0)
|
145
|
-
webrat (0.7.3)
|
146
|
-
nokogiri (>= 1.2.0)
|
147
|
-
rack (>= 1.0)
|
148
|
-
rack-test (>= 0.5.3)
|
149
|
-
|
150
|
-
PLATFORMS
|
151
|
-
ruby
|
152
|
-
|
153
|
-
DEPENDENCIES
|
154
|
-
activerecord-jdbc-adapter
|
155
|
-
activerecord-jdbcsqlite3-adapter
|
156
|
-
devise!
|
157
|
-
jruby-openssl
|
158
|
-
mime-types (~> 2.99)
|
159
|
-
mocha (~> 1.1)
|
160
|
-
mongoid (~> 4.0.0)
|
161
|
-
omniauth (~> 1.2.0)
|
162
|
-
omniauth-facebook
|
163
|
-
omniauth-oauth2 (~> 1.1.0)
|
164
|
-
omniauth-openid (~> 1.0.1)
|
165
|
-
rails!
|
166
|
-
rdoc
|
167
|
-
sqlite3
|
168
|
-
webrat (= 0.7.3)
|
169
|
-
|
170
|
-
BUNDLED WITH
|
171
|
-
1.11.2
|
@@ -1,30 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gemspec path: '..'
|
4
|
-
|
5
|
-
gem "rails", github: 'rails/rails', branch: '4-2-stable'
|
6
|
-
gem "omniauth", "~> 1.2.2"
|
7
|
-
gem "omniauth-oauth2", "~> 1.2.0"
|
8
|
-
gem "rdoc"
|
9
|
-
gem "mime-types", "~> 2.99"
|
10
|
-
|
11
|
-
group :test do
|
12
|
-
gem "omniauth-facebook"
|
13
|
-
gem "omniauth-openid", "~> 1.0.1"
|
14
|
-
gem "webrat", "0.7.3", require: false
|
15
|
-
gem "mocha", "~> 1.1", require: false
|
16
|
-
end
|
17
|
-
|
18
|
-
platforms :jruby do
|
19
|
-
gem "activerecord-jdbc-adapter"
|
20
|
-
gem "activerecord-jdbcsqlite3-adapter"
|
21
|
-
gem "jruby-openssl"
|
22
|
-
end
|
23
|
-
|
24
|
-
platforms :ruby do
|
25
|
-
gem "sqlite3"
|
26
|
-
end
|
27
|
-
|
28
|
-
group :mongoid do
|
29
|
-
gem "mongoid", "~> 4.0.0"
|
30
|
-
end
|
@@ -1,193 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: git://github.com/rails/rails.git
|
3
|
-
revision: 2a1b655bb7db42ed0dbadab5bb129a8515e86a40
|
4
|
-
branch: 4-2-stable
|
5
|
-
specs:
|
6
|
-
actionmailer (4.2.6)
|
7
|
-
actionpack (= 4.2.6)
|
8
|
-
actionview (= 4.2.6)
|
9
|
-
activejob (= 4.2.6)
|
10
|
-
mail (~> 2.5, >= 2.5.4)
|
11
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
12
|
-
actionpack (4.2.6)
|
13
|
-
actionview (= 4.2.6)
|
14
|
-
activesupport (= 4.2.6)
|
15
|
-
rack (~> 1.6)
|
16
|
-
rack-test (~> 0.6.2)
|
17
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
18
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
19
|
-
actionview (4.2.6)
|
20
|
-
activesupport (= 4.2.6)
|
21
|
-
builder (~> 3.1)
|
22
|
-
erubis (~> 2.7.0)
|
23
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
24
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
25
|
-
activejob (4.2.6)
|
26
|
-
activesupport (= 4.2.6)
|
27
|
-
globalid (>= 0.3.0)
|
28
|
-
activemodel (4.2.6)
|
29
|
-
activesupport (= 4.2.6)
|
30
|
-
builder (~> 3.1)
|
31
|
-
activerecord (4.2.6)
|
32
|
-
activemodel (= 4.2.6)
|
33
|
-
activesupport (= 4.2.6)
|
34
|
-
arel (~> 6.0)
|
35
|
-
activesupport (4.2.6)
|
36
|
-
i18n (~> 0.7)
|
37
|
-
json (~> 1.7, >= 1.7.7)
|
38
|
-
minitest (~> 5.1)
|
39
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
40
|
-
tzinfo (~> 1.1)
|
41
|
-
rails (4.2.6)
|
42
|
-
actionmailer (= 4.2.6)
|
43
|
-
actionpack (= 4.2.6)
|
44
|
-
actionview (= 4.2.6)
|
45
|
-
activejob (= 4.2.6)
|
46
|
-
activemodel (= 4.2.6)
|
47
|
-
activerecord (= 4.2.6)
|
48
|
-
activesupport (= 4.2.6)
|
49
|
-
bundler (>= 1.3.0, < 2.0)
|
50
|
-
railties (= 4.2.6)
|
51
|
-
sprockets-rails
|
52
|
-
railties (4.2.6)
|
53
|
-
actionpack (= 4.2.6)
|
54
|
-
activesupport (= 4.2.6)
|
55
|
-
rake (>= 0.8.7)
|
56
|
-
thor (>= 0.18.1, < 2.0)
|
57
|
-
|
58
|
-
PATH
|
59
|
-
remote: ..
|
60
|
-
specs:
|
61
|
-
devise (3.5.8)
|
62
|
-
bcrypt (~> 3.0)
|
63
|
-
orm_adapter (~> 0.1)
|
64
|
-
railties (>= 3.2.6, < 5)
|
65
|
-
responders
|
66
|
-
thread_safe (~> 0.1)
|
67
|
-
warden (~> 1.2.3)
|
68
|
-
|
69
|
-
GEM
|
70
|
-
remote: https://rubygems.org/
|
71
|
-
specs:
|
72
|
-
arel (6.0.3)
|
73
|
-
bcrypt (3.1.11)
|
74
|
-
bson (3.2.6)
|
75
|
-
builder (3.2.2)
|
76
|
-
concurrent-ruby (1.0.1)
|
77
|
-
connection_pool (2.2.0)
|
78
|
-
erubis (2.7.0)
|
79
|
-
faraday (0.9.2)
|
80
|
-
multipart-post (>= 1.2, < 3)
|
81
|
-
globalid (0.3.6)
|
82
|
-
activesupport (>= 4.1.0)
|
83
|
-
hashie (3.4.3)
|
84
|
-
i18n (0.7.0)
|
85
|
-
json (1.8.3)
|
86
|
-
jwt (1.5.1)
|
87
|
-
loofah (2.0.3)
|
88
|
-
nokogiri (>= 1.5.9)
|
89
|
-
mail (2.6.4)
|
90
|
-
mime-types (>= 1.16, < 4)
|
91
|
-
metaclass (0.0.4)
|
92
|
-
mime-types (2.99.1)
|
93
|
-
mini_portile2 (2.0.0)
|
94
|
-
minitest (5.8.4)
|
95
|
-
mocha (1.1.0)
|
96
|
-
metaclass (~> 0.0.1)
|
97
|
-
mongoid (4.0.2)
|
98
|
-
activemodel (~> 4.0)
|
99
|
-
moped (~> 2.0.0)
|
100
|
-
origin (~> 2.1)
|
101
|
-
tzinfo (>= 0.3.37)
|
102
|
-
moped (2.0.7)
|
103
|
-
bson (~> 3.0)
|
104
|
-
connection_pool (~> 2.0)
|
105
|
-
optionable (~> 0.2.0)
|
106
|
-
multi_json (1.11.3)
|
107
|
-
multi_xml (0.5.5)
|
108
|
-
multipart-post (2.0.0)
|
109
|
-
nokogiri (1.6.7.2)
|
110
|
-
mini_portile2 (~> 2.0.0.rc2)
|
111
|
-
oauth2 (1.1.0)
|
112
|
-
faraday (>= 0.8, < 0.10)
|
113
|
-
jwt (~> 1.0, < 1.5.2)
|
114
|
-
multi_json (~> 1.3)
|
115
|
-
multi_xml (~> 0.5)
|
116
|
-
rack (>= 1.2, < 3)
|
117
|
-
omniauth (1.2.2)
|
118
|
-
hashie (>= 1.2, < 4)
|
119
|
-
rack (~> 1.0)
|
120
|
-
omniauth-facebook (3.0.0)
|
121
|
-
omniauth-oauth2 (~> 1.2)
|
122
|
-
omniauth-oauth2 (1.2.0)
|
123
|
-
faraday (>= 0.8, < 0.10)
|
124
|
-
multi_json (~> 1.3)
|
125
|
-
oauth2 (~> 1.0)
|
126
|
-
omniauth (~> 1.2)
|
127
|
-
omniauth-openid (1.0.1)
|
128
|
-
omniauth (~> 1.0)
|
129
|
-
rack-openid (~> 1.3.1)
|
130
|
-
optionable (0.2.0)
|
131
|
-
origin (2.2.0)
|
132
|
-
orm_adapter (0.5.0)
|
133
|
-
rack (1.6.4)
|
134
|
-
rack-openid (1.3.1)
|
135
|
-
rack (>= 1.1.0)
|
136
|
-
ruby-openid (>= 2.1.8)
|
137
|
-
rack-test (0.6.3)
|
138
|
-
rack (>= 1.0)
|
139
|
-
rails-deprecated_sanitizer (1.0.3)
|
140
|
-
activesupport (>= 4.2.0.alpha)
|
141
|
-
rails-dom-testing (1.0.7)
|
142
|
-
activesupport (>= 4.2.0.beta, < 5.0)
|
143
|
-
nokogiri (~> 1.6.0)
|
144
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
145
|
-
rails-html-sanitizer (1.0.3)
|
146
|
-
loofah (~> 2.0)
|
147
|
-
rake (11.1.2)
|
148
|
-
rdoc (4.2.2)
|
149
|
-
json (~> 1.4)
|
150
|
-
responders (2.1.2)
|
151
|
-
railties (>= 4.2.0, < 5.1)
|
152
|
-
ruby-openid (2.7.0)
|
153
|
-
sprockets (3.6.0)
|
154
|
-
concurrent-ruby (~> 1.0)
|
155
|
-
rack (> 1, < 3)
|
156
|
-
sprockets-rails (3.0.4)
|
157
|
-
actionpack (>= 4.0)
|
158
|
-
activesupport (>= 4.0)
|
159
|
-
sprockets (>= 3.0.0)
|
160
|
-
sqlite3 (1.3.11)
|
161
|
-
thor (0.19.1)
|
162
|
-
thread_safe (0.3.5)
|
163
|
-
tzinfo (1.2.2)
|
164
|
-
thread_safe (~> 0.1)
|
165
|
-
warden (1.2.6)
|
166
|
-
rack (>= 1.0)
|
167
|
-
webrat (0.7.3)
|
168
|
-
nokogiri (>= 1.2.0)
|
169
|
-
rack (>= 1.0)
|
170
|
-
rack-test (>= 0.5.3)
|
171
|
-
|
172
|
-
PLATFORMS
|
173
|
-
ruby
|
174
|
-
|
175
|
-
DEPENDENCIES
|
176
|
-
activerecord-jdbc-adapter
|
177
|
-
activerecord-jdbcsqlite3-adapter
|
178
|
-
devise!
|
179
|
-
jruby-openssl
|
180
|
-
mime-types (~> 2.99)
|
181
|
-
mocha (~> 1.1)
|
182
|
-
mongoid (~> 4.0.0)
|
183
|
-
omniauth (~> 1.2.2)
|
184
|
-
omniauth-facebook
|
185
|
-
omniauth-oauth2 (~> 1.2.0)
|
186
|
-
omniauth-openid (~> 1.0.1)
|
187
|
-
rails!
|
188
|
-
rdoc
|
189
|
-
sqlite3
|
190
|
-
webrat (= 0.7.3)
|
191
|
-
|
192
|
-
BUNDLED WITH
|
193
|
-
1.11.2
|
data/script/cached-bundle
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
# Usage: cached-bundle install --deployment
|
3
|
-
#
|
4
|
-
# After running `bundle`, caches the `vendor/bundle` directory to S3.
|
5
|
-
# On the next run, restores the cached directory before running `bundle`.
|
6
|
-
# When `Gemfile.lock` changes, the cache gets rebuilt.
|
7
|
-
#
|
8
|
-
# Requirements:
|
9
|
-
# - Gemfile.lock
|
10
|
-
# - TRAVIS_REPO_SLUG
|
11
|
-
# - TRAVIS_RUBY_VERSION
|
12
|
-
# - AMAZON_S3_BUCKET
|
13
|
-
# - script/s3-put
|
14
|
-
# - bundle
|
15
|
-
# - curl
|
16
|
-
#
|
17
|
-
# Author: Mislav Marohnić
|
18
|
-
|
19
|
-
set -e
|
20
|
-
|
21
|
-
compute_md5() {
|
22
|
-
local output="$(openssl md5)"
|
23
|
-
echo "${output##* }"
|
24
|
-
}
|
25
|
-
|
26
|
-
download() {
|
27
|
-
curl --tcp-nodelay -qsfL "$1" -o "$2"
|
28
|
-
}
|
29
|
-
|
30
|
-
|
31
|
-
gemfile="${BUNDLE_GEMFILE:-Gemfile}"
|
32
|
-
bundle_fullpath="$(dirname $gemfile)/vendor/bundle"
|
33
|
-
bundle_path=${bundle_fullpath#$PWD/}
|
34
|
-
gemfile_hash="$(compute_md5 <"${gemfile}.lock")"
|
35
|
-
cache_name="${TRAVIS_RUBY_VERSION}-${gemfile_hash}.tgz"
|
36
|
-
fetch_url="http://${AMAZON_S3_BUCKET}.s3.amazonaws.com/${TRAVIS_REPO_SLUG}/${cache_name}"
|
37
|
-
|
38
|
-
if download "$fetch_url" "$cache_name"; then
|
39
|
-
echo "Reusing cached bundle ${cache_name}"
|
40
|
-
tar xzf "$cache_name"
|
41
|
-
fi
|
42
|
-
|
43
|
-
bundle "$@"
|
44
|
-
|
45
|
-
if [ ! -f "$cache_name" ] && [ -n "$AMAZON_SECRET_ACCESS_KEY" ]; then
|
46
|
-
echo "Caching \`${bundle_path}' to S3"
|
47
|
-
tar czf "$cache_name" "$bundle_path"
|
48
|
-
script/s3-put "$cache_name" "${AMAZON_S3_BUCKET}:${TRAVIS_REPO_SLUG}/${cache_name}"
|
49
|
-
fi
|
data/script/s3-put
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
# Usage: s3-put <FILE> <S3_BUCKET>[:<PATH>] [<CONTENT_TYPE>]
|
3
|
-
#
|
4
|
-
# Uploads a file to the Amazon S3 service.
|
5
|
-
# Outputs the URL for the newly uploaded file.
|
6
|
-
#
|
7
|
-
# Requirements:
|
8
|
-
# - AMAZON_ACCESS_KEY_ID
|
9
|
-
# - AMAZON_SECRET_ACCESS_KEY
|
10
|
-
# - openssl
|
11
|
-
# - curl
|
12
|
-
#
|
13
|
-
# Author: Mislav Marohnić
|
14
|
-
|
15
|
-
set -e
|
16
|
-
|
17
|
-
authorization() {
|
18
|
-
local signature="$(string_to_sign | hmac_sha1 | base64)"
|
19
|
-
echo "AWS ${AMAZON_ACCESS_KEY_ID?}:${signature}"
|
20
|
-
}
|
21
|
-
|
22
|
-
hmac_sha1() {
|
23
|
-
openssl dgst -binary -sha1 -hmac "${AMAZON_SECRET_ACCESS_KEY?}"
|
24
|
-
}
|
25
|
-
|
26
|
-
base64() {
|
27
|
-
openssl enc -base64
|
28
|
-
}
|
29
|
-
|
30
|
-
bin_md5() {
|
31
|
-
openssl dgst -binary -md5
|
32
|
-
}
|
33
|
-
|
34
|
-
string_to_sign() {
|
35
|
-
echo "$http_method"
|
36
|
-
echo "$content_md5"
|
37
|
-
echo "$content_type"
|
38
|
-
echo "$date"
|
39
|
-
echo "x-amz-acl:$acl"
|
40
|
-
printf "/$bucket/$remote_path"
|
41
|
-
}
|
42
|
-
|
43
|
-
date_string() {
|
44
|
-
LC_TIME=C date "+%a, %d %h %Y %T %z"
|
45
|
-
}
|
46
|
-
|
47
|
-
file="$1"
|
48
|
-
bucket="${2%%:*}"
|
49
|
-
remote_path="${2#*:}"
|
50
|
-
content_type="$3"
|
51
|
-
|
52
|
-
if [ -z "$remote_path" ] || [ "$remote_path" = "$bucket" ]; then
|
53
|
-
remote_path="${file##*/}"
|
54
|
-
fi
|
55
|
-
|
56
|
-
http_method=PUT
|
57
|
-
acl="public-read"
|
58
|
-
content_md5="$(bin_md5 < "$file" | base64)"
|
59
|
-
date="$(date_string)"
|
60
|
-
|
61
|
-
url="https://$bucket.s3.amazonaws.com/$remote_path"
|
62
|
-
|
63
|
-
curl -qsSf -T "$file" \
|
64
|
-
-H "Authorization: $(authorization)" \
|
65
|
-
-H "x-amz-acl: $acl" \
|
66
|
-
-H "Date: $date" \
|
67
|
-
-H "Content-MD5: $content_md5" \
|
68
|
-
-H "Content-Type: $content_type" \
|
69
|
-
"$url"
|
70
|
-
|
71
|
-
echo "$url"
|
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class CustomRegistrationsControllerTest < ActionController::TestCase
|
4
|
-
tests Custom::RegistrationsController
|
5
|
-
|
6
|
-
include Devise::TestHelpers
|
7
|
-
|
8
|
-
setup do
|
9
|
-
request.env["devise.mapping"] = Devise.mappings[:user]
|
10
|
-
@password = 'password'
|
11
|
-
@user = create_user(password: @password, password_confirmation: @password).tap(&:confirm)
|
12
|
-
end
|
13
|
-
|
14
|
-
test "yield resource to block on create success" do
|
15
|
-
post :create, { user: { email: "user@example.org", password: "password", password_confirmation: "password" } }
|
16
|
-
assert @controller.create_block_called?, "create failed to yield resource to provided block"
|
17
|
-
end
|
18
|
-
|
19
|
-
test "yield resource to block on create failure" do
|
20
|
-
post :create, { user: { } }
|
21
|
-
assert @controller.create_block_called?, "create failed to yield resource to provided block"
|
22
|
-
end
|
23
|
-
|
24
|
-
test "yield resource to block on update success" do
|
25
|
-
sign_in @user
|
26
|
-
put :update, { user: { current_password: @password } }
|
27
|
-
assert @controller.update_block_called?, "update failed to yield resource to provided block"
|
28
|
-
end
|
29
|
-
|
30
|
-
test "yield resource to block on update failure" do
|
31
|
-
sign_in @user
|
32
|
-
put :update, { user: { } }
|
33
|
-
assert @controller.update_block_called?, "update failed to yield resource to provided block"
|
34
|
-
end
|
35
|
-
|
36
|
-
test "yield resource to block on new" do
|
37
|
-
get :new
|
38
|
-
assert @controller.new_block_called?, "new failed to yield resource to provided block"
|
39
|
-
end
|
40
|
-
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
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class ApiController < ActionController::Metal
|
4
|
-
include Devise::Controllers::Helpers
|
5
|
-
end
|
6
|
-
|
7
|
-
class HelperMethodsTest < ActionController::TestCase
|
8
|
-
tests ApiController
|
9
|
-
|
10
|
-
test 'includes Devise::Controllers::Helpers' do
|
11
|
-
assert_includes @controller.class.ancestors, Devise::Controllers::Helpers
|
12
|
-
end
|
13
|
-
|
14
|
-
test 'does not respond_to helper_method' do
|
15
|
-
refute_respond_to @controller.class, :helper_method
|
16
|
-
end
|
17
|
-
|
18
|
-
test 'defines methods like current_user' do
|
19
|
-
assert_respond_to @controller, :current_user
|
20
|
-
end
|
21
|
-
end
|