bluebase 0.0.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.envrc +1 -0
  3. data/README.md +67 -12
  4. data/Rakefile +7 -1
  5. data/bin/bluebase +13 -0
  6. data/bin/bundler +16 -0
  7. data/bin/rake +16 -0
  8. data/bin/rspec +16 -0
  9. data/bluebase.gemspec +1 -0
  10. data/lib/bluebase.rb +3 -6
  11. data/lib/bluebase/actions.rb +25 -0
  12. data/lib/bluebase/app_builder.rb +356 -0
  13. data/lib/bluebase/generators/app_generator.rb +129 -0
  14. data/lib/bluebase/version.rb +1 -1
  15. data/spec/fakes/bin/heroku +5 -0
  16. data/spec/fakes/bin/hub +5 -0
  17. data/spec/features/github_spec.rb +10 -0
  18. data/spec/features/heroku_spec.rb +24 -0
  19. data/spec/features/new_project_spec.rb +68 -0
  20. data/spec/spec_helper.rb +24 -0
  21. data/spec/support/bluebase.rb +49 -0
  22. data/spec/support/fake_github.rb +21 -0
  23. data/spec/support/fake_heroku.rb +32 -0
  24. data/templates/.envrc +1 -0
  25. data/templates/.hound.yml +4 -0
  26. data/templates/.rspec +2 -0
  27. data/templates/.rubocop.yml +20 -0
  28. data/templates/.travis.yml.erb +12 -0
  29. data/templates/Gemfile.erb +74 -0
  30. data/templates/Guardfile +43 -0
  31. data/templates/README.md.erb +30 -0
  32. data/templates/app/_fb_meta_tags.html.slim +6 -0
  33. data/templates/app/_flash.html.slim +2 -0
  34. data/templates/app/_ga_boiler.html.slim +8 -0
  35. data/templates/app/application.css.scss +12 -0
  36. data/templates/app/application.html.slim +23 -0
  37. data/templates/bin/setup +28 -0
  38. data/templates/bluebase_gitignore +18 -0
  39. data/templates/config/application.yml.sample.erb +26 -0
  40. data/templates/config/bluebase_secrets.yml +14 -0
  41. data/templates/config/database.yml.sample.erb +15 -0
  42. data/templates/config/database.yml.travis.erb +4 -0
  43. data/templates/config/devise.rb +298 -0
  44. data/templates/config/en.yml.erb +19 -0
  45. data/templates/config/figaro.rb +2 -0
  46. data/templates/config/i18n-tasks.yml +93 -0
  47. data/templates/config/smtp.rb +9 -0
  48. data/templates/config/staging.rb.erb +9 -0
  49. data/templates/spec/action_mailer.rb +5 -0
  50. data/templates/spec/database_cleaner_and_factory_girl_lint.rb +26 -0
  51. data/templates/spec/factory_girl.rb +3 -0
  52. data/templates/spec/i18n.rb +3 -0
  53. data/templates/spec/rails_helper.rb +30 -0
  54. data/templates/spec/spec_helper.rb +17 -0
  55. metadata +79 -4
