fuck_comments 2.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +30 -0
  3. data/.ruby-gemset.example +1 -0
  4. data/.ruby-version.example +1 -0
  5. data/.rvmrc.example +1 -0
  6. data/.travis.yml +5 -0
  7. data/Gemfile +4 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +338 -0
  10. data/Rakefile +1 -0
  11. data/app/assets/javascripts/the_comments.js.coffee +108 -0
  12. data/app/assets/javascripts/the_comments_manage.js.coffee +27 -0
  13. data/app/assets/stylesheets/the_comments.css.scss +248 -0
  14. data/app/controllers/_templates_/comments_controller.rb +44 -0
  15. data/app/controllers/concerns/the_comments/controller.rb +197 -0
  16. data/app/controllers/concerns/the_comments/view_token.rb +20 -0
  17. data/app/helpers/render_comments_tree_helper.rb +111 -0
  18. data/app/models/_templates_/comment.rb +38 -0
  19. data/app/models/concerns/the_comments/comment.rb +116 -0
  20. data/app/models/concerns/the_comments/comment_states.rb +80 -0
  21. data/app/models/concerns/the_comments/commentable.rb +69 -0
  22. data/app/models/concerns/the_comments/user.rb +56 -0
  23. data/app/views/the_comments/_tree.html.erb +3 -0
  24. data/app/views/the_comments/haml/_additional_info.html.haml +13 -0
  25. data/app/views/the_comments/haml/_comment.html.haml +1 -0
  26. data/app/views/the_comments/haml/_comment_body.html.haml +25 -0
  27. data/app/views/the_comments/haml/_comment_edit.html.haml +26 -0
  28. data/app/views/the_comments/haml/_form.html.haml +8 -0
  29. data/app/views/the_comments/haml/_guest_form.html.haml +22 -0
  30. data/app/views/the_comments/haml/_logined_form.html.haml +18 -0
  31. data/app/views/the_comments/haml/_manage_controls.html.haml +30 -0
  32. data/app/views/the_comments/haml/_sidebar.html.haml +9 -0
  33. data/app/views/the_comments/haml/_sidebar_admin.html.haml +12 -0
  34. data/app/views/the_comments/haml/_sidebar_backlink.html.haml +3 -0
  35. data/app/views/the_comments/haml/_sidebar_user.html.haml +29 -0
  36. data/app/views/the_comments/haml/_tree.html.haml +16 -0
  37. data/app/views/the_comments/haml/manage.html.haml +26 -0
  38. data/app/views/the_comments/slim/_additional_info.html.slim +13 -0
  39. data/app/views/the_comments/slim/_comment.html.slim +1 -0
  40. data/app/views/the_comments/slim/_comment_body.html.slim +24 -0
  41. data/app/views/the_comments/slim/_comment_edit.html.slim +26 -0
  42. data/app/views/the_comments/slim/_form.html.slim +8 -0
  43. data/app/views/the_comments/slim/_guest_form.html.slim +22 -0
  44. data/app/views/the_comments/slim/_logined_form.html.slim +18 -0
  45. data/app/views/the_comments/slim/_manage_controls.html.slim +30 -0
  46. data/app/views/the_comments/slim/_sidebar.html.slim +9 -0
  47. data/app/views/the_comments/slim/_sidebar_admin.html.slim +12 -0
  48. data/app/views/the_comments/slim/_sidebar_backlink.html.slim +3 -0
  49. data/app/views/the_comments/slim/_sidebar_user.html.slim +29 -0
  50. data/app/views/the_comments/slim/_tree.html.slim +16 -0
  51. data/app/views/the_comments/slim/index.html.slim +18 -0
  52. data/app/views/the_comments/slim/manage.html.slim +26 -0
  53. data/app/views/the_comments/slim/my_comments.html.slim +28 -0
  54. data/config/initializers/the_comments.rb +15 -0
  55. data/config/locales/en.yml +68 -0
  56. data/config/locales/ru.yml +71 -0
  57. data/config/routes.rb +38 -0
  58. data/db/migrate/20130101010101_the_comments_change_user.rb +18 -0
  59. data/db/migrate/20130101010102_the_comments_create_comments.rb +50 -0
  60. data/db/migrate/20130101010103_the_comments_change_commentable.rb +13 -0
  61. data/docs/admin_ui_installation.md +145 -0
  62. data/docs/advanced_installation.md +185 -0
  63. data/docs/comment_api.md +58 -0
  64. data/docs/commentable_api.md +59 -0
  65. data/docs/config_file.md +27 -0
  66. data/docs/content_preprocessors.md +73 -0
  67. data/docs/customazation_of_views.md +30 -0
  68. data/docs/denormalization_and_recent_comments.md +40 -0
  69. data/docs/documentation.md +29 -0
  70. data/docs/generators.md +74 -0
  71. data/docs/pagination.md +123 -0
  72. data/docs/routes.md +77 -0
  73. data/docs/screencast.jpg +0 -0
  74. data/docs/the_comments.jpg +0 -0
  75. data/docs/the_comments_view_1.gif +0 -0
  76. data/docs/the_comments_view_2.gif +0 -0
  77. data/docs/the_comments_view_3.gif +0 -0
  78. data/docs/the_comments_view_4.gif +0 -0
  79. data/docs/the_comments_view_5.gif +0 -0
  80. data/docs/user_api.md +75 -0
  81. data/docs/what_is_comcoms.md +63 -0
  82. data/docs/whats_wrong_with_other_gems.md +28 -0
  83. data/docs/where_is_example_application.md +37 -0
  84. data/gem_version.rb +3 -0
  85. data/lib/generators/the_comments/USAGE +44 -0
  86. data/lib/generators/the_comments/the_comments_generator.rb +56 -0
  87. data/lib/generators/the_comments/views_generator.rb +79 -0
  88. data/lib/the_comments/config.rb +39 -0
  89. data/lib/the_comments/version.rb +1 -0
  90. data/lib/the_comments.rb +27 -0
  91. data/spec/dummy_app/.gitignore +18 -0
  92. data/spec/dummy_app/.rspec +1 -0
  93. data/spec/dummy_app/Gemfile +43 -0
  94. data/spec/dummy_app/README.md +33 -0
  95. data/spec/dummy_app/Rakefile +6 -0
  96. data/spec/dummy_app/app/assets/images/.keep +0 -0
  97. data/spec/dummy_app/app/assets/javascripts/admin_panel.js +5 -0
  98. data/spec/dummy_app/app/assets/javascripts/application.js +16 -0
  99. data/spec/dummy_app/app/assets/stylesheets/admin_panel.css +3 -0
  100. data/spec/dummy_app/app/assets/stylesheets/app.css.scss +4 -0
  101. data/spec/dummy_app/app/assets/stylesheets/application.css +16 -0
  102. data/spec/dummy_app/app/controllers/application_controller.rb +7 -0
  103. data/spec/dummy_app/app/controllers/comments_controller.rb +28 -0
  104. data/spec/dummy_app/app/controllers/concerns/.keep +0 -0
  105. data/spec/dummy_app/app/controllers/posts_controller.rb +13 -0
  106. data/spec/dummy_app/app/controllers/users_controller.rb +7 -0
  107. data/spec/dummy_app/app/helpers/application_helper.rb +2 -0
  108. data/spec/dummy_app/app/mailers/.keep +0 -0
  109. data/spec/dummy_app/app/models/.keep +0 -0
  110. data/spec/dummy_app/app/models/comment.rb +32 -0
  111. data/spec/dummy_app/app/models/concerns/.keep +0 -0
  112. data/spec/dummy_app/app/models/post.rb +17 -0
  113. data/spec/dummy_app/app/models/user.rb +21 -0
  114. data/spec/dummy_app/app/views/layouts/admin.html.haml +25 -0
  115. data/spec/dummy_app/app/views/layouts/application.html.haml +20 -0
  116. data/spec/dummy_app/app/views/posts/index.html.haml +22 -0
  117. data/spec/dummy_app/app/views/posts/show.html.haml +7 -0
  118. data/spec/dummy_app/bin/bundle +3 -0
  119. data/spec/dummy_app/bin/rails +4 -0
  120. data/spec/dummy_app/bin/rake +4 -0
  121. data/spec/dummy_app/config/application.rb +23 -0
  122. data/spec/dummy_app/config/boot.rb +4 -0
  123. data/spec/dummy_app/config/database.yml +11 -0
  124. data/spec/dummy_app/config/environment.rb +5 -0
  125. data/spec/dummy_app/config/environments/development.rb +29 -0
  126. data/spec/dummy_app/config/environments/production.rb +80 -0
  127. data/spec/dummy_app/config/environments/test.rb +36 -0
  128. data/spec/dummy_app/config/initializers/backtrace_silencers.rb +7 -0
  129. data/spec/dummy_app/config/initializers/filter_parameter_logging.rb +4 -0
  130. data/spec/dummy_app/config/initializers/inflections.rb +16 -0
  131. data/spec/dummy_app/config/initializers/mime_types.rb +5 -0
  132. data/spec/dummy_app/config/initializers/secret_token.rb +12 -0
  133. data/spec/dummy_app/config/initializers/session_store.rb +3 -0
  134. data/spec/dummy_app/config/initializers/sorcery.rb +437 -0
  135. data/spec/dummy_app/config/initializers/the_comments.rb +15 -0
  136. data/spec/dummy_app/config/initializers/wrap_parameters.rb +14 -0
  137. data/spec/dummy_app/config/locales/en.yml +23 -0
  138. data/spec/dummy_app/config/routes.rb +19 -0
  139. data/spec/dummy_app/config.ru +4 -0
  140. data/spec/dummy_app/db/migrate/20130712061503_sorcery_core.rb +16 -0
  141. data/spec/dummy_app/db/migrate/20130712065951_create_posts.rb +11 -0
  142. data/spec/dummy_app/db/migrate/20131027185332_change_user.the_comments_engine.rb +19 -0
  143. data/spec/dummy_app/db/migrate/20131027185333_create_comments.the_comments_engine.rb +51 -0
  144. data/spec/dummy_app/db/migrate/20131027185334_change_commentable.the_comments_engine.rb +14 -0
  145. data/spec/dummy_app/db/schema.rb +74 -0
  146. data/spec/dummy_app/db/seeds.rb +42 -0
  147. data/spec/dummy_app/lib/assets/.keep +0 -0
  148. data/spec/dummy_app/lib/tasks/.keep +0 -0
  149. data/spec/dummy_app/lib/tasks/app_bootstrap.rake +15 -0
  150. data/spec/dummy_app/log/.keep +0 -0
  151. data/spec/dummy_app/public/404.html +58 -0
  152. data/spec/dummy_app/public/422.html +58 -0
  153. data/spec/dummy_app/public/500.html +57 -0
  154. data/spec/dummy_app/public/favicon.ico +0 -0
  155. data/spec/dummy_app/public/robots.txt +5 -0
  156. data/spec/dummy_app/spec/factories/post.rb +6 -0
  157. data/spec/dummy_app/spec/factories/user.rb +6 -0
  158. data/spec/dummy_app/spec/models/user_counters_spec.rb +339 -0
  159. data/spec/dummy_app/spec/spec_helper.rb +29 -0
  160. data/spec/dummy_app/test/controllers/.keep +0 -0
  161. data/spec/dummy_app/test/fixtures/.keep +0 -0
  162. data/spec/dummy_app/test/helpers/.keep +0 -0
  163. data/spec/dummy_app/test/integration/.keep +0 -0
  164. data/spec/dummy_app/test/mailers/.keep +0 -0
  165. data/spec/dummy_app/test/models/.keep +0 -0
  166. data/spec/dummy_app/test/test_helper.rb +15 -0
  167. data/spec/dummy_app/vendor/assets/javascripts/.keep +0 -0
  168. data/spec/dummy_app/vendor/assets/stylesheets/.keep +0 -0
  169. data/the_comments.gemspec +23 -0
  170. data/views_converter.rb +16 -0
  171. metadata +332 -0
