raygun 0.0.34 → 0.9.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/CHANGES.md +7 -1
  4. data/README.md +7 -11
  5. data/bin/raygun +4 -181
  6. data/cleanup.sh +1 -6
  7. data/lib/raygun/raygun.rb +238 -0
  8. data/lib/raygun/version.rb +1 -1
  9. metadata +6 -223
  10. data/TODO.md +0 -16
  11. data/rails_32/.env +0 -8
  12. data/rails_32/.gitignore +0 -19
  13. data/rails_32/.rspec +0 -1
  14. data/rails_32/.ruby-gemset +0 -1
  15. data/rails_32/.ruby-version +0 -1
  16. data/rails_32/Gemfile +0 -54
  17. data/rails_32/Guardfile +0 -32
  18. data/rails_32/Procfile +0 -2
  19. data/rails_32/README.md +0 -69
  20. data/rails_32/Rakefile +0 -15
  21. data/rails_32/app/assets/javascripts/application.js +0 -16
  22. data/rails_32/app/assets/javascripts/users.js.coffee +0 -3
  23. data/rails_32/app/assets/stylesheets/_footer.less +0 -30
  24. data/rails_32/app/assets/stylesheets/_navbar.less +0 -5
  25. data/rails_32/app/assets/stylesheets/application.css.less +0 -3
  26. data/rails_32/app/controllers/application_controller.rb +0 -15
  27. data/rails_32/app/controllers/pages_controller.rb +0 -8
  28. data/rails_32/app/controllers/password_resets_controller.rb +0 -36
  29. data/rails_32/app/controllers/registrations_controller.rb +0 -29
  30. data/rails_32/app/controllers/user_sessions_controller.rb +0 -26
  31. data/rails_32/app/controllers/users_controller.rb +0 -41
  32. data/rails_32/app/helpers/application_helper.rb +0 -11
  33. data/rails_32/app/helpers/users_helper.rb +0 -2
  34. data/rails_32/app/mailers/.gitkeep +0 -0
  35. data/rails_32/app/mailers/user_mailer.rb +0 -19
  36. data/rails_32/app/models/.gitkeep +0 -0
  37. data/rails_32/app/models/ability.rb +0 -40
  38. data/rails_32/app/models/user.rb +0 -21
  39. data/rails_32/app/models/user_session.rb +0 -6
  40. data/rails_32/app/views/layouts/application.html.slim +0 -36
  41. data/rails_32/app/views/pages/root.html.slim +0 -9
  42. data/rails_32/app/views/password_resets/edit.html.slim +0 -15
  43. data/rails_32/app/views/password_resets/new.html.slim +0 -11
  44. data/rails_32/app/views/registrations/new.html.slim +0 -13
  45. data/rails_32/app/views/user_mailer/activation_needed_email.html.erb +0 -17
  46. data/rails_32/app/views/user_mailer/activation_needed_email.text.erb +0 -9
  47. data/rails_32/app/views/user_mailer/activation_success_email.html.erb +0 -17
  48. data/rails_32/app/views/user_mailer/activation_success_email.text.erb +0 -9
  49. data/rails_32/app/views/user_mailer/reset_password_email.html.erb +0 -16
  50. data/rails_32/app/views/user_mailer/reset_password_email.text.erb +0 -8
  51. data/rails_32/app/views/user_sessions/new.html.slim +0 -13
  52. data/rails_32/app/views/users/_form.html.slim +0 -12
  53. data/rails_32/app/views/users/edit.html.slim +0 -5
  54. data/rails_32/app/views/users/index.html.slim +0 -26
  55. data/rails_32/app/views/users/new.html.slim +0 -4
  56. data/rails_32/app/views/users/show.html.slim +0 -17
  57. data/rails_32/config/application.rb +0 -77
  58. data/rails_32/config/boot.rb +0 -6
  59. data/rails_32/config/database.yml +0 -13
  60. data/rails_32/config/environment.rb +0 -5
  61. data/rails_32/config/environments/acceptance.rb +0 -69
  62. data/rails_32/config/environments/development.rb +0 -39
  63. data/rails_32/config/environments/production.rb +0 -69
  64. data/rails_32/config/environments/test.rb +0 -42
  65. data/rails_32/config/initializers/backtrace_silencers.rb +0 -7
  66. data/rails_32/config/initializers/inflections.rb +0 -15
  67. data/rails_32/config/initializers/mailcatcher.rb +0 -15
  68. data/rails_32/config/initializers/mime_types.rb +0 -5
  69. data/rails_32/config/initializers/secret_token.rb +0 -7
  70. data/rails_32/config/initializers/session_store.rb +0 -8
  71. data/rails_32/config/initializers/simple_form.rb +0 -142
  72. data/rails_32/config/initializers/simple_form_bootstrap.rb +0 -45
  73. data/rails_32/config/initializers/sorcery.rb +0 -398
  74. data/rails_32/config/initializers/wrap_parameters.rb +0 -14
  75. data/rails_32/config/locales/en.yml +0 -5
  76. data/rails_32/config/locales/simple_form.en.yml +0 -26
  77. data/rails_32/config/routes.rb +0 -21
  78. data/rails_32/config/unicorn.rb +0 -27
  79. data/rails_32/config.ru +0 -21
  80. data/rails_32/db/migrate/20121128215324_sorcery_core.rb +0 -19
  81. data/rails_32/db/migrate/20121128215325_sorcery_brute_force_protection.rb +0 -13
  82. data/rails_32/db/migrate/20121128215326_sorcery_activity_logging.rb +0 -17
  83. data/rails_32/db/migrate/20121128215327_sorcery_user_activation.rb +0 -17
  84. data/rails_32/db/migrate/20121128215328_sorcery_remember_me.rb +0 -15
  85. data/rails_32/db/migrate/20121128215329_sorcery_reset_password.rb +0 -17
  86. data/rails_32/db/migrate/20121128215330_sorcery_external.rb +0 -14
  87. data/rails_32/db/migrate/20121128215337_add_admin_to_users.rb +0 -5
  88. data/rails_32/db/sample_data.rb +0 -24
  89. data/rails_32/db/schema.rb +0 -54
  90. data/rails_32/db/seeds.rb +0 -7
  91. data/rails_32/lib/assets/.gitkeep +0 -0
  92. data/rails_32/lib/tasks/.gitkeep +0 -0
  93. data/rails_32/lib/tasks/cane.rake +0 -30
  94. data/rails_32/lib/tasks/coverage.rake +0 -10
  95. data/rails_32/lib/tasks/db.rake +0 -7
  96. data/rails_32/lib/tasks/spec.rake +0 -35
  97. data/rails_32/lib/templates/rails/scaffold_controller/controller.rb +0 -45
  98. data/rails_32/lib/templates/rspec/scaffold/controller_spec.rb +0 -155
  99. data/rails_32/lib/templates/rspec/scaffold/edit_spec.rb +0 -18
  100. data/rails_32/lib/templates/rspec/scaffold/index_spec.rb +0 -26
  101. data/rails_32/lib/templates/rspec/scaffold/new_spec.rb +0 -18
  102. data/rails_32/lib/templates/rspec/scaffold/show_spec.rb +0 -16
  103. data/rails_32/lib/templates/slim/scaffold/_form.html.slim +0 -13
  104. data/rails_32/lib/templates/slim/scaffold/edit.html.slim +0 -5
  105. data/rails_32/lib/templates/slim/scaffold/index.html.slim +0 -28
  106. data/rails_32/lib/templates/slim/scaffold/new.html.slim +0 -4
  107. data/rails_32/lib/templates/slim/scaffold/show.html.slim +0 -17
  108. data/rails_32/log/.gitkeep +0 -0
  109. data/rails_32/public/404.html +0 -26
  110. data/rails_32/public/422.html +0 -26
  111. data/rails_32/public/500.html +0 -25
  112. data/rails_32/public/favicon.ico +0 -0
  113. data/rails_32/public/robots.txt +0 -5
  114. data/rails_32/script/rails +0 -6
  115. data/rails_32/spec/controllers/user_sessions_controller_spec.rb +0 -42
  116. data/rails_32/spec/controllers/users_controller_spec.rb +0 -150
  117. data/rails_32/spec/factories/users.rb +0 -14
  118. data/rails_32/spec/features/activation_spec.rb +0 -18
  119. data/rails_32/spec/features/password_reset_spec.rb +0 -41
  120. data/rails_32/spec/features/registration_spec.rb +0 -39
  121. data/rails_32/spec/features/sign_in_spec.rb +0 -30
  122. data/rails_32/spec/javascripts/example_spec.js.coffee +0 -20
  123. data/rails_32/spec/javascripts/spec.css +0 -3
  124. data/rails_32/spec/javascripts/spec.js.coffee +0 -2
  125. data/rails_32/spec/mailers/user_mailer_spec.rb +0 -48
  126. data/rails_32/spec/models/ability_spec.rb +0 -38
  127. data/rails_32/spec/models/user_spec.rb +0 -36
  128. data/rails_32/spec/spec_helper.rb +0 -64
  129. data/rails_32/spec/support/accept_values.rb +0 -55
  130. data/rails_32/spec/support/database_cleaner.rb +0 -24
  131. data/rails_32/spec/support/factory_girl.rb +0 -3
  132. data/rails_32/spec/support/sorcery.rb +0 -3
  133. data/rails_32/spec/support/user_sessions_feature_helper.rb +0 -21
  134. data/rails_32/spec/views/users/edit.html.slim_spec.rb +0 -16
  135. data/rails_32/spec/views/users/index.html.slim_spec.rb +0 -16
  136. data/rails_32/spec/views/users/new.html.slim_spec.rb +0 -16
  137. data/rails_32/spec/views/users/show.html.slim_spec.rb +0 -13
  138. data/rails_32/vendor/assets/javascripts/.gitkeep +0 -0
  139. data/rails_32/vendor/assets/stylesheets/.gitkeep +0 -0
  140. data/rails_32/vendor/plugins/.gitkeep +0 -0
  141. data/rails_40/.env +0 -8
  142. data/rails_40/.gitignore +0 -16
  143. data/rails_40/.rspec +0 -1
  144. data/rails_40/.ruby-gemset +0 -1
  145. data/rails_40/.ruby-version +0 -1
  146. data/rails_40/Gemfile +0 -53
  147. data/rails_40/Guardfile +0 -34
  148. data/rails_40/Procfile +0 -2
  149. data/rails_40/README.md +0 -90
  150. data/rails_40/Rakefile +0 -15
  151. data/rails_40/app/assets/javascripts/application.js +0 -17
  152. data/rails_40/app/assets/stylesheets/_footer.less +0 -30
  153. data/rails_40/app/assets/stylesheets/_navbar.less +0 -3
  154. data/rails_40/app/assets/stylesheets/application.css.less +0 -3
  155. data/rails_40/app/controllers/application_controller.rb +0 -5
  156. data/rails_40/app/controllers/concerns/.keep +0 -0
  157. data/rails_40/app/controllers/pages_controller.rb +0 -6
  158. data/rails_40/app/helpers/application_helper.rb +0 -11
  159. data/rails_40/app/mailers/.keep +0 -0
  160. data/rails_40/app/models/.keep +0 -0
  161. data/rails_40/app/models/concerns/.keep +0 -0
  162. data/rails_40/app/views/layouts/application.html.slim +0 -39
  163. data/rails_40/app/views/pages/root.html.slim +0 -13
  164. data/rails_40/bin/bundle +0 -3
  165. data/rails_40/bin/deploy.sh +0 -47
  166. data/rails_40/bin/rails +0 -4
  167. data/rails_40/bin/rake +0 -4
  168. data/rails_40/circle.yml +0 -16
  169. data/rails_40/config/application.rb +0 -36
  170. data/rails_40/config/boot.rb +0 -4
  171. data/rails_40/config/database.yml +0 -15
  172. data/rails_40/config/environment.rb +0 -5
  173. data/rails_40/config/environments/acceptance.rb +0 -8
  174. data/rails_40/config/environments/development.rb +0 -31
  175. data/rails_40/config/environments/production.rb +0 -82
  176. data/rails_40/config/environments/test.rb +0 -38
  177. data/rails_40/config/initializers/backtrace_silencers.rb +0 -7
  178. data/rails_40/config/initializers/filter_parameter_logging.rb +0 -4
  179. data/rails_40/config/initializers/inflections.rb +0 -16
  180. data/rails_40/config/initializers/mailcatcher.rb +0 -15
  181. data/rails_40/config/initializers/mime_types.rb +0 -5
  182. data/rails_40/config/initializers/secret_token.rb +0 -12
  183. data/rails_40/config/initializers/session_store.rb +0 -3
  184. data/rails_40/config/initializers/simple_form.rb +0 -142
  185. data/rails_40/config/initializers/simple_form_bootstrap.rb +0 -45
  186. data/rails_40/config/initializers/wrap_parameters.rb +0 -14
  187. data/rails_40/config/locales/en.yml +0 -23
  188. data/rails_40/config/locales/simple_form.en.yml +0 -26
  189. data/rails_40/config/routes.rb +0 -5
  190. data/rails_40/config/unicorn.rb +0 -27
  191. data/rails_40/config.ru +0 -18
  192. data/rails_40/db/sample_data.rb +0 -11
  193. data/rails_40/db/schema.rb +0 -19
  194. data/rails_40/db/seeds.rb +0 -7
  195. data/rails_40/lib/assets/.keep +0 -0
  196. data/rails_40/lib/tasks/.keep +0 -0
  197. data/rails_40/lib/tasks/coverage.rake +0 -10
  198. data/rails_40/lib/tasks/db.rake +0 -7
  199. data/rails_40/lib/tasks/spec.rake +0 -60
  200. data/rails_40/lib/templates/rails/scaffold_controller/controller.rb +0 -61
  201. data/rails_40/lib/templates/rspec/controller/controller_spec.rb +0 -16
  202. data/rails_40/lib/templates/rspec/scaffold/controller_spec.rb +0 -155
  203. data/rails_40/lib/templates/rspec/scaffold/edit_spec.rb +0 -18
  204. data/rails_40/lib/templates/rspec/scaffold/index_spec.rb +0 -26
  205. data/rails_40/lib/templates/rspec/scaffold/new_spec.rb +0 -19
  206. data/rails_40/lib/templates/rspec/scaffold/show_spec.rb +0 -16
  207. data/rails_40/lib/templates/slim/scaffold/_form.html.slim +0 -13
  208. data/rails_40/lib/templates/slim/scaffold/edit.html.slim +0 -5
  209. data/rails_40/lib/templates/slim/scaffold/index.html.slim +0 -29
  210. data/rails_40/lib/templates/slim/scaffold/new.html.slim +0 -4
  211. data/rails_40/lib/templates/slim/scaffold/show.html.slim +0 -17
  212. data/rails_40/log/.keep +0 -0
  213. data/rails_40/public/404.html +0 -58
  214. data/rails_40/public/422.html +0 -58
  215. data/rails_40/public/500.html +0 -57
  216. data/rails_40/public/favicon.ico +0 -0
  217. data/rails_40/public/robots.txt +0 -5
  218. data/rails_40/spec/controllers/pages_controller_spec.rb +0 -12
  219. data/rails_40/spec/features/pages_spec.rb +0 -18
  220. data/rails_40/spec/javascripts/example_spec.js.coffee +0 -20
  221. data/rails_40/spec/javascripts/spec.css +0 -3
  222. data/rails_40/spec/javascripts/spec.js.coffee +0 -2
  223. data/rails_40/spec/spec_helper.rb +0 -79
  224. data/rails_40/spec/support/database_cleaner.rb +0 -24
  225. data/rails_40/spec/support/factory_girl.rb +0 -3
  226. data/rails_40/vendor/assets/javascripts/.keep +0 -0
  227. data/rails_40/vendor/assets/stylesheets/.keep +0 -0