@@ -0,0 +1,43 @@
1
+ # More info at https://github.com/guard/guard#readme
2
+ # TODO: Needs more configuring
3
+
4
+ # Livereload config
5
+ guard 'livereload' do
6
+ watch(%r{app/views/.+\.(erb|haml|slim)$})
7
+ watch(%r{app/helpers/.+\.rb})
8
+ watch(%r{public/.+\.(css|js|html)})
9
+ watch(%r{config/locales/.+\.yml})
10
+ # Rails Assets Pipeline
11
+ watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" }
12
+ end
13
+
14
+ # Runs rspec, then rubocop
15
+ group :red_green_refactor, halt_on_fail: true do
16
+ # cmd option runs rspec under spring
17
+ guard :rspec, cmd: 'bin/rspec' do
18
+ watch(%r{^spec/.+_spec\.rb$})
19
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
20
+ watch('spec/spec_helper.rb') { "spec" }
21
+
22
+ # Rails example
23
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
24
+ watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
25
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
26
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
27
+ watch('spec/rails_helper.rb') { "spec" }
28
+
29
+ # Capybara features specs
30
+ watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
31
+ end
32
+
33
+ guard :rubocop, cli: ['-D'] do
34
+ # Rails example
35
+ watch(%r{^app/(.+)\.rb$})
36
+ watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$})
37
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$})
38
+ watch(%r{^spec/support/(.+)\.rb$})
39
+ watch('config/routes.rb')
40
+ watch('app/controllers/application_controller.rb')
41
+ watch('spec/rails_helper.rb')
42
+ end
43
+ end
@@ -0,0 +1,30 @@
1
+ <%= app_name.humanize %>
2
+ <%= '=' * app_name.humanize.length %>
3
+
4
+ Getting Started
5
+ ---------------
6
+
7
+ After you've initialized the app, run
8
+
9
+ $ /bin/setup
10
+
11
+ to set up dependencies and set up the app.
12
+
13
+ ## Contributing
14
+
15
+ Feel free to open issues or send pull requests with improvements. Thanks in
16
+ advance for your help!
17
+
18
+ ## Cal Blueprint
19
+ ![bp](http://bptech.berkeley.edu/assets/logo-full-large-d6419503b443e360bc6c404a16417583.png "BP Banner")
20
+ **[Cal Blueprint](http://www.calblueprint.org/)** is a student-run UC Berkeley
21
+ organization devoted to matching the skills of its members to our desire to see
22
+ social good enacted in our community. Each semester, teams of 4-5 students work
23
+ closely with a non-profit to bring technological solutions to the problems they
24
+ face every day.
25
+
26
+ ## License
27
+
28
+ ![Creative Commons License](http://i.creativecommons.org/l/by/3.0/88x31.png)
29
+ This work is licensed under a [Creative Commons Attribution 3.0 Unported
30
+ License](http://creativecommons.org/licenses/by/3.0/deed.en_US)
@@ -0,0 +1,6 @@
1
+ / FB meta tags
2
+ meta property="og:url" content="Your url here"
3
+ meta property="og:title" content="Your title here"
4
+ meta property="og:type" content="website"
5
+ meta property="og:description" content="Your description here"
6
+ meta property="og:image" content="Your image URL here"
@@ -0,0 +1,2 @@
1
+ - flash.each do |type, text|
2
+ div class="flash-#{type}" #{text}
@@ -0,0 +1,8 @@
1
+ javascript:
2
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
6
+
7
+ ga('create', "#{ENV['GA_KEY']}", 'auto');
8
+ ga('send', 'pageview');
@@ -0,0 +1,12 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ */
8
+
9
+ @charset 'utf-8';
10
+
11
+ // Add @import lines below to require scss files.
12
+ // @import "vendor/normalize"
@@ -0,0 +1,23 @@
1
+ doctype html
2
+ html
3
+ head
4
+ meta charset="utf-8"
5
+ meta content="IE=edge" http-equiv="X-UA-Compatible"
6
+ title= title
7
+ meta content="width=device-width, initial-scale=1" name="viewport"
8
+ meta content="Your description here" name="description"
9
+
10
+ = render "fb_meta_tags"
11
+
12
+ = include_gon
13
+ = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
14
+ / = javascript_include_tag "vendor/modernizr", "data-turbolinks-track" => true
15
+ = javascript_include_tag "application", "data-turbolinks-track" => true
16
+ = csrf_meta_tags
17
+
18
+ body class="#{body_class}"
19
+ = render "flash"
20
+
21
+ = yield
22
+
23
+ = render "ga_boiler"
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env sh
2
+ # TODO: Make setup script better.
3
+
4
+ # Set up Rails app. Run this script immediately after cloning the codebase.
5
+
6
+ # Exit if any subcommand fails
7
+ set -e
8
+
9
+ # Set up Ruby dependencies via Bundler
10
+ bundle --version &> /dev/null || gem install bundler --no-document
11
+ bundle install
12
+
13
+ # Setup database
14
+ echo "Running rake db:create ; rake db:migrate"
15
+ database_not_set_up=$(grep "<your username>" config/database.yml)
16
+ if [ database_not_set_up ]; then
17
+ tput setaf 1; echo "\nDatabase not set up! Change your settings in database.yml\n"; tput sgr0
18
+ else
19
+ rake db:create
20
+ rake db:migrate
21
+ fi
22
+
23
+ # Generate rollbar config
24
+ bin/rails generate rollbar
25
+ # Generate simple_form config
26
+ bin/rails generate simple_form:install
27
+ # Copy i18n-tasks spec over
28
+ cp $(i18n-tasks gem-path)/templates/rspec/i18n_spec.rb spec/
@@ -0,0 +1,18 @@
1
+ # Keep .keep files
2
+ !.keep
3
+
4
+ # Ignore DS_STORE
5
+ *.DS_Store
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the database config
11
+ config/database.yml
12
+
13
+ # Ignore all logfiles and tempfiles.
14
+ /log/*.log
15
+ /tmp
16
+
17
+ # Ignore application env variables
18
+ config/application.yml
@@ -0,0 +1,26 @@
1
+ # Copy this file into application.yml and change env variables as necessary.
2
+
3
+ SECRET_KEY_BASE: <%= SecureRandom.hex(64) %>
4
+ DEVISE_SECRET_KEY: <%= SecureRandom.hex(64) %>
5
+
6
+ # Email config
7
+ SMTP_ADDRESS: <your smtp address>
8
+ SMTP_DOMAIN: <your domain>
9
+ SMTP_PASSWORD: <api_key>
10
+ SMTP_USERNAME: <user_name>
11
+
12
+ # Staging will send emails to this address
13
+ EMAIL_RECIPIENTS: ~
14
+ staging:
15
+ EMAIL_RECIPIENTS: <email>
16
+
17
+ # Rollbar access token; change both to match your own rollbar project
18
+ ROLLBAR_ACCESS_TOKEN: <your rollbar client access token>
19
+ production:
20
+ ROLLBAR_ACCESS_TOKEN: <your rollbar server access token>
21
+
22
+ # Google analytics key; update once you set it up
23
+ GA_KEY: UA-XXXXXXXX-X
24
+ # Disabled in testing
25
+ test:
26
+ GA_KEY: ~
@@ -0,0 +1,14 @@
1
+ default: &default
2
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
3
+
4
+ development:
5
+ <<: *default
6
+
7
+ test:
8
+ <<: *default
9
+
10
+ staging:
11
+ <<: *default
12
+
13
+ production:
14
+ <<: *default
@@ -0,0 +1,15 @@
1
+ # Change the development/test database, username, and password as necessary
2
+ # and then copy the file into database.yml
3
+
4
+ development: &default
5
+ adapter: postgresql
6
+ encoding: utf8
7
+ username: <your username>
8
+ password: <your password>
9
+ pool: 2
10
+ timeout: 5000
11
+ database: <%= app_name %>_development
12
+
13
+ test:
14
+ <<: *default
15
+ database: <%= app_name %>_test
@@ -0,0 +1,4 @@
1
+ test:
2
+ adapter: postgresql
3
+ database: <%= app_name %>_test
4
+ username: postgres
@@ -0,0 +1,298 @@
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 = ENV['DEVISE_SECRET_KEY']
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@calblueprint.org"
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 = '1f479ed4636b4ccad4921b54437567b077abc1d220ae3473403f3d390f9d14c33544fd998a9a1f0d4b5722237994281881f01a6ad53461a2b2dfea604f8c8408'
101
+
102
+ # ==> Configuration for :invitable
103
+ # The period the generated invitation token is valid, after
104
+ # this period, the invited resource won't be able to accept the invitation.
105
+ # When invite_for is 0 (the default), the invitation won't expire.
106
+ # config.invite_for = 2.weeks
107
+
108
+ # Number of invitations users can send.
109
+ # - If invitation_limit is nil, there is no limit for invitations, users can
110
+ # send unlimited invitations, invitation_limit column is not used.
111
+ # - If invitation_limit is 0, users can't send invitations by default.
112
+ # - If invitation_limit n > 0, users can send n invitations.
113
+ # You can change invitation_limit column for some users so they can send more
114
+ # or less invitations, even with global invitation_limit = 0
115
+ # Default: nil
116
+ # config.invitation_limit = 5
117
+
118
+ # The key to be used to check existing users when sending an invitation
119
+ # and the regexp used to test it when validate_on_invite is not set.
120
+ # config.invite_key = {:email => /\A[^@]+@[^@]+\z/}
121
+ # config.invite_key = {:email => /\A[^@]+@[^@]+\z/, :username => nil}
122
+
123
+ # Flag that force a record to be valid before being actually invited
124
+ # Default: false
125
+ # config.validate_on_invite = true
126
+
127
+ # Resend invitation if user with invited status is invited again
128
+ # Default: true
129
+ # config.resend_invitation = false
130
+
131
+ # The class name of the inviting model. If this is nil,
132
+ # the #invited_by association is declared to be polymorphic.
133
+ # Default: nil
134
+ # config.invited_by_class_name = 'User'
135
+
136
+ # The column name used for counter_cache column. If this is nil,
137
+ # the #invited_by association is declared without counter_cache.
138
+ # Default: nil
139
+ # config.invited_by_counter_cache = :invitations_count
140
+
141
+ # ==> Configuration for :confirmable
142
+ # A period that the user is allowed to access the website even without
143
+ # confirming their account. For instance, if set to 2.days, the user will be
144
+ # able to access the website for two days without confirming their account,
145
+ # access will be blocked just in the third day. Default is 0.days, meaning
146
+ # the user cannot access the website without confirming their account.
147
+ # config.allow_unconfirmed_access_for = 2.days
148
+
149
+ # A period that the user is allowed to confirm their account before their
150
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
151
+ # their account within 3 days after the mail was sent, but on the fourth day
152
+ # their account can't be confirmed with the token any more.
153
+ # Default is nil, meaning there is no restriction on how long a user can take
154
+ # before confirming their account.
155
+ # config.confirm_within = 3.days
156
+
157
+ # If true, requires any email changes to be confirmed (exactly the same way as
158
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
159
+ # db field (see migrations). Until confirmed, new email is stored in
160
+ # unconfirmed_email column, and copied to email column on successful confirmation.
161
+ config.reconfirmable = true
162
+
163
+ # Defines which key will be used when confirming an account
164
+ # config.confirmation_keys = [ :email ]
165
+
166
+ # ==> Configuration for :rememberable
167
+ # The time the user will be remembered without asking for credentials again.
168
+ # config.remember_for = 2.weeks
169
+
170
+ # Invalidates all the remember me tokens when the user signs out.
171
+ config.expire_all_remember_me_on_sign_out = true
172
+
173
+ # If true, extends the user's remember period when remembered via cookie.
174
+ # config.extend_remember_period = false
175
+
176
+ # Options to be passed to the created cookie. For instance, you can set
177
+ # secure: true in order to force SSL only cookies.
178
+ # config.rememberable_options = {}
179
+
180
+ # ==> Configuration for :validatable
181
+ # Range for password length.
182
+ config.password_length = 8..128
183
+
184
+ # Email regex used to validate email formats. It simply asserts that
185
+ # one (and only one) @ exists in the given string. This is mainly
186
+ # to give user feedback and not to assert the e-mail validity.
187
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
188
+
189
+ # ==> Configuration for :timeoutable
190
+ # The time you want to timeout the user session without activity. After this
191
+ # time the user will be asked for credentials again. Default is 30 minutes.
192
+ # config.timeout_in = 30.minutes
193
+
194
+ # If true, expires auth token on session timeout.
195
+ # config.expire_auth_token_on_timeout = false
196
+
197
+ # ==> Configuration for :lockable
198
+ # Defines which strategy will be used to lock an account.
199
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
200
+ # :none = No lock strategy. You should handle locking by yourself.
201
+ # config.lock_strategy = :failed_attempts
202
+
203
+ # Defines which key will be used when locking and unlocking an account
204
+ # config.unlock_keys = [ :email ]
205
+
206
+ # Defines which strategy will be used to unlock an account.
207
+ # :email = Sends an unlock link to the user email
208
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
209
+ # :both = Enables both strategies
210
+ # :none = No unlock strategy. You should handle unlocking by yourself.
211
+ # config.unlock_strategy = :both
212
+
213
+ # Number of authentication tries before locking an account if lock_strategy
214
+ # is failed attempts.
215
+ # config.maximum_attempts = 20
216
+
217
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
218
+ # config.unlock_in = 1.hour
219
+
220
+ # Warn on the last attempt before the account is locked.
221
+ # config.last_attempt_warning = true
222
+
223
+ # ==> Configuration for :recoverable
224
+ #
225
+ # Defines which key will be used when recovering the password for an account
226
+ # config.reset_password_keys = [ :email ]
227
+
228
+ # Time interval you can reset your password with a reset password key.
229
+ # Don't put a too small interval or your users won't have the time to
230
+ # change their passwords.
231
+ config.reset_password_within = 6.hours
232
+
233
+ # ==> Configuration for :encryptable
234
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
235
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
236
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
237
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
238
+ # REST_AUTH_SITE_KEY to pepper).
239
+ #
240
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
241
+ # config.encryptor = :sha512
242
+
243
+ # ==> Scopes configuration
244
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
245
+ # "users/sessions/new". It's turned off by default because it's slower if you
246
+ # are using only default views.
247
+ # config.scoped_views = false
248
+
249
+ # Configure the default scope given to Warden. By default it's the first
250
+ # devise role declared in your routes (usually :user).
251
+ # config.default_scope = :user
252
+
253
+ # Set this configuration to false if you want /users/sign_out to sign out
254
+ # only the current scope. By default, Devise signs out all scopes.
255
+ # config.sign_out_all_scopes = true
256
+
257
+ # ==> Navigation configuration
258
+ # Lists the formats that should be treated as navigational. Formats like
259
+ # :html, should redirect to the sign in page when the user does not have
260
+ # access, but formats like :xml or :json, should return 401.
261
+ #
262
+ # If you have any extra navigational formats, like :iphone or :mobile, you
263
+ # should add them to the navigational formats lists.
264
+ #
265
+ # The "*/*" below is required to match Internet Explorer requests.
266
+ # config.navigational_formats = ['*/*', :html]
267
+
268
+ # The default HTTP method used to sign out a resource. Default is :delete.
269
+ config.sign_out_via = :delete
270
+
271
+ # ==> OmniAuth
272
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
273
+ # up on your models and hooks.
274
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
275
+
276
+ # ==> Warden configuration
277
+ # If you want to use other strategies, that are not supported by Devise, or
278
+ # change the failure app, you can configure them inside the config.warden block.
279
+ #
280
+ # config.warden do |manager|
281
+ # manager.intercept_401 = false
282
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
283
+ # end
284
+
285
+ # ==> Mountable engine configurations
286
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
287
+ # is mountable, there are some extra configurations to be taken into account.
288
+ # The following options are available, assuming the engine is mounted as:
289
+ #
290
+ # mount MyEngine, at: '/my_engine'
291
+ #
292
+ # The router that invoked `devise_for`, in the example above, would be:
293
+ # config.router_name = :my_engine
294
+ #
295
+ # When using omniauth, Devise cannot automatically set Omniauth path,
296
+ # so you need to do it manually. For the users scope, it would be:
297
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
298
+ end