@@ -0,0 +1,36 @@
1
+ App::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = "public, max-age=3600"
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Print deprecation notices to the stderr.
35
+ config.active_support.deprecation = :stderr
36
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ App::Application.config.secret_key_base = '27b186570a6fd4b0fbbb16c50a61dc99cb695db28beadceed09ee5717dbb1cd1b75042e548cc595fd1a2465a5313006f54f27b169856fb4db1db0ff50c9ae756'
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ App::Application.config.session_store :cookie_store, key: '_app_session'
@@ -0,0 +1,437 @@
1
+ # The first thing you need to configure is which modules you need in your app.
2
+ # The default is nothing which will include only core features (password encryption, login/logout).
3
+ # Available submodules are: :user_activation, :http_basic_auth, :remember_me,
4
+ # :reset_password, :session_timeout, :brute_force_protection, :activity_logging, :external
5
+ Rails.application.config.sorcery.submodules = [:reset_password]
6
+
7
+ # Here you can configure each submodule's features.
8
+ Rails.application.config.sorcery.configure do |config|
9
+ # -- core --
10
+ # What controller action to call for non-authenticated users. You can also
11
+ # override the 'not_authenticated' method of course.
12
+ # Default: `:not_authenticated`
13
+ #
14
+ # config.not_authenticated_action =
15
+
16
+
17
+ # When a non logged in user tries to enter a page that requires login, save
18
+ # the URL he wanted to reach, and send him there after login, using 'redirect_back_or_to'.
19
+ # Default: `true`
20
+ #
21
+ # config.save_return_to_url =
22
+
23
+
24
+ # Set domain option for cookies; Useful for remember_me submodule.
25
+ # Default: `nil`
26
+ #
27
+ # config.cookie_domain =
28
+
29
+
30
+ # -- session timeout --
31
+ # How long in seconds to keep the session alive.
32
+ # Default: `3600`
33
+ #
34
+ # config.session_timeout =
35
+
36
+
37
+ # Use the last action as the beginning of session timeout.
38
+ # Default: `false`
39
+ #
40
+ # config.session_timeout_from_last_action =
41
+
42
+
43
+ # -- http_basic_auth --
44
+ # What realm to display for which controller name. For example {"My App" => "Application"}
45
+ # Default: `{"application" => "Application"}`
46
+ #
47
+ # config.controller_to_realm_map =
48
+
49
+
50
+ # -- activity logging --
51
+ # will register the time of last user login, every login.
52
+ # Default: `true`
53
+ #
54
+ # config.register_login_time =
55
+
56
+
57
+ # will register the time of last user logout, every logout.
58
+ # Default: `true`
59
+ #
60
+ # config.register_logout_time =
61
+
62
+
63
+ # will register the time of last user action, every action.
64
+ # Default: `true`
65
+ #
66
+ # config.register_last_activity_time =
67
+
68
+
69
+ # -- external --
70
+ # What providers are supported by this app, i.e. [:twitter, :facebook, :github, :linkedin, :xing, :google, :liveid] .
71
+ # Default: `[]`
72
+ #
73
+ # config.external_providers =
74
+
75
+
76
+ # You can change it by your local ca_file. i.e. '/etc/pki/tls/certs/ca-bundle.crt'
77
+ # Path to ca_file. By default use a internal ca-bundle.crt.
78
+ # Default: `'path/to/ca_file'`
79
+ #
80
+ # config.ca_file =
81
+
82
+
83
+ # For information about LinkedIn API:
84
+ # - user info fields go to https://developer.linkedin.com/documents/profile-fields
85
+ # - access permissions go to https://developer.linkedin.com/documents/authentication#granting
86
+ #
87
+ # config.linkedin.key = ""
88
+ # config.linkedin.secret = ""
89
+ # config.linkedin.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=linkedin"
90
+ # config.linkedin.user_info_fields = ['first-name', 'last-name']
91
+ # config.linkedin.user_info_mapping = {first_name: "firstName", last_name: "lastName"}
92
+ # config.linkedin.access_permissions = ['r_basicprofile']
93
+ #
94
+ #
95
+ # For information about XING API:
96
+ # - user info fields go to https://dev.xing.com/docs/get/users/me
97
+ #
98
+ # config.xing.key = ""
99
+ # config.xing.secret = ""
100
+ # config.xing.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=xing"
101
+ # config.xing.user_info_mapping = {first_name: "first_name", last_name: "last_name"}
102
+ #
103
+ #
104
+ # Twitter wil not accept any requests nor redirect uri containing localhost,
105
+ # make sure you use 0.0.0.0:3000 to access your app in development
106
+ #
107
+ # config.twitter.key = ""
108
+ # config.twitter.secret = ""
109
+ # config.twitter.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=twitter"
110
+ # config.twitter.user_info_mapping = {:email => "screen_name"}
111
+ #
112
+ # config.facebook.key = ""
113
+ # config.facebook.secret = ""
114
+ # config.facebook.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=facebook"
115
+ # config.facebook.user_info_mapping = {:email => "name"}
116
+ # config.facebook.access_permissions = ["email", "publish_stream"]
117
+ #
118
+ # config.github.key = ""
119
+ # config.github.secret = ""
120
+ # config.github.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=github"
121
+ # config.github.user_info_mapping = {:email => "name"}
122
+ #
123
+ # config.google.key = ""
124
+ # config.google.secret = ""
125
+ # config.google.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=google"
126
+ # config.google.user_info_mapping = {:email => "email", :username => "name"}
127
+ #
128
+ # config.vk.key = ""
129
+ # config.vk.secret = ""
130
+ # config.vk.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=vk"
131
+ # config.vk.user_info_mapping = {:login => "domain", :name => "full_name"}
132
+ #
133
+ # To use liveid in development mode you have to replace mydomain.com with
134
+ # a valid domain even in development. To use a valid domain in development
135
+ # simply add your domain in your /etc/hosts file in front of 127.0.0.1
136
+ #
137
+ # config.liveid.key = ""
138
+ # config.liveid.secret = ""
139
+ # config.liveid.callback_url = "http://mydomain.com:3000/oauth/callback?provider=liveid"
140
+ # config.liveid.user_info_mapping = {:username => "name"}
141
+
142
+
143
+ # --- user config ---
144
+ config.user_config do |user|
145
+ # -- core --
146
+ # specify username attributes, for example: [:username, :email].
147
+ # Default: `[:username]`
148
+ #
149
+ # user.username_attribute_names =
150
+
151
+
152
+ # change *virtual* password attribute, the one which is used until an encrypted one is generated.
153
+ # Default: `:password`
154
+ #
155
+ # user.password_attribute_name =
156
+
157
+
158
+ # downcase the username before trying to authenticate, default is false
159
+ # Default: `false`
160
+ #
161
+ # user.downcase_username_before_authenticating =
162
+
163
+
164
+ # change default email attribute.
165
+ # Default: `:email`
166
+ #
167
+ # user.email_attribute_name =
168
+
169
+
170
+ # change default crypted_password attribute.
171
+ # Default: `:crypted_password`
172
+ #
173
+ # user.crypted_password_attribute_name =
174
+
175
+
176
+ # what pattern to use to join the password with the salt
177
+ # Default: `""`
178
+ #
179
+ # user.salt_join_token =
180
+
181
+
182
+ # change default salt attribute.
183
+ # Default: `:salt`
184
+ #
185
+ # user.salt_attribute_name =
186
+
187
+
188
+ # how many times to apply encryption to the password.
189
+ # Default: `nil`
190
+ #
191
+ # user.stretches =
192
+
193
+
194
+ # encryption key used to encrypt reversible encryptions such as AES256.
195
+ # WARNING: If used for users' passwords, changing this key will leave passwords undecryptable!
196
+ # Default: `nil`
197
+ #
198
+ # user.encryption_key =
199
+
200
+
201
+ # use an external encryption class.
202
+ # Default: `nil`
203
+ #
204
+ # user.custom_encryption_provider =
205
+
206
+
207
+ # encryption algorithm name. See 'encryption_algorithm=' for available options.
208
+ # Default: `:bcrypt`
209
+ #
210
+ # user.encryption_algorithm =
211
+
212
+
213
+ # make this configuration inheritable for subclasses. Useful for ActiveRecord's STI.
214
+ # Default: `false`
215
+ #
216
+ # user.subclasses_inherit_config =
217
+
218
+
219
+ # -- remember_me --
220
+ # allow the remember_me cookie to settable through AJAX
221
+ # Default: `true`
222
+ #
223
+ # user.remember_me_httponly =
224
+
225
+ # How long in seconds the session length will be
226
+ # Default: `604800`
227
+ #
228
+ # user.remember_me_for =
229
+
230
+
231
+ # -- user_activation --
232
+ # the attribute name to hold activation state (active/pending).
233
+ # Default: `:activation_state`
234
+ #
235
+ # user.activation_state_attribute_name =
236
+
237
+
238
+ # the attribute name to hold activation code (sent by email).
239
+ # Default: `:activation_token`
240
+ #
241
+ # user.activation_token_attribute_name =
242
+
243
+
244
+ # the attribute name to hold activation code expiration date.
245
+ # Default: `:activation_token_expires_at`
246
+ #
247
+ # user.activation_token_expires_at_attribute_name =
248
+
249
+
250
+ # how many seconds before the activation code expires. nil for never expires.
251
+ # Default: `nil`
252
+ #
253
+ # user.activation_token_expiration_period =
254
+
255
+
256
+ # your mailer class. Required.
257
+ # Default: `nil`
258
+ #
259
+ # user.user_activation_mailer =
260
+
261
+
262
+ # when true sorcery will not automatically
263
+ # email activation details and allow you to
264
+ # manually handle how and when email is sent.
265
+ # Default: `false`
266
+ #
267
+ # user.activation_mailer_disabled =
268
+
269
+
270
+ # activation needed email method on your mailer class.
271
+ # Default: `:activation_needed_email`
272
+ #
273
+ # user.activation_needed_email_method_name =
274
+
275
+
276
+ # activation success email method on your mailer class.
277
+ # Default: `:activation_success_email`
278
+ #
279
+ # user.activation_success_email_method_name =
280
+
281
+
282
+ # do you want to prevent or allow users that did not activate by email to login?
283
+ # Default: `true`
284
+ #
285
+ # user.prevent_non_active_users_to_login =
286
+
287
+
288
+ # -- reset_password --
289
+ # reset password code attribute name.
290
+ # Default: `:reset_password_token`
291
+ #
292
+ # user.reset_password_token_attribute_name =
293
+
294
+
295
+ # expires at attribute name.
296
+ # Default: `:reset_password_token_expires_at`
297
+ #
298
+ # user.reset_password_token_expires_at_attribute_name =
299
+
300
+
301
+ # when was email sent, used for hammering protection.
302
+ # Default: `:reset_password_email_sent_at`
303
+ #
304
+ # user.reset_password_email_sent_at_attribute_name =
305
+
306
+
307
+ # mailer class. Needed.
308
+ # Default: `nil`
309
+ #
310
+ # user.reset_password_mailer = ResetPasswordMailer
311
+
312
+
313
+ # reset password email method on your mailer class.
314
+ # Default: `:reset_password_email`
315
+ #
316
+ # user.reset_password_email_method_name =
317
+
318
+
319
+ # when true sorcery will not automatically
320
+ # email password reset details and allow you to
321
+ # manually handle how and when email is sent
322
+ # Default: `false`
323
+ #
324
+ user.reset_password_mailer_disabled = true
325
+
326
+
327
+ # how many seconds before the reset request expires. nil for never expires.
328
+ # Default: `nil`
329
+ #
330
+ # user.reset_password_expiration_period =
331
+
332
+
333
+ # hammering protection, how long to wait before allowing another email to be sent.
334
+ # Default: `5 * 60`
335
+ #
336
+ # user.reset_password_time_between_emails =
337
+
338
+
339
+ # -- brute_force_protection --
340
+ # Failed logins attribute name.
341
+ # Default: `:failed_logins_count`
342
+ #
343
+ # user.failed_logins_count_attribute_name =
344
+
345
+
346
+ # This field indicates whether user is banned and when it will be active again.
347
+ # Default: `:lock_expires_at`
348
+ #
349
+ # user.lock_expires_at_attribute_name =
350
+
351
+
352
+ # How many failed logins allowed.
353
+ # Default: `50`
354
+ #
355
+ # user.consecutive_login_retries_amount_limit =
356
+
357
+
358
+ # How long the user should be banned. in seconds. 0 for permanent.
359
+ # Default: `60 * 60`
360
+ #
361
+ # user.login_lock_time_period =
362
+
363
+ # Unlock token attribute name
364
+ # Default: `:unlock_token`
365
+ #
366
+ # user.unlock_token_attribute_name =
367
+
368
+ # Unlock token mailer method
369
+ # Default: `:send_unlock_token_email`
370
+ #
371
+ # user.unlock_token_email_method_name =
372
+
373
+ # when true sorcery will not automatically
374
+ # send email with unlock token
375
+ # Default: `false`
376
+ #
377
+ # user.unlock_token_mailer_disabled = true
378
+
379
+ # Unlock token mailer class
380
+ # Default: `nil`
381
+ #
382
+ # user.unlock_token_mailer = UserMailer
383
+
384
+ # -- activity logging --
385
+ # Last login attribute name.
386
+ # Default: `:last_login_at`
387
+ #
388
+ # user.last_login_at_attribute_name =
389
+
390
+
391
+ # Last logout attribute name.
392
+ # Default: `:last_logout_at`
393
+ #
394
+ # user.last_logout_at_attribute_name =
395
+
396
+
397
+ # Last activity attribute name.
398
+ # Default: `:last_activity_at`
399
+ #
400
+ # user.last_activity_at_attribute_name =
401
+
402
+
403
+ # How long since last activity is he user defined logged out?
404
+ # Default: `10 * 60`
405
+ #
406
+ # user.activity_timeout =
407
+
408
+
409
+ # -- external --
410
+ # Class which holds the various external provider data for this user.
411
+ # Default: `nil`
412
+ #
413
+ # user.authentications_class =
414
+
415
+
416
+ # User's identifier in authentications class.
417
+ # Default: `:user_id`
418
+ #
419
+ # user.authentications_user_id_attribute_name =
420
+
421
+
422
+ # Provider's identifier in authentications class.
423
+ # Default: `:provider`
424
+ #
425
+ # user.provider_attribute_name =
426
+
427
+
428
+ # User's external unique identifier in authentications class.
429
+ # Default: `:uid`
430
+ #
431
+ # user.provider_uid_attribute_name =
432
+ end
433
+
434
+ # This line must come after the 'user config' block.
435
+ # Define which model authenticates with sorcery.
436
+ config.user_class = "User"
437
+ end