home_page 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/fonts/socialicious.eot +0 -0
- data/app/assets/fonts/socialicious.svg +84 -0
- data/app/assets/fonts/socialicious.ttf +0 -0
- data/app/assets/fonts/socialicious.woff +0 -0
- data/app/assets/stylesheets/home_page/application.css +3 -0
- data/app/assets/stylesheets/home_page/base.less +1 -1
- data/app/assets/stylesheets/home_page/bootswatch.css.less +5 -1
- data/app/assets/stylesheets/home_page/loader.css.less +2 -2
- data/app/assets/stylesheets/home_page/pygments.css +63 -0
- data/app/assets/stylesheets/home_page/sign_in.css +40 -0
- data/app/assets/stylesheets/home_page/socialicious.css +655 -0
- data/app/controllers/devise_extensions/registrations_controller.rb +1 -1
- data/app/controllers/devise_extensions/sessions_controller.rb +21 -0
- data/app/controllers/home_page/application_controller.rb +22 -0
- data/app/controllers/users_controller.rb +0 -2
- data/app/helpers/home_page/application_helper.rb +34 -0
- data/app/helpers/home_page/layout_helper.rb +2 -2
- data/app/models/user.rb +4 -0
- data/app/views/devise/sessions/new.html.erb +9 -0
- data/app/views/layouts/application.html.erb +9 -29
- data/app/views/layouts/home_page/sign_in.html.erb +11 -0
- data/app/views/layouts/shared/_flash.html.erb +3 -0
- data/app/views/layouts/shared/_foot.html.erb +1 -0
- data/app/views/layouts/shared/_head.html.erb +10 -0
- data/app/views/layouts/shared/_navigation.html.erb +14 -0
- data/app/views/users/_form.html.erb +3 -1
- data/config/initializers/assets.rb +1 -0
- data/config/initializers/friendly_id.rb +88 -0
- data/config/locales/general/en.yml +6 -0
- data/config/locales/resources/tag/en.yml +4 -0
- data/config/routes.rb +4 -1
- data/db/migrate/20150307152542_create_initial_schema.rb +2 -3
- data/db/migrate/20150307193102_create_friendly_id_slugs.rb +15 -0
- data/lib/home_page.rb +9 -0
- data/lib/home_page/engine.rb +6 -0
- data/lib/home_page/navigation.rb +13 -2
- data/lib/home_page/version.rb +1 -1
- metadata +146 -3
- data/config/initializers/devise.rb +0 -259
data/lib/home_page.rb
CHANGED
@@ -9,6 +9,15 @@ require 'active_record/deprecated_finders'
|
|
9
9
|
require 'simple_form'
|
10
10
|
require 'simple-navigation'
|
11
11
|
require 'simple-navigation-bootstrap'
|
12
|
+
require 'redcarpet'
|
13
|
+
require 'albino'
|
14
|
+
require 'nokogiri'
|
15
|
+
require 'auto_html'
|
16
|
+
require 'will_paginate'
|
17
|
+
require 'will_paginate-bootstrap'
|
18
|
+
require 'turbolinks'
|
19
|
+
require 'uglifier'
|
20
|
+
require 'yui/compressor'
|
12
21
|
|
13
22
|
require 'home_page/navigation'
|
14
23
|
require 'home_page/simple_navigation_renderer/breadcrumbs_without_method_links'
|
data/lib/home_page/engine.rb
CHANGED
@@ -5,5 +5,11 @@ module HomePage
|
|
5
5
|
config.i18n.load_path += Dir[File.expand_path("../../../config/locales/**/*.{rb,yml}", __FILE__)]
|
6
6
|
|
7
7
|
config.generators{|g| g.orm :active_record }
|
8
|
+
|
9
|
+
config.to_prepare do
|
10
|
+
Rails.application.config.assets.precompile += %w(
|
11
|
+
home_page/*
|
12
|
+
)
|
13
|
+
end
|
8
14
|
end
|
9
15
|
end
|
data/lib/home_page/navigation.rb
CHANGED
@@ -1,9 +1,18 @@
|
|
1
1
|
module HomePage
|
2
2
|
module Navigation
|
3
3
|
class Base
|
4
|
+
@@items = [:users, :authentication]
|
4
5
|
@@products = {}
|
5
6
|
@@menu_options = {}
|
6
7
|
|
8
|
+
def self.items
|
9
|
+
@@items
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.items=(value)
|
13
|
+
@@items = value
|
14
|
+
end
|
15
|
+
|
7
16
|
def self.add_product(slug, text)
|
8
17
|
@@products[slug] = text
|
9
18
|
end
|
@@ -28,8 +37,10 @@ module HomePage
|
|
28
37
|
navigation.items do |primary, options|
|
29
38
|
primary.dom_class = 'nav navbar-nav'
|
30
39
|
|
31
|
-
|
32
|
-
|
40
|
+
::HomePage::Navigation::Base.items.each do |item|
|
41
|
+
klass = "HomePage#{item.is_a?(Array) ? item.first.to_s.classify : ''}::Navigation"
|
42
|
+
item = item.is_a?(Array) ? item.last : item
|
43
|
+
instance_exec primary, HomePage::Navigation::Base.menu_options(item), &klass.constantize.menu_code(item)
|
33
44
|
end
|
34
45
|
end
|
35
46
|
end
|
data/lib/home_page/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: home_page
|
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
|
- Mathias Gawlista
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -192,6 +192,132 @@ dependencies:
|
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: 1.0.0
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: redcarpet
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 3.2.2
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 3.2.2
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: albino
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - "~>"
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: 1.3.3
|
216
|
+
type: :runtime
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - "~>"
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 1.3.3
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: nokogiri
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - "~>"
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: 1.6.6.2
|
230
|
+
type: :runtime
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - "~>"
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: 1.6.6.2
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: auto_html
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - "~>"
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: 1.6.4
|
244
|
+
type: :runtime
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - "~>"
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: 1.6.4
|
251
|
+
- !ruby/object:Gem::Dependency
|
252
|
+
name: will_paginate
|
253
|
+
requirement: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - "~>"
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: 3.0.7
|
258
|
+
type: :runtime
|
259
|
+
prerelease: false
|
260
|
+
version_requirements: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - "~>"
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: 3.0.7
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: will_paginate-bootstrap
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - "~>"
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: 1.0.1
|
272
|
+
type: :runtime
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - "~>"
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: 1.0.1
|
279
|
+
- !ruby/object:Gem::Dependency
|
280
|
+
name: turbolinks
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - "~>"
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: 2.5.3
|
286
|
+
type: :runtime
|
287
|
+
prerelease: false
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - "~>"
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: 2.5.3
|
293
|
+
- !ruby/object:Gem::Dependency
|
294
|
+
name: uglifier
|
295
|
+
requirement: !ruby/object:Gem::Requirement
|
296
|
+
requirements:
|
297
|
+
- - "~>"
|
298
|
+
- !ruby/object:Gem::Version
|
299
|
+
version: 2.7.1
|
300
|
+
type: :runtime
|
301
|
+
prerelease: false
|
302
|
+
version_requirements: !ruby/object:Gem::Requirement
|
303
|
+
requirements:
|
304
|
+
- - "~>"
|
305
|
+
- !ruby/object:Gem::Version
|
306
|
+
version: 2.7.1
|
307
|
+
- !ruby/object:Gem::Dependency
|
308
|
+
name: yui-compressor
|
309
|
+
requirement: !ruby/object:Gem::Requirement
|
310
|
+
requirements:
|
311
|
+
- - "~>"
|
312
|
+
- !ruby/object:Gem::Version
|
313
|
+
version: 0.12.0
|
314
|
+
type: :runtime
|
315
|
+
prerelease: false
|
316
|
+
version_requirements: !ruby/object:Gem::Requirement
|
317
|
+
requirements:
|
318
|
+
- - "~>"
|
319
|
+
- !ruby/object:Gem::Version
|
320
|
+
version: 0.12.0
|
195
321
|
- !ruby/object:Gem::Dependency
|
196
322
|
name: mysql2
|
197
323
|
requirement: !ruby/object:Gem::Requirement
|
@@ -218,6 +344,10 @@ files:
|
|
218
344
|
- MIT-LICENSE
|
219
345
|
- README.rdoc
|
220
346
|
- Rakefile
|
347
|
+
- app/assets/fonts/socialicious.eot
|
348
|
+
- app/assets/fonts/socialicious.svg
|
349
|
+
- app/assets/fonts/socialicious.ttf
|
350
|
+
- app/assets/fonts/socialicious.woff
|
221
351
|
- app/assets/javascripts/home_page/application.js
|
222
352
|
- app/assets/javascripts/home_page/loader.js
|
223
353
|
- app/assets/stylesheets/home_page/application.css
|
@@ -225,8 +355,12 @@ files:
|
|
225
355
|
- app/assets/stylesheets/home_page/bootswatch.css.less
|
226
356
|
- app/assets/stylesheets/home_page/loader.css.less
|
227
357
|
- app/assets/stylesheets/home_page/mixins.less
|
358
|
+
- app/assets/stylesheets/home_page/pygments.css
|
359
|
+
- app/assets/stylesheets/home_page/sign_in.css
|
360
|
+
- app/assets/stylesheets/home_page/socialicious.css
|
228
361
|
- app/assets/stylesheets/home_page/variables.less
|
229
362
|
- app/controllers/devise_extensions/registrations_controller.rb
|
363
|
+
- app/controllers/devise_extensions/sessions_controller.rb
|
230
364
|
- app/controllers/home_controller.rb
|
231
365
|
- app/controllers/home_page/application_controller.rb
|
232
366
|
- app/controllers/users_controller.rb
|
@@ -234,22 +368,31 @@ files:
|
|
234
368
|
- app/helpers/home_page/layout_helper.rb
|
235
369
|
- app/models/user.rb
|
236
370
|
- app/views/devise/registrations/new.html.erb
|
371
|
+
- app/views/devise/sessions/new.html.erb
|
237
372
|
- app/views/home/index.html.erb
|
238
373
|
- app/views/layouts/application.html.erb
|
374
|
+
- app/views/layouts/home_page/sign_in.html.erb
|
375
|
+
- app/views/layouts/shared/_flash.html.erb
|
376
|
+
- app/views/layouts/shared/_foot.html.erb
|
377
|
+
- app/views/layouts/shared/_head.html.erb
|
378
|
+
- app/views/layouts/shared/_navigation.html.erb
|
239
379
|
- app/views/users/_form.html.erb
|
240
380
|
- app/views/users/edit.html.erb
|
241
381
|
- app/views/users/index.html.erb
|
242
382
|
- app/views/users/new.html.erb
|
243
|
-
- config/initializers/
|
383
|
+
- config/initializers/assets.rb
|
384
|
+
- config/initializers/friendly_id.rb
|
244
385
|
- config/initializers/simple_form.rb
|
245
386
|
- config/initializers/simple_form_bootstrap.rb
|
246
387
|
- config/initializers/simple_navigation.rb
|
247
388
|
- config/locales/devise.en.yml
|
248
389
|
- config/locales/general/en.yml
|
390
|
+
- config/locales/resources/tag/en.yml
|
249
391
|
- config/locales/resources/user/en.yml
|
250
392
|
- config/locales/simple_form.en.yml
|
251
393
|
- config/routes.rb
|
252
394
|
- db/migrate/20150307152542_create_initial_schema.rb
|
395
|
+
- db/migrate/20150307193102_create_friendly_id_slugs.rb
|
253
396
|
- lib/home_page.rb
|
254
397
|
- lib/home_page/engine.rb
|
255
398
|
- lib/home_page/navigation.rb
|
@@ -1,259 +0,0 @@
|
|
1
|
-
# Use this hook to configure devise mailer, warden hooks and so forth.
|
2
|
-
# Many of these configuration options can be set straight in your model.
|
3
|
-
Devise.setup do |config|
|
4
|
-
# The secret key used by Devise. Devise uses this key to generate
|
5
|
-
# random tokens. Changing this key will render invalid all existing
|
6
|
-
# confirmation, reset password and unlock tokens in the database.
|
7
|
-
# config.secret_key = 'ebf33b28fd1e692ac88707837b0c81c087850dac8d365b5b647ac549ddcae2b68c513017b8f7b114e06102778d547ed14b016a26dd7442435539552c6a07dffe'
|
8
|
-
|
9
|
-
# ==> Mailer Configuration
|
10
|
-
# Configure the e-mail address which will be shown in Devise::Mailer,
|
11
|
-
# note that it will be overwritten if you use your own mailer class
|
12
|
-
# with default "from" parameter.
|
13
|
-
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
14
|
-
|
15
|
-
# Configure the class responsible to send e-mails.
|
16
|
-
# config.mailer = 'Devise::Mailer'
|
17
|
-
|
18
|
-
# ==> ORM configuration
|
19
|
-
# Load and configure the ORM. Supports :active_record (default) and
|
20
|
-
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
21
|
-
# available as additional gems.
|
22
|
-
require 'devise/orm/active_record'
|
23
|
-
|
24
|
-
# ==> Configuration for any authentication mechanism
|
25
|
-
# Configure which keys are used when authenticating a user. The default is
|
26
|
-
# just :email. You can configure it to use [:username, :subdomain], so for
|
27
|
-
# authenticating a user, both parameters are required. Remember that those
|
28
|
-
# parameters are used only when authenticating and not when retrieving from
|
29
|
-
# session. If you need permissions, you should implement that in a before filter.
|
30
|
-
# You can also supply a hash where the value is a boolean determining whether
|
31
|
-
# or not authentication should be aborted when the value is not present.
|
32
|
-
# config.authentication_keys = [ :email ]
|
33
|
-
|
34
|
-
# Configure parameters from the request object used for authentication. Each entry
|
35
|
-
# given should be a request method and it will automatically be passed to the
|
36
|
-
# find_for_authentication method and considered in your model lookup. For instance,
|
37
|
-
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
38
|
-
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
39
|
-
# config.request_keys = []
|
40
|
-
|
41
|
-
# Configure which authentication keys should be case-insensitive.
|
42
|
-
# These keys will be downcased upon creating or modifying a user and when used
|
43
|
-
# to authenticate or find a user. Default is :email.
|
44
|
-
config.case_insensitive_keys = [ :email ]
|
45
|
-
|
46
|
-
# Configure which authentication keys should have whitespace stripped.
|
47
|
-
# These keys will have whitespace before and after removed upon creating or
|
48
|
-
# modifying a user and when used to authenticate or find a user. Default is :email.
|
49
|
-
config.strip_whitespace_keys = [ :email ]
|
50
|
-
|
51
|
-
# Tell if authentication through request.params is enabled. True by default.
|
52
|
-
# It can be set to an array that will enable params authentication only for the
|
53
|
-
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
54
|
-
# enable it only for database (email + password) authentication.
|
55
|
-
# config.params_authenticatable = true
|
56
|
-
|
57
|
-
# Tell if authentication through HTTP Auth is enabled. False by default.
|
58
|
-
# It can be set to an array that will enable http authentication only for the
|
59
|
-
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
60
|
-
# enable it only for database authentication. The supported strategies are:
|
61
|
-
# :database = Support basic authentication with authentication key + password
|
62
|
-
# config.http_authenticatable = false
|
63
|
-
|
64
|
-
# If 401 status code should be returned for AJAX requests. True by default.
|
65
|
-
# config.http_authenticatable_on_xhr = true
|
66
|
-
|
67
|
-
# The realm used in Http Basic Authentication. 'Application' by default.
|
68
|
-
# config.http_authentication_realm = 'Application'
|
69
|
-
|
70
|
-
# It will change confirmation, password recovery and other workflows
|
71
|
-
# to behave the same regardless if the e-mail provided was right or wrong.
|
72
|
-
# Does not affect registerable.
|
73
|
-
# config.paranoid = true
|
74
|
-
|
75
|
-
# By default Devise will store the user in session. You can skip storage for
|
76
|
-
# particular strategies by setting this option.
|
77
|
-
# Notice that if you are skipping storage for all authentication paths, you
|
78
|
-
# may want to disable generating routes to Devise's sessions controller by
|
79
|
-
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
80
|
-
config.skip_session_storage = [:http_auth]
|
81
|
-
|
82
|
-
# By default, Devise cleans up the CSRF token on authentication to
|
83
|
-
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
84
|
-
# requests for sign in and sign up, you need to get a new CSRF token
|
85
|
-
# from the server. You can disable this option at your own risk.
|
86
|
-
# config.clean_up_csrf_token_on_authentication = true
|
87
|
-
|
88
|
-
# ==> Configuration for :database_authenticatable
|
89
|
-
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
90
|
-
# using other encryptors, it sets how many times you want the password re-encrypted.
|
91
|
-
#
|
92
|
-
# Limiting the stretches to just one in testing will increase the performance of
|
93
|
-
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
94
|
-
# a value less than 10 in other environments. Note that, for bcrypt (the default
|
95
|
-
# encryptor), the cost increases exponentially with the number of stretches (e.g.
|
96
|
-
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
|
97
|
-
config.stretches = Rails.env.test? ? 1 : 10
|
98
|
-
|
99
|
-
# Setup a pepper to generate the encrypted password.
|
100
|
-
# config.pepper = 'a48d02be2cbed502fb11d5229a87d994e2ed8932abec7c6e1d5d5fe0f33953f1b62f1dd40ee7acf7dad6ad020f6f8486c5e99aaa4eafb06f53f57cad0014023d'
|
101
|
-
|
102
|
-
# ==> Configuration for :confirmable
|
103
|
-
# A period that the user is allowed to access the website even without
|
104
|
-
# confirming their account. For instance, if set to 2.days, the user will be
|
105
|
-
# able to access the website for two days without confirming their account,
|
106
|
-
# access will be blocked just in the third day. Default is 0.days, meaning
|
107
|
-
# the user cannot access the website without confirming their account.
|
108
|
-
# config.allow_unconfirmed_access_for = 2.days
|
109
|
-
|
110
|
-
# A period that the user is allowed to confirm their account before their
|
111
|
-
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
112
|
-
# their account within 3 days after the mail was sent, but on the fourth day
|
113
|
-
# their account can't be confirmed with the token any more.
|
114
|
-
# Default is nil, meaning there is no restriction on how long a user can take
|
115
|
-
# before confirming their account.
|
116
|
-
# config.confirm_within = 3.days
|
117
|
-
|
118
|
-
# If true, requires any email changes to be confirmed (exactly the same way as
|
119
|
-
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
120
|
-
# db field (see migrations). Until confirmed, new email is stored in
|
121
|
-
# unconfirmed_email column, and copied to email column on successful confirmation.
|
122
|
-
config.reconfirmable = true
|
123
|
-
|
124
|
-
# Defines which key will be used when confirming an account
|
125
|
-
# config.confirmation_keys = [ :email ]
|
126
|
-
|
127
|
-
# ==> Configuration for :rememberable
|
128
|
-
# The time the user will be remembered without asking for credentials again.
|
129
|
-
# config.remember_for = 2.weeks
|
130
|
-
|
131
|
-
# Invalidates all the remember me tokens when the user signs out.
|
132
|
-
config.expire_all_remember_me_on_sign_out = true
|
133
|
-
|
134
|
-
# If true, extends the user's remember period when remembered via cookie.
|
135
|
-
# config.extend_remember_period = false
|
136
|
-
|
137
|
-
# Options to be passed to the created cookie. For instance, you can set
|
138
|
-
# secure: true in order to force SSL only cookies.
|
139
|
-
# config.rememberable_options = {}
|
140
|
-
|
141
|
-
# ==> Configuration for :validatable
|
142
|
-
# Range for password length.
|
143
|
-
config.password_length = 8..128
|
144
|
-
|
145
|
-
# Email regex used to validate email formats. It simply asserts that
|
146
|
-
# one (and only one) @ exists in the given string. This is mainly
|
147
|
-
# to give user feedback and not to assert the e-mail validity.
|
148
|
-
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
149
|
-
|
150
|
-
# ==> Configuration for :timeoutable
|
151
|
-
# The time you want to timeout the user session without activity. After this
|
152
|
-
# time the user will be asked for credentials again. Default is 30 minutes.
|
153
|
-
# config.timeout_in = 30.minutes
|
154
|
-
|
155
|
-
# If true, expires auth token on session timeout.
|
156
|
-
# config.expire_auth_token_on_timeout = false
|
157
|
-
|
158
|
-
# ==> Configuration for :lockable
|
159
|
-
# Defines which strategy will be used to lock an account.
|
160
|
-
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
161
|
-
# :none = No lock strategy. You should handle locking by yourself.
|
162
|
-
# config.lock_strategy = :failed_attempts
|
163
|
-
|
164
|
-
# Defines which key will be used when locking and unlocking an account
|
165
|
-
# config.unlock_keys = [ :email ]
|
166
|
-
|
167
|
-
# Defines which strategy will be used to unlock an account.
|
168
|
-
# :email = Sends an unlock link to the user email
|
169
|
-
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
170
|
-
# :both = Enables both strategies
|
171
|
-
# :none = No unlock strategy. You should handle unlocking by yourself.
|
172
|
-
# config.unlock_strategy = :both
|
173
|
-
|
174
|
-
# Number of authentication tries before locking an account if lock_strategy
|
175
|
-
# is failed attempts.
|
176
|
-
# config.maximum_attempts = 20
|
177
|
-
|
178
|
-
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
179
|
-
# config.unlock_in = 1.hour
|
180
|
-
|
181
|
-
# Warn on the last attempt before the account is locked.
|
182
|
-
# config.last_attempt_warning = true
|
183
|
-
|
184
|
-
# ==> Configuration for :recoverable
|
185
|
-
#
|
186
|
-
# Defines which key will be used when recovering the password for an account
|
187
|
-
# config.reset_password_keys = [ :email ]
|
188
|
-
|
189
|
-
# Time interval you can reset your password with a reset password key.
|
190
|
-
# Don't put a too small interval or your users won't have the time to
|
191
|
-
# change their passwords.
|
192
|
-
config.reset_password_within = 6.hours
|
193
|
-
|
194
|
-
# ==> Configuration for :encryptable
|
195
|
-
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
196
|
-
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
197
|
-
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
198
|
-
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
199
|
-
# REST_AUTH_SITE_KEY to pepper).
|
200
|
-
#
|
201
|
-
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
202
|
-
# config.encryptor = :sha512
|
203
|
-
|
204
|
-
# ==> Scopes configuration
|
205
|
-
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
206
|
-
# "users/sessions/new". It's turned off by default because it's slower if you
|
207
|
-
# are using only default views.
|
208
|
-
# config.scoped_views = false
|
209
|
-
|
210
|
-
# Configure the default scope given to Warden. By default it's the first
|
211
|
-
# devise role declared in your routes (usually :user).
|
212
|
-
# config.default_scope = :user
|
213
|
-
|
214
|
-
# Set this configuration to false if you want /users/sign_out to sign out
|
215
|
-
# only the current scope. By default, Devise signs out all scopes.
|
216
|
-
# config.sign_out_all_scopes = true
|
217
|
-
|
218
|
-
# ==> Navigation configuration
|
219
|
-
# Lists the formats that should be treated as navigational. Formats like
|
220
|
-
# :html, should redirect to the sign in page when the user does not have
|
221
|
-
# access, but formats like :xml or :json, should return 401.
|
222
|
-
#
|
223
|
-
# If you have any extra navigational formats, like :iphone or :mobile, you
|
224
|
-
# should add them to the navigational formats lists.
|
225
|
-
#
|
226
|
-
# The "*/*" below is required to match Internet Explorer requests.
|
227
|
-
# config.navigational_formats = ['*/*', :html]
|
228
|
-
|
229
|
-
# The default HTTP method used to sign out a resource. Default is :delete.
|
230
|
-
config.sign_out_via = :delete
|
231
|
-
|
232
|
-
# ==> OmniAuth
|
233
|
-
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
234
|
-
# up on your models and hooks.
|
235
|
-
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
236
|
-
|
237
|
-
# ==> Warden configuration
|
238
|
-
# If you want to use other strategies, that are not supported by Devise, or
|
239
|
-
# change the failure app, you can configure them inside the config.warden block.
|
240
|
-
#
|
241
|
-
# config.warden do |manager|
|
242
|
-
# manager.intercept_401 = false
|
243
|
-
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
244
|
-
# end
|
245
|
-
|
246
|
-
# ==> Mountable engine configurations
|
247
|
-
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
248
|
-
# is mountable, there are some extra configurations to be taken into account.
|
249
|
-
# The following options are available, assuming the engine is mounted as:
|
250
|
-
#
|
251
|
-
# mount MyEngine, at: '/my_engine'
|
252
|
-
#
|
253
|
-
# The router that invoked `devise_for`, in the example above, would be:
|
254
|
-
# config.router_name = :my_engine
|
255
|
-
#
|
256
|
-
# When using omniauth, Devise cannot automatically set Omniauth path,
|
257
|
-
# so you need to do it manually. For the users scope, it would be:
|
258
|
-
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
259
|
-
end
|