devise_meteor 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +4 -0
  4. data/CODE_OF_CONDUCT.md +13 -0
  5. data/Gemfile +16 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +78 -0
  8. data/Rakefile +7 -0
  9. data/app/models/devise_meteor/meteor_profile.rb +12 -0
  10. data/app/models/devise_meteor/meteor_service.rb +16 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +7 -0
  13. data/devise_meteor.gemspec +37 -0
  14. data/lib/devise/strategies/meteor.rb +92 -0
  15. data/lib/devise_meteor/concerns/meteor_user_model.rb +148 -0
  16. data/lib/devise_meteor/engine.rb +10 -0
  17. data/lib/devise_meteor/railtie.rb +7 -0
  18. data/lib/devise_meteor/strategies/encrypter.rb +15 -0
  19. data/lib/devise_meteor/strategies/hasher.rb +91 -0
  20. data/lib/devise_meteor/strategies/strategy.rb +92 -0
  21. data/lib/devise_meteor/version.rb +3 -0
  22. data/lib/devise_meteor.rb +37 -0
  23. data/lib/generators/devise_meteor/install_generator.rb +16 -0
  24. data/lib/generators/templates/meteor_initializer.rb +12 -0
  25. data/spec/factories/users.rb +19 -0
  26. data/spec/models/meteor_authentication_spec.rb +261 -0
  27. data/spec/rails_helper.rb +72 -0
  28. data/spec/spec_helper.rb +92 -0
  29. data/spec/support/api_macros.rb +30 -0
  30. data/spec/support/controller_macros.rb +18 -0
  31. data/spec/support/devise_macros.rb +58 -0
  32. data/spec/support/omniauth_macros.rb +44 -0
  33. data/spec/support/request_macros.rb +13 -0
  34. data/spec/test_app/README.rdoc +3 -0
  35. data/spec/test_app/Rakefile +6 -0
  36. data/spec/test_app/app/assets/javascripts/application.js +13 -0
  37. data/spec/test_app/app/assets/stylesheets/application.css +15 -0
  38. data/spec/test_app/app/controllers/application_controller.rb +5 -0
  39. data/spec/test_app/app/controllers/products_controller.rb +89 -0
  40. data/spec/test_app/app/helpers/application_helper.rb +2 -0
  41. data/spec/test_app/app/models/user.rb +43 -0
  42. data/spec/test_app/app/views/layouts/application.html.erb +14 -0
  43. data/spec/test_app/app/views/products/_form.html.erb +29 -0
  44. data/spec/test_app/app/views/products/edit.html.erb +6 -0
  45. data/spec/test_app/app/views/products/index.html.erb +33 -0
  46. data/spec/test_app/app/views/products/new.html.erb +5 -0
  47. data/spec/test_app/app/views/products/show.html.erb +25 -0
  48. data/spec/test_app/bin/bundle +3 -0
  49. data/spec/test_app/bin/rails +4 -0
  50. data/spec/test_app/bin/rake +4 -0
  51. data/spec/test_app/bin/setup +29 -0
  52. data/spec/test_app/config/application.rb +28 -0
  53. data/spec/test_app/config/boot.rb +5 -0
  54. data/spec/test_app/config/environment.rb +5 -0
  55. data/spec/test_app/config/environments/development.rb +38 -0
  56. data/spec/test_app/config/environments/production.rb +77 -0
  57. data/spec/test_app/config/environments/test.rb +45 -0
  58. data/spec/test_app/config/initializers/assets.rb +11 -0
  59. data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  60. data/spec/test_app/config/initializers/cookies_serializer.rb +3 -0
  61. data/spec/test_app/config/initializers/devise.rb +268 -0
  62. data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
  63. data/spec/test_app/config/initializers/inflections.rb +16 -0
  64. data/spec/test_app/config/initializers/mime_types.rb +4 -0
  65. data/spec/test_app/config/initializers/secret_token.rb +3 -0
  66. data/spec/test_app/config/initializers/session_store.rb +3 -0
  67. data/spec/test_app/config/initializers/wrap_parameters.rb +9 -0
  68. data/spec/test_app/config/locales/en.yml +23 -0
  69. data/spec/test_app/config/mongoid.yml +80 -0
  70. data/spec/test_app/config/routes.rb +5 -0
  71. data/spec/test_app/config/secrets.yml +22 -0
  72. data/spec/test_app/config.ru +4 -0
  73. data/spec/test_app/lib/tasks/cucumber.rake +65 -0
  74. data/spec/test_app/log/test.log +23511 -0
  75. data/spec/test_app/public/404.html +67 -0
  76. data/spec/test_app/public/422.html +67 -0
  77. data/spec/test_app/public/500.html +66 -0
  78. data/spec/test_app/public/favicon.ico +0 -0
  79. metadata +350 -0
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,268 @@
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
+ # Devise will use the `secret_key_base` as its `secret_key`
8
+ # by default. You can change it below and use your own secret key.
9
+ # config.secret_key = 'c42b19b2f76fe1851af2699f7cb649ba61e8947de2cfbdf22485ed17ad4d17134db64c4337cb889b91f498cbf6e6a2c9127bdcedb7ad5574cf31412403c6119f'
10
+
11
+ # ==> Mailer Configuration
12
+ # Configure the e-mail address which will be shown in Devise::Mailer,
13
+ # note that it will be overwritten if you use your own mailer class
14
+ # with default "from" parameter.
15
+ config.mailer_sender = ENV['MAIL_SENDER_EMAIL']
16
+
17
+ # Configure the class responsible to send e-mails.
18
+ # config.mailer = 'Devise::Mailer'
19
+
20
+ # Configure the parent class responsible to send e-mails.
21
+ # config.parent_mailer = 'ActionMailer::Base'
22
+
23
+ # ==> ORM configuration
24
+ # Load and configure the ORM. Supports :active_record (default) and
25
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
26
+ # available as additional gems.
27
+ require 'devise/orm/mongoid'
28
+
29
+ # ==> Configuration for any authentication mechanism
30
+ # Configure which keys are used when authenticating a user. The default is
31
+ # just :email. You can configure it to use [:username, :subdomain], so for
32
+ # authenticating a user, both parameters are required. Remember that those
33
+ # parameters are used only when authenticating and not when retrieving from
34
+ # session. If you need permissions, you should implement that in a before filter.
35
+ # You can also supply a hash where the value is a boolean determining whether
36
+ # or not authentication should be aborted when the value is not present.
37
+ config.authentication_keys = [:email]
38
+
39
+ # Configure parameters from the request object used for authentication. Each entry
40
+ # given should be a request method and it will automatically be passed to the
41
+ # find_for_authentication method and considered in your model lookup. For instance,
42
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
43
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
44
+ # config.request_keys = []
45
+
46
+ # Configure which authentication keys should be case-insensitive.
47
+ # These keys will be downcased upon creating or modifying a user and when used
48
+ # to authenticate or find a user. Default is :email.
49
+ config.case_insensitive_keys = [:email]
50
+
51
+ # Configure which authentication keys should have whitespace stripped.
52
+ # These keys will have whitespace before and after removed upon creating or
53
+ # modifying a user and when used to authenticate or find a user. Default is :email.
54
+ config.strip_whitespace_keys = [:email]
55
+
56
+ # Tell if authentication through request.params is enabled. True by default.
57
+ # It can be set to an array that will enable params authentication only for the
58
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
59
+ # enable it only for database (email + password) authentication.
60
+ # config.params_authenticatable = true
61
+
62
+ # Tell if authentication through HTTP Auth is enabled. False by default.
63
+ # It can be set to an array that will enable http authentication only for the
64
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
65
+ # enable it only for database authentication. The supported strategies are:
66
+ # :database = Support basic authentication with authentication key + password
67
+ # config.http_authenticatable = false
68
+
69
+ # If 401 status code should be returned for AJAX requests. True by default.
70
+ # config.http_authenticatable_on_xhr = true
71
+
72
+ # The realm used in Http Basic Authentication. 'Application' by default.
73
+ # config.http_authentication_realm = 'Application'
74
+
75
+ # It will change confirmation, password recovery and other workflows
76
+ # to behave the same regardless if the e-mail provided was right or wrong.
77
+ # Does not affect registerable.
78
+ # config.paranoid = true
79
+
80
+ # By default Devise will store the user in session. You can skip storage for
81
+ # particular strategies by setting this option.
82
+ # Notice that if you are skipping storage for all authentication paths, you
83
+ # may want to disable generating routes to Devise's sessions controller by
84
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
85
+ config.skip_session_storage = [:http_auth, :token_auth]
86
+
87
+ # By default, Devise cleans up the CSRF token on authentication to
88
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
89
+ # requests for sign in and sign up, you need to get a new CSRF token
90
+ # from the server. You can disable this option at your own risk.
91
+ # config.clean_up_csrf_token_on_authentication = true
92
+
93
+ # ==> Configuration for :database_authenticatable
94
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
95
+ # using other encryptors, it sets how many times you want the password re-encrypted.
96
+ #
97
+ # Limiting the stretches to just one in testing will increase the performance of
98
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
99
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
100
+ # encryptor), the cost increases exponentially with the number of stretches (e.g.
101
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
102
+ config.stretches = Rails.env.test? ? 1 : 10
103
+
104
+ # Setup a pepper to generate the encrypted password.
105
+ # config.pepper = '2cee5a6a64fec6a8217ae49a4006ac8927405b4dedcef29bf8395927b4822bc11094b61c75a42a3cf909f1afae3e106c061e27edd5deed561f7ab9fa248ffe60'
106
+
107
+ # Send a notification email when the user's password is changed
108
+ # config.send_password_change_notification = false
109
+
110
+ # ==> Configuration for :confirmable
111
+ # A period that the user is allowed to access the website even without
112
+ # confirming their account. For instance, if set to 2.days, the user will be
113
+ # able to access the website for two days without confirming their account,
114
+ # access will be blocked just in the third day. Default is 0.days, meaning
115
+ # the user cannot access the website without confirming their account.
116
+ # config.allow_unconfirmed_access_for = 2.days
117
+
118
+ # A period that the user is allowed to confirm their account before their
119
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
120
+ # their account within 3 days after the mail was sent, but on the fourth day
121
+ # their account can't be confirmed with the token any more.
122
+ # Default is nil, meaning there is no restriction on how long a user can take
123
+ # before confirming their account.
124
+ # config.confirm_within = 3.days
125
+
126
+ # If true, requires any email changes to be confirmed (exactly the same way as
127
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
128
+ # db field (see migrations). Until confirmed, new email is stored in
129
+ # unconfirmed_email column, and copied to email column on successful confirmation.
130
+ config.reconfirmable = true
131
+
132
+ # Defines which key will be used when confirming an account
133
+ # config.confirmation_keys = [:email]
134
+
135
+ # ==> Configuration for :rememberable
136
+ # The time the user will be remembered without asking for credentials again.
137
+ # config.remember_for = 2.weeks
138
+
139
+ # Invalidates all the remember me tokens when the user signs out.
140
+ config.expire_all_remember_me_on_sign_out = true
141
+
142
+ # If true, extends the user's remember period when remembered via cookie.
143
+ # config.extend_remember_period = false
144
+
145
+ # Options to be passed to the created cookie. For instance, you can set
146
+ # secure: true in order to force SSL only cookies.
147
+ # config.rememberable_options = {}
148
+
149
+ # ==> Configuration for :validatable
150
+ # Range for password length.
151
+ config.password_length = 8..64
152
+
153
+ # Email regex used to validate email formats. It simply asserts that
154
+ # one (and only one) @ exists in the given string. This is mainly
155
+ # to give user feedback and not to assert the e-mail validity.
156
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
157
+
158
+ # ==> Configuration for :timeoutable
159
+ # The time you want to timeout the user session without activity. After this
160
+ # time the user will be asked for credentials again. Default is 30 minutes.
161
+ # config.timeout_in = 30.minutes
162
+
163
+ # ==> Configuration for :lockable
164
+ # Defines which strategy will be used to lock an account.
165
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
166
+ # :none = No lock strategy. You should handle locking by yourself.
167
+ # config.lock_strategy = :failed_attempts
168
+
169
+ # Defines which key will be used when locking and unlocking an account
170
+ # config.unlock_keys = [:email]
171
+
172
+ # Defines which strategy will be used to unlock an account.
173
+ # :email = Sends an unlock link to the user email
174
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
175
+ # :both = Enables both strategies
176
+ # :none = No unlock strategy. You should handle unlocking by yourself.
177
+ # config.unlock_strategy = :both
178
+
179
+ # Number of authentication tries before locking an account if lock_strategy
180
+ # is failed attempts.
181
+ # config.maximum_attempts = 20
182
+
183
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
184
+ # config.unlock_in = 1.hour
185
+
186
+ # Warn on the last attempt before the account is locked.
187
+ # config.last_attempt_warning = true
188
+
189
+ # ==> Configuration for :recoverable
190
+ #
191
+ # Defines which key will be used when recovering the password for an account
192
+ # config.reset_password_keys = [:email]
193
+
194
+ # Time interval you can reset your password with a reset password key.
195
+ # Don't put a too small interval or your users won't have the time to
196
+ # change their passwords.
197
+ config.reset_password_within = 6.hours
198
+
199
+ # When set to false, does not sign a user in automatically after their password is
200
+ # reset. Defaults to true, so a user is signed in automatically after a reset.
201
+ # config.sign_in_after_reset_password = true
202
+
203
+ # ==> Configuration for :encryptable
204
+ # Allow you to use another strategies algorithm besides bcrypt (default). You can use
205
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
206
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
207
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
208
+ # REST_AUTH_SITE_KEY to pepper).
209
+ #
210
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
211
+ # config.encryptor = :sha512
212
+
213
+ # ==> Scopes configuration
214
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
215
+ # "users/sessions/new". It's turned off by default because it's slower if you
216
+ # are using only default views.
217
+ # config.scoped_views = false
218
+
219
+ # Configure the default scope given to Warden. By default it's the first
220
+ # devise role declared in your routes (usually :user).
221
+ # config.default_scope = :user
222
+
223
+ # Set this configuration to false if you want /users/sign_out to sign out
224
+ # only the current scope. By default, Devise signs out all scopes.
225
+ # config.sign_out_all_scopes = true
226
+
227
+ # ==> Navigation configuration
228
+ # Lists the formats that should be treated as navigational. Formats like
229
+ # :html, should redirect to the sign in page when the user does not have
230
+ # access, but formats like :xml or :json, should return 401.
231
+ #
232
+ # If you have any extra navigational formats, like :iphone or :mobile, you
233
+ # should add them to the navigational formats lists.
234
+ #
235
+ # The "*/*" below is required to match Internet Explorer requests.
236
+ # config.navigational_formats = ['*/*', :html]
237
+
238
+ # The default HTTP method used to sign out a resource. Default is :delete.
239
+ config.sign_out_via = :get
240
+
241
+ # ==> OmniAuth
242
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
243
+ # up on your models and hooks.
244
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
245
+
246
+ # ==> Warden configuration
247
+ # If you want to use other strategies, that are not supported by Devise, or
248
+ # change the failure app, you can configure them inside the config.warden block.
249
+ #
250
+ config.warden do |manager|
251
+ manager.strategies.add(:devise_meteor, Devise::Strategies::Meteor)
252
+ manager.default_strategies(scope: :user).unshift :devise_meteor
253
+ end
254
+
255
+ # ==> Mountable engine configurations
256
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
257
+ # is mountable, there are some extra configurations to be taken into account.
258
+ # The following options are available, assuming the engine is mounted as:
259
+ #
260
+ # mount MyEngine, at: '/my_engine'
261
+ #
262
+ # The router that invoked `devise_for`, in the example above, would be:
263
+ # config.router_name = :my_engine
264
+ #
265
+ # When using OmniAuth, Devise cannot automatically set OmniAuth path,
266
+ # so you need to do it manually. For the users scope, it would be:
267
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
268
+ end
@@ -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,4 @@
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
@@ -0,0 +1,3 @@
1
+ TestApp::Application.configure do
2
+ config.secret_key_base ="3518b5e37e097719c92ca3b48a3704969fb9783c875ba0bc03b8986da1862ece4d63b9e9dfec81fc4dff5c7df3b125218c7b435fcf4f46b4d9b722e1569b66fa"
3
+ end
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_test_app_session'
@@ -0,0 +1,9 @@
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] if respond_to?(:wrap_parameters)
9
+ end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,80 @@
1
+ development:
2
+ # Configure available database sessions. (required)
3
+ sessions:
4
+ # Defines the default session. (required)
5
+ default:
6
+ # Defines the name of the default database that Mongoid can connect to.
7
+ # (required).
8
+ database: devise_meteor_development
9
+ # Provides the hosts the default session can connect to. Must be an array
10
+ # of host:port pairs. (required)
11
+ hosts:
12
+ - localhost:27017
13
+ options:
14
+ # Change whether the session persists in safe mode by default.
15
+ # (default: false)
16
+ # safe: false
17
+
18
+ # Change the default consistency model to :eventual or :strong.
19
+ # :eventual will send reads to secondaries, :strong sends everything
20
+ # to master. (default: :eventual)
21
+ # consistency: :eventual
22
+
23
+ # How many times Moped should attempt to retry an operation after
24
+ # failure. (default: 30)
25
+ # max_retries: 30
26
+
27
+ # The time in seconds that Moped should wait before retrying an
28
+ # operation on failure. (default: 1)
29
+ # retry_interval: 1
30
+ # Configure Mongoid specific options. (optional)
31
+ options:
32
+ # Configuration for whether or not to allow access to fields that do
33
+ # not have a field definition on the model. (default: true)
34
+ # allow_dynamic_fields: true
35
+
36
+ # Enable the identity map, needed for eager loading. (default: false)
37
+ # identity_map_enabled: false
38
+
39
+ # Includes the root model name in json serialization. (default: false)
40
+ # include_root_in_json: false
41
+
42
+ # Include the _type field in serializaion. (default: false)
43
+ # include_type_for_serialization: false
44
+
45
+ # Preload all models in development, needed when models use
46
+ # inheritance. (default: false)
47
+ # preload_models: false
48
+
49
+ # Protect id and type from mass assignment. (default: true)
50
+ # protect_sensitive_fields: true
51
+
52
+ # Raise an error when performing a #find and the document is not found.
53
+ # (default: true)
54
+ # raise_not_found_error: true
55
+
56
+ # Raise an error when defining a scope with the same name as an
57
+ # existing method. (default: false)
58
+ # scope_overwrite_exception: false
59
+
60
+ # Skip the database version check, used when connecting to a db without
61
+ # admin access. (default: false)
62
+ # skip_version_check: false
63
+
64
+ # User Active Support's time zone in conversions. (default: true)
65
+ # use_activesupport_time_zone: true
66
+
67
+ # Ensure all times are UTC in the app side. (default: false)
68
+ # use_utc: false
69
+ test:
70
+ clients:
71
+ default:
72
+ database: devise_meteor_test
73
+ hosts:
74
+ - localhost:27017
75
+ options:
76
+ consistency: :strong
77
+ # In the test environment we lower the retries and retry interval to
78
+ # low amounts for fast failures.
79
+ max_retries: 1
80
+ retry_interval: 0
@@ -0,0 +1,5 @@
1
+ Rails.application.routes.draw do
2
+
3
+ devise_for :users
4
+
5
+ end
@@ -0,0 +1,22 @@
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 the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: f14fe64cc16746ba2b60ca1bb71da244f77c7d973d89a11e37d74d00289579dfb9f6963763032f676f7b5e5df2753bd2e2f20cdf7ff806135633ff0aa6194ac2
15
+
16
+ test:
17
+ secret_key_base: 38c489e53bd5e767c2a7bd441934dc0824e4ce117ea5adfaacc1280ab42ac945ff0c687d8996be71bfd33453291d0aa1cf256251347994e28fd8dd3632f05411
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>