@@ -1,398 +0,0 @@
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 = [:brute_force_protection, :activity_logging, :user_activation, :remember_me, :reset_password, :external]
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, :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
- # Twitter wil not accept any requests nor redirect uri containing localhost,
84
- # make sure you use 0.0.0.0:3000 to access your app in development
85
- #
86
- # config.twitter.key = ""
87
- # config.twitter.secret = ""
88
- # config.twitter.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=twitter"
89
- # config.twitter.user_info_mapping = {:email => "screen_name"}
90
- #
91
- # config.facebook.key = ""
92
- # config.facebook.secret = ""
93
- # config.facebook.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=facebook"
94
- # config.facebook.user_info_mapping = {:email => "name"}
95
- #
96
- # config.github.key = ""
97
- # config.github.secret = ""
98
- # config.github.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=github"
99
- # config.github.user_info_mapping = {:email => "name"}
100
- #
101
- # config.google.key = ""
102
- # config.google.secret = ""
103
- # config.google.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=google"
104
- # config.google.user_info_mapping = {:email => "email", :username => "name"}
105
- #
106
- # To use liveid in development mode you have to replace mydomain.com with
107
- # a valid domain even in development. To use a valid domain in development
108
- # simply add your domain in your /etc/hosts file in front of 127.0.0.1
109
- #
110
- # config.liveid.key = ""
111
- # config.liveid.secret = ""
112
- # config.liveid.callback_url = "http://mydomain.com:3000/oauth/callback?provider=liveid"
113
- # config.liveid.user_info_mapping = {:username => "name"}
114
-
115
-
116
- # --- user config ---
117
- config.user_config do |user|
118
- # -- core --
119
- # specify username attributes, for example: [:username, :email].
120
- # Default: `[:username]`
121
- #
122
- user.username_attribute_names = :email
123
-
124
-
125
- # change *virtual* password attribute, the one which is used until an encrypted one is generated.
126
- # Default: `:password`
127
- #
128
- # user.password_attribute_name =
129
-
130
-
131
- # downcase the username before trying to authenticate, default is false
132
- # Default: `false`
133
- #
134
- # user.downcase_username_before_authenticating =
135
-
136
-
137
- # change default email attribute.
138
- # Default: `:email`
139
- #
140
- # user.email_attribute_name =
141
-
142
-
143
- # change default crypted_password attribute.
144
- # Default: `:crypted_password`
145
- #
146
- # user.crypted_password_attribute_name =
147
-
148
-
149
- # what pattern to use to join the password with the salt
150
- # Default: `""`
151
- #
152
- # user.salt_join_token =
153
-
154
-
155
- # change default salt attribute.
156
- # Default: `:salt`
157
- #
158
- # user.salt_attribute_name =
159
-
160
-
161
- # how many times to apply encryption to the password.
162
- # Default: `nil`
163
- #
164
- # user.stretches =
165
-
166
-
167
- # encryption key used to encrypt reversible encryptions such as AES256.
168
- # WARNING: If used for users' passwords, changing this key will leave passwords undecryptable!
169
- # Default: `nil`
170
- #
171
- # user.encryption_key =
172
-
173
-
174
- # use an external encryption class.
175
- # Default: `nil`
176
- #
177
- # user.custom_encryption_provider =
178
-
179
-
180
- # encryption algorithm name. See 'encryption_algorithm=' for available options.
181
- # Default: `:bcrypt`
182
- #
183
- # user.encryption_algorithm =
184
-
185
-
186
- # make this configuration inheritable for subclasses. Useful for ActiveRecord's STI.
187
- # Default: `false`
188
- #
189
- # user.subclasses_inherit_config =
190
-
191
-
192
- # -- user_activation --
193
- # the attribute name to hold activation state (active/pending).
194
- # Default: `:activation_state`
195
- #
196
- # user.activation_state_attribute_name =
197
-
198
-
199
- # the attribute name to hold activation code (sent by email).
200
- # Default: `:activation_token`
201
- #
202
- # user.activation_token_attribute_name =
203
-
204
-
205
- # the attribute name to hold activation code expiration date.
206
- # Default: `:activation_token_expires_at`
207
- #
208
- # user.activation_token_expires_at_attribute_name =
209
-
210
-
211
- # how many seconds before the activation code expires. nil for never expires.
212
- # Default: `nil`
213
- #
214
- # user.activation_token_expiration_period =
215
-
216
-
217
- # your mailer class. Required.
218
- # Default: `nil`
219
- #
220
- user.user_activation_mailer = UserMailer
221
-
222
-
223
- # when true sorcery will not automatically
224
- # email activation details and allow you to
225
- # manually handle how and when email is sent.
226
- # Default: `false`
227
- #
228
- # user.activation_mailer_disabled =
229
-
230
-
231
- # activation needed email method on your mailer class.
232
- # Default: `:activation_needed_email`
233
- #
234
- # user.activation_needed_email_method_name =
235
-
236
-
237
- # activation success email method on your mailer class.
238
- # Default: `:activation_success_email`
239
- #
240
- # user.activation_success_email_method_name =
241
-
242
-
243
- # do you want to prevent or allow users that did not activate by email to login?
244
- # Default: `true`
245
- #
246
- # user.prevent_non_active_users_to_login =
247
-
248
-
249
- # -- reset_password --
250
- # reset password code attribute name.
251
- # Default: `:reset_password_token`
252
- #
253
- # user.reset_password_token_attribute_name =
254
-
255
-
256
- # expires at attribute name.
257
- # Default: `:reset_password_token_expires_at`
258
- #
259
- # user.reset_password_token_expires_at_attribute_name =
260
-
261
-
262
- # when was email sent, used for hammering protection.
263
- # Default: `:reset_password_email_sent_at`
264
- #
265
- # user.reset_password_email_sent_at_attribute_name =
266
-
267
-
268
- # mailer class. Needed.
269
- # Default: `nil`
270
- #
271
- user.reset_password_mailer = UserMailer
272
-
273
-
274
- # reset password email method on your mailer class.
275
- # Default: `:reset_password_email`
276
- #
277
- # user.reset_password_email_method_name =
278
-
279
-
280
- # when true sorcery will not automatically
281
- # email password reset details and allow you to
282
- # manually handle how and when email is sent
283
- # Default: `false`
284
- #
285
- # user.reset_password_mailer_disabled =
286
-
287
-
288
- # how many seconds before the reset request expires. nil for never expires.
289
- # Default: `nil`
290
- #
291
- # user.reset_password_expiration_period =
292
-
293
-
294
- # hammering protection, how long to wait before allowing another email to be sent.
295
- # Default: `5 * 60`
296
- #
297
- # user.reset_password_time_between_emails =
298
-
299
-
300
- # -- brute_force_protection --
301
- # Failed logins attribute name.
302
- # Default: `:failed_logins_count`
303
- #
304
- # user.failed_logins_count_attribute_name =
305
-
306
-
307
- # This field indicates whether user is banned and when it will be active again.
308
- # Default: `:lock_expires_at`
309
- #
310
- # user.lock_expires_at_attribute_name =
311
-
312
-
313
- # How many failed logins allowed.
314
- # Default: `50`
315
- #
316
- # user.consecutive_login_retries_amount_limit =
317
-
318
-
319
- # How long the user should be banned. in seconds. 0 for permanent.
320
- # Default: `60 * 60`
321
- #
322
- # user.login_lock_time_period =
323
-
324
- # Unlock token attribute name
325
- # Default: `:unlock_token`
326
- #
327
- # user.unlock_token_attribute_name =
328
-
329
- # Unlock token mailer method
330
- # Default: `:send_unlock_token_email`
331
- #
332
- # user.unlock_token_email_method_name =
333
-
334
- # when true sorcery will not automatically
335
- # send email with unlock token
336
- # Default: `false`
337
- #
338
- # user.unlock_token_mailer_disabled = true
339
-
340
- # Unlock token mailer class
341
- # Default: `nil`
342
- #
343
- # user.unlock_token_mailer = UserMailer
344
-
345
- # -- activity logging --
346
- # Last login attribute name.
347
- # Default: `:last_login_at`
348
- #
349
- # user.last_login_at_attribute_name =
350
-
351
-
352
- # Last logout attribute name.
353
- # Default: `:last_logout_at`
354
- #
355
- # user.last_logout_at_attribute_name =
356
-
357
-
358
- # Last activity attribute name.
359
- # Default: `:last_activity_at`
360
- #
361
- # user.last_activity_at_attribute_name =
362
-
363
-
364
- # How long since last activity is he user defined logged out?
365
- # Default: `10 * 60`
366
- #
367
- # user.activity_timeout =
368
-
369
-
370
- # -- external --
371
- # Class which holds the various external provider data for this user.
372
- # Default: `nil`
373
- #
374
- # user.authentications_class =
375
-
376
-
377
- # User's identifier in authentications class.
378
- # Default: `:user_id`
379
- #
380
- # user.authentications_user_id_attribute_name =
381
-
382
-
383
- # Provider's identifier in authentications class.
384
- # Default: `:provider`
385
- #
386
- # user.provider_attribute_name =
387
-
388
-
389
- # User's external unique identifier in authentications class.
390
- # Default: `:uid`
391
- #
392
- # user.provider_uid_attribute_name =
393
- end
394
-
395
- # This line must come after the 'user config' block.
396
- # Define which model authenticates with sorcery.
397
- config.user_class = User
398
- end
@@ -1,14 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
- #
3
- # This file contains settings for ActionController::ParamsWrapper which
4
- # is enabled by default.
5
-
6
- # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json]
9
- end
10
-
11
- # Disable root element in JSON by default.
12
- ActiveSupport.on_load(:active_record) do
13
- self.include_root_in_json = false
14
- end
@@ -1,5 +0,0 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
- en:
5
- hello: "Hello world"
@@ -1,26 +0,0 @@
1
- en:
2
- simple_form:
3
- "yes": 'Yes'
4
- "no": 'No'
5
- required:
6
- text: 'required'
7
- mark: '*'
8
- # You can uncomment the line below if you need to overwrite the whole required html.
9
- # When using html, text and mark won't be used.
10
- # html: '<abbr title="required">*</abbr>'
11
- error_notification:
12
- default_message: "Please review the problems below:"
13
- # Labels and hints examples
14
- # labels:
15
- # defaults:
16
- # password: 'Password'
17
- # user:
18
- # new:
19
- # email: 'E-mail to sign in.'
20
- # edit:
21
- # email: 'E-mail.'
22
- # hints:
23
- # defaults:
24
- # username: 'User name to sign in.'
25
- # password: 'No special characters, please.'
26
-
@@ -1,21 +0,0 @@
1
- AppPrototype::Application.routes.draw do
2
-
3
- root to: 'pages#root'
4
-
5
- match 'sign_in' => 'user_sessions#new', as: :sign_in
6
- match 'sign_out' => 'user_sessions#destroy', as: :sign_out
7
-
8
- resources :user_sessions, only: [:new, :create, :destroy]
9
-
10
- match 'sign_up' => 'registrations#new', via: :get, as: :sign_up
11
- match 'sign_up' => 'registrations#create', via: :post, as: :sign_up
12
- match 'activate/:token' => 'registrations#activate', via: :get, as: :activation
13
-
14
- match 'forgotten_password' => 'password_resets#new', via: :get, as: :forgotten_password
15
- match 'forgotten_password' => 'password_resets#create', via: :post, as: :forgotten_password
16
- match 'reset_password/:token' => 'password_resets#edit', via: :get, as: :reset_password
17
- match 'reset_password/:id' => 'password_resets#update', via: :put
18
-
19
- resources :users
20
-
21
- end
@@ -1,27 +0,0 @@
1
- # http://unicorn.bogomips.org/
2
- # https://blog.heroku.com/archives/2013/2/27/unicorn_rails
3
- # http://devblog.thinkthroughmath.com/blog/2013/02/27/managing-request-queuing-with-rails-on-heroku/
4
-
5
- listen ENV['PORT'], backlog: Integer(ENV['UNICORN_BACKLOG'] || 16)
6
- worker_processes Integer(ENV['UNICORN_WORKERS'] || 3)
7
- timeout 30
8
- preload_app true
9
-
10
- before_fork do |server, worker|
11
- Signal.trap 'TERM' do
12
- puts 'Unicorn master intercepting TERM and sending myself QUIT instead.'
13
- Process.kill 'QUIT', Process.pid
14
- end
15
-
16
- defined?(ActiveRecord::Base) and
17
- ActiveRecord::Base.connection.disconnect!
18
- end
19
-
20
- after_fork do |server, worker|
21
- Signal.trap 'TERM' do
22
- puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT.'
23
- end
24
-
25
- defined?(ActiveRecord::Base) and
26
- ActiveRecord::Base.establish_connection
27
- end
data/rails_32/config.ru DELETED
@@ -1,21 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
-
5
- # Disable buffering for real time logging, see: https://devcenter.heroku.com/articles/logging#writing-to-your-log
6
- $stdout.sync = true
7
-
8
- # Redirect to the custom (canonical) hostname.
9
- use Rack::CanonicalHost, ENV['HOSTNAME'] if ENV['HOSTNAME']
10
-
11
- # Optional Basic Auth - Enabled if BASIC_AUTH_PASSWORD is set. User is optional (any value will be accepted).
12
- BASIC_AUTH_USER = ENV['BASIC_AUTH_USER']
13
- BASIC_AUTH_PASSWORD = ENV['BASIC_AUTH_PASSWORD']
14
-
15
- if BASIC_AUTH_PASSWORD
16
- use Rack::Auth::Basic do |username, password|
17
- password == BASIC_AUTH_PASSWORD && (BASIC_AUTH_USER.blank? || username == BASIC_AUTH_USER)
18
- end
19
- end
20
-
21
- run AppPrototype::Application
@@ -1,19 +0,0 @@
1
- class SorceryCore < ActiveRecord::Migration
2
- def self.up
3
- create_table :users do |t|
4
- t.string :name
5
- # t.string :username, :null => false # if you use another field as a username, for example email, you can safely remove this field.
6
- t.string :email, default: nil # if you use this field as a username, you might want to make it :null => false.
7
- t.string :crypted_password, default: nil
8
- t.string :salt, default: nil
9
-
10
- t.timestamps
11
- end
12
-
13
- add_index :users, :email, unique: true
14
- end
15
-
16
- def self.down
17
- drop_table :users
18
- end
19
- end
@@ -1,13 +0,0 @@
1
- class SorceryBruteForceProtection < ActiveRecord::Migration
2
- def self.up
3
- add_column :users, :failed_logins_count, :integer, default: 0
4
- add_column :users, :lock_expires_at, :datetime, default: nil
5
- add_column :users, :unlock_token, :string, default: nil
6
- end
7
-
8
- def self.down
9
- remove_column :users, :lock_expires_at
10
- remove_column :users, :failed_logins_count
11
- remove_column :users, :unlock_token
12
- end
13
- end
@@ -1,17 +0,0 @@
1
- class SorceryActivityLogging < ActiveRecord::Migration
2
- def self.up
3
- add_column :users, :last_login_at, :datetime, default: nil
4
- add_column :users, :last_logout_at, :datetime, default: nil
5
- add_column :users, :last_activity_at, :datetime, default: nil
6
-
7
- add_index :users, [:last_logout_at, :last_activity_at]
8
- end
9
-
10
- def self.down
11
- remove_index :users, [:last_logout_at, :last_activity_at]
12
-
13
- remove_column :users, :last_activity_at
14
- remove_column :users, :last_logout_at
15
- remove_column :users, :last_login_at
16
- end
17
- end
@@ -1,17 +0,0 @@
1
- class SorceryUserActivation < ActiveRecord::Migration
2
- def self.up
3
- add_column :users, :activation_state, :string, default: nil
4
- add_column :users, :activation_token, :string, default: nil
5
- add_column :users, :activation_token_expires_at, :datetime, default: nil
6
-
7
- add_index :users, :activation_token
8
- end
9
-
10
- def self.down
11
- remove_index :users, :activation_token
12
-
13
- remove_column :users, :activation_token_expires_at
14
- remove_column :users, :activation_token
15
- remove_column :users, :activation_state
16
- end
17
- end
@@ -1,15 +0,0 @@
1
- class SorceryRememberMe < ActiveRecord::Migration
2
- def self.up
3
- add_column :users, :remember_me_token, :string, default: nil
4
- add_column :users, :remember_me_token_expires_at, :datetime, default: nil
5
-
6
- add_index :users, :remember_me_token
7
- end
8
-
9
- def self.down
10
- remove_index :users, :remember_me_token
11
-
12
- remove_column :users, :remember_me_token_expires_at
13
- remove_column :users, :remember_me_token
14
- end
15
- end
@@ -1,17 +0,0 @@
1
- class SorceryResetPassword < ActiveRecord::Migration
2
- def self.up
3
- add_column :users, :reset_password_token, :string, default: nil
4
- add_column :users, :reset_password_token_expires_at, :datetime, default: nil
5
- add_column :users, :reset_password_email_sent_at, :datetime, default: nil
6
-
7
- add_index :users, :reset_password_token
8
- end
9
-
10
- def self.down
11
- remove_index :users, :reset_password_token
12
-
13
- remove_column :users, :reset_password_email_sent_at
14
- remove_column :users, :reset_password_token_expires_at
15
- remove_column :users, :reset_password_token
16
- end
17
- end
@@ -1,14 +0,0 @@
1
- class SorceryExternal < ActiveRecord::Migration
2
- def self.up
3
- create_table :authentications do |t|
4
- t.integer :user_id, null: false
5
- t.string :provider, :uid, null: false
6
-
7
- t.timestamps
8
- end
9
- end
10
-
11
- def self.down
12
- drop_table :authentications
13
- end
14
- end
@@ -1,5 +0,0 @@
1
- class AddAdminToUsers < ActiveRecord::Migration
2
- def change
3
- add_column :users, :admin, :boolean
4
- end
5
- end
@@ -1,24 +0,0 @@
1
- # Populate the database with a small set of realistic sample data so that as a developer/designer, you can use the
2
- # application without having to create a bunch of stuff or pull down production data.
3
- #
4
- # After running db:sample_data, a developer/designer should be able to fire up the app, sign in, browse data and see
5
- # examples of practically anything (interesting) that can happen in the system.
6
- #
7
- # It's a good idea to build this up along with the features; when you build a feature, make sure you can easily demo it
8
- # after running db:sample_data.
9
- #
10
- # Data that is required by the application across all environments (i.e. reference data) should _not_ be included here.
11
- # That belongs in seeds.rb instead.
12
-
13
- # TODO Disable sending emails, no need for seed data.
14
-
15
- User.find_or_create_by_email('user@example.com') do |u|
16
- u.name = 'Ustead User'
17
- u.password = 'password'
18
- end.activate!
19
-
20
- User.find_or_create_by_email('admin@example.com') do |u|
21
- u.name = 'Adam Admin'
22
- u.password = 'password'
23
- u.admin = true
24
- end.activate!