pineapples 0.3.34 → 0.3.345

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/bin/pineapples +13 -13
  3. data/lib/pineapples.rb +3 -1
  4. data/lib/pineapples/actions.rb +6 -0
  5. data/lib/pineapples/actions/base/target.rb +41 -91
  6. data/lib/pineapples/actions/bundle.rb +16 -0
  7. data/lib/pineapples/actions/chmod.rb +3 -2
  8. data/lib/pineapples/actions/copy_file.rb +1 -1
  9. data/lib/pineapples/actions/empty_directory.rb +1 -1
  10. data/lib/pineapples/actions/gsub_file.rb +5 -3
  11. data/lib/pineapples/actions/inside.rb +5 -1
  12. data/lib/pineapples/actions/rails/erb_converters.rb +11 -4
  13. data/lib/pineapples/actions/rails/new_hash_syntax_converter.rb +36 -0
  14. data/lib/pineapples/actions/rails/rails.rb +1 -0
  15. data/lib/pineapples/actions/remove_file.rb +28 -28
  16. data/lib/pineapples/actions/shell.rb +43 -9
  17. data/lib/pineapples/app_generator.rb +154 -38
  18. data/lib/pineapples/helpers.rb +31 -0
  19. data/lib/pineapples/parser.rb +42 -37
  20. data/lib/pineapples/setting.rb +155 -155
  21. data/lib/pineapples/settings.rb +31 -31
  22. data/lib/pineapples/templates/.example.env.tt +15 -0
  23. data/lib/pineapples/templates/.gitignore +3 -0
  24. data/lib/pineapples/templates/.simplecov.tt +11 -0
  25. data/lib/pineapples/templates/Gemfile.tt +23 -5
  26. data/lib/pineapples/templates/Procfile +1 -1
  27. data/lib/pineapples/templates/Procfile.dev.tt +2 -0
  28. data/lib/pineapples/templates/app/assets/javascripts/libs.js +4 -2
  29. data/lib/pineapples/templates/app/assets/stylesheets/application.scss +4 -1
  30. data/lib/pineapples/templates/app/controllers/application_controller.rb.tt +0 -2
  31. data/lib/pineapples/templates/app/controllers/auth!=devise!/confirmations_controller.rb +11 -0
  32. data/lib/pineapples/templates/app/controllers/auth!=devise!/passwords_controller.rb.tt +12 -0
  33. data/lib/pineapples/templates/app/controllers/auth!=devise!/registrations_controller.rb.tt +25 -0
  34. data/lib/pineapples/templates/app/controllers/auth!=devise!/sessions_controller.rb.tt +59 -0
  35. data/lib/pineapples/templates/app/models/user!=needs_user_model!.rb.tt +7 -4
  36. data/lib/pineapples/templates/app/policies!=pundit!/application_policy.rb +49 -0
  37. data/lib/pineapples/templates/app/presenters/base_presenter.rb.tt +24 -0
  38. data/lib/pineapples/templates/app/responders/application_responder.rb +9 -0
  39. data/lib/pineapples/templates/app/services/service.rb +7 -0
  40. data/lib/pineapples/templates/app/views/common/_footer.html.erb +3 -3
  41. data/lib/pineapples/templates/app/views/common/_header.html.erb +5 -5
  42. data/lib/pineapples/templates/app/views/layouts/application.html.erb.tt +0 -1
  43. data/lib/pineapples/templates/app/views/pages/home.html.erb +0 -1
  44. data/lib/pineapples/templates/bin/nginx +4 -0
  45. data/lib/pineapples/templates/bin/rails +1 -0
  46. data/lib/pineapples/templates/bin/rspec +19 -0
  47. data/lib/pineapples/templates/bin/setup +111 -21
  48. data/lib/pineapples/templates/config.ru.tt +3 -0
  49. data/lib/pineapples/templates/config/application.rb.tt +3 -3
  50. data/lib/pineapples/templates/config/boot.rb +5 -5
  51. data/lib/pineapples/templates/config/database.yml.tt +1 -1
  52. data/lib/pineapples/templates/config/environments/{development.rb → development.rb.tt} +6 -1
  53. data/lib/pineapples/templates/config/environments/production.rb +1 -1
  54. data/lib/pineapples/templates/config/environments/test.rb +2 -2
  55. data/lib/pineapples/templates/config/i18n-tasks.yml +2 -0
  56. data/lib/pineapples/templates/config/initializers/{carrierwave.rb → carrierwave!=carrierwave!.rb} +22 -22
  57. data/lib/pineapples/templates/config/initializers/devise!=devise!.rb.tt +262 -0
  58. data/lib/pineapples/templates/config/initializers/kaminari.rb +10 -0
  59. data/lib/pineapples/templates/config/initializers/seed_migrations.rb +15 -0
  60. data/lib/pineapples/templates/config/initializers/simple_form.rb +165 -0
  61. data/lib/pineapples/templates/config/locales/devise.en.yml +60 -0
  62. data/lib/pineapples/templates/config/locales/{en.yml → en.yml.tt} +2 -0
  63. data/lib/pineapples/templates/config/locales/kaminari.en.yml +17 -0
  64. data/lib/pineapples/templates/config/locales/simple_form.en.yml +31 -0
  65. data/lib/pineapples/templates/config/nginx.conf.tt +147 -0
  66. data/lib/pineapples/templates/config/puma/development.rb.tt +27 -0
  67. data/lib/pineapples/templates/config/{puma.rb → puma/production.rb} +5 -5
  68. data/lib/pineapples/templates/config/routes.rb.tt +4 -0
  69. data/lib/pineapples/templates/config/spring.rb +4 -0
  70. data/lib/pineapples/templates/lib/devise!=devise!/{ajax_failure.rb → ajax_failure!=ajax_login!.rb} +0 -0
  71. data/lib/pineapples/templates/lib/logging/custom_rack_logger.rb +7 -9
  72. data/lib/pineapples/templates/lib/logging/custom_request_logger.rb +46 -48
  73. data/lib/pineapples/templates/lib/tasks/admin!=user_role_field!.rake +18 -19
  74. data/lib/pineapples/templates/lib/templates/{erb → erb!=erb!}/scaffold/_form.html.erb +0 -0
  75. data/lib/pineapples/templates/lib/templates/haml!=haml!/scaffold/_form.html.haml +9 -0
  76. data/lib/pineapples/templates/lib/templates/slim!=slim!/scaffold/_form.html.slim +9 -0
  77. data/lib/pineapples/templates/spec/i18n_spec.rb +17 -0
  78. data/lib/pineapples/templates/spec/rails_helper.rb +30 -0
  79. data/lib/pineapples/templates/spec/spec_helper.rb +44 -0
  80. data/lib/pineapples/templates/spec/support/capybara.rb +4 -0
  81. data/lib/pineapples/templates/spec/support/database_cleaner.rb +27 -0
  82. data/lib/pineapples/templates/spec/support/email_matchers.rb +17 -0
  83. data/lib/pineapples/templates/spec/support/factory_girl.rb +14 -0
  84. data/lib/pineapples/templates/spec/support/job_helpers.rb +8 -0
  85. data/lib/pineapples/templates/spec/support/matchers.rb +10 -0
  86. data/lib/pineapples/templates/spec/support/rake_tasks.rb +8 -0
  87. data/lib/pineapples/templates/spec/support/shoulda_matchers.rb +24 -0
  88. data/lib/pineapples/version.rb +2 -2
  89. data/pineapples.gemspec +1 -3
  90. metadata +46 -12
  91. data/lib/pineapples/app_builder.rb +0 -70
  92. data/lib/pineapples/build_tasks/root_files.rb +0 -23
  93. data/lib/pineapples/templates/app/controllers/auth/confirmations_controller.rb +0 -2
@@ -4,4 +4,7 @@ require ::File.expand_path('../config/environment', __FILE__)
4
4
  use Rack::Static, urls: ['/carrierwave'], root: 'tmp'
5
5
 
6
6
  <% end -%>
7
+
8
+ use Rack::CanonicalHost, ENV['CANONICAL_HOST'] if ENV['CANONICAL_HOST']
9
+
7
10
  run Rails.application
@@ -12,16 +12,16 @@ module <%= app_const_base %>
12
12
  class Application < Rails::Application
13
13
  require_all "#{Rails.root}/lib/extensions"
14
14
  require_all "#{Rails.root}/lib/logging" if !Rails.env.production?
15
- <%= comment_if_not :carrierwave %>require_all "#{Rails.root}/lib/carrierwave"
15
+ <% if carrierwave? -%>require_all "#{Rails.root}/lib/carrierwave"<% end %>
16
16
  require_all "#{Rails.root}/lib/virtus"
17
- <%= comment_if_not :devise %>require_all "#{Rails.root}/lib/devise"
17
+ <% if devise? -%>require_all "#{Rails.root}/lib/devise"<% end %>
18
18
  require_all "#{Rails.root}/lib/simple_form"
19
19
  require "#{Rails.root}/config/smtp"
20
20
 
21
21
  config.generators do |generate|
22
22
  generate.scaffold_controller :responders_controller
23
23
  generate.helper false
24
- generate.template_engine <%= template_engine %>
24
+ generate.template_engine :<%= template_engine %>
25
25
  generate.javascript_engine false
26
26
  generate.stylesheets false
27
27
 
@@ -1,5 +1,5 @@
1
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2
-
3
- require 'bundler/setup' # Set up gems listed in the Gemfile.
4
-
5
- require_relative '../lib/extensions/env_wrapper'
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2
+
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
4
+
5
+ # require_relative '../lib/extensions/env_wrapper'
@@ -1,8 +1,8 @@
1
1
  development: &default
2
2
  adapter: postgresql
3
+ host: localhost
3
4
  database: <%= app_name %>_dev
4
5
  encoding: utf8
5
- host: localhost
6
6
  min_messages: warning
7
7
  pool: <%%= Integer(ENV.fetch('DB_POOL', 5)) %>
8
8
  reaping_frequency: <%%= Integer(ENV.fetch('DB_REAPING_FREQUENCY', 10)) %>
@@ -1,6 +1,9 @@
1
1
  Rails.application.configure do
2
2
  config.cache_classes = false
3
+
4
+ # Avoid Spring issues when running simple_cov
3
5
  config.eager_load = false
6
+ config.serve_static_files = false
4
7
 
5
8
  # Show full error reports and disable caching.
6
9
  config.consider_all_requests_local = true
@@ -41,9 +44,11 @@ Rails.application.configure do
41
44
 
42
45
  config.action_mailer.raise_delivery_errors = true
43
46
  # config.action_mailer.delivery_method = :test
47
+ <% if web_console? -%>
44
48
 
45
49
  config.web_console.whitelisted_ips = '192.168.0.0/16'
46
50
  config.web_console.whiny_requests = false
51
+ <% end -%>
47
52
 
48
53
  # Settings specified here will take precedence over those in config/application.rb.
49
54
  live_reload_options = {
@@ -57,7 +62,7 @@ Rails.application.configure do
57
62
  #ignore: [ %r{dont/modify\.html$} ]
58
63
  }
59
64
 
60
- config.middleware.insert_after(ActionDispatch::Static, Rack::LiveReload, live_reload_options)
65
+ # config.middleware.insert_after(ActionDispatch::Static, Rack::LiveReload, live_reload_options)
61
66
 
62
67
  # Raises error for missing translations
63
68
  config.action_view.raise_on_missing_translations = true
@@ -6,7 +6,7 @@ Rails.application.configure do
6
6
  config.eager_load = true
7
7
 
8
8
  # Full error reports are disabled
9
- config.consider_all_requests_local = false
9
+ config.consider_all_requests_local = false
10
10
 
11
11
  config.action_controller.perform_caching = true
12
12
 
@@ -1,9 +1,9 @@
1
1
  Rails.application.configure do
2
2
  config.cache_classes = true
3
3
 
4
- # preload Rails before running tests to leverage spring
5
- # TODO: figure this out
4
+ # Avoid Spring issues when running simple_cov
6
5
  config.eager_load = false
6
+ config.serve_static_files = false
7
7
 
8
8
  # Configure static file server for tests with Cache-Control for performance.
9
9
  config.serve_static_files = true
@@ -8,6 +8,8 @@ search:
8
8
  ignore_unused:
9
9
  - activerecord.*
10
10
  - date.*
11
+ - devise.*
12
+ - kaminari.*
11
13
  - simple_form.*
12
14
  - time.*
13
15
  - titles.*
@@ -1,22 +1,22 @@
1
- CarrierWave.configure do |config|
2
- config.root = Rails.root.join('tmp')
3
- config.cache_dir = 'carrierwave'
4
-
5
- if Rails.env.production?
6
- config.storage = :aws
7
- config.aws_authenticated_url_expiration = 60 * 60 * 24 * 7
8
-
9
- config.aws_attributes = {
10
- expires: 1.week.from_now.httpdate,
11
- cache_control: 'max-age=604800'
12
- }
13
-
14
- config.aws_credentials = {
15
- aws_access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
16
- aws_secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY')
17
- }
18
-
19
- config.aws_bucket = ENV.fetch('AWS_BUCKET')
20
- end
21
-
22
- end
1
+ CarrierWave.configure do |config|
2
+ config.root = Rails.root.join('tmp')
3
+ config.cache_dir = 'carrierwave'
4
+
5
+ if Rails.env.production?
6
+ config.storage = :aws
7
+ config.aws_authenticated_url_expiration = 60 * 60 * 24 * 7
8
+
9
+ config.aws_attributes = {
10
+ expires: 1.week.from_now.httpdate,
11
+ cache_control: 'max-age=604800'
12
+ }
13
+
14
+ config.aws_credentials = {
15
+ aws_access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
16
+ aws_secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY')
17
+ }
18
+
19
+ config.aws_bucket = ENV.fetch('AWS_BUCKET')
20
+ end
21
+
22
+ end
@@ -0,0 +1,262 @@
1
+ Devise.setup do |config|
2
+ # The secret key used by Devise. Devise uses this key to generate
3
+ # random tokens. Changing this key will render invalid all existing
4
+ # confirmation, reset password and unlock tokens in the database.
5
+ # Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key`
6
+ # by default. You can change it below and use your own secret key.
7
+ # config.secret_key = '551c307cc9e93529ce1ec37476931fec31b4a46778300b6b0ee713223f23456dd7d9ad2fbc9ece1da400e3fc76ff30c1132661bfa5cce96d283567f562fa2937'
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 = "\"<%= humanized_application_name %>\" <no-reply@#{ENV['HOSTNAME']}>"
14
+
15
+ # Configure the class responsible to send e-mails.
16
+ # config.mailer = 'Devise::Mailer'
17
+
18
+ # ==> ORM configuration
19
+ require 'devise/orm/active_record'
20
+
21
+ # ==> Configuration for any authentication mechanism
22
+ # Configure which keys are used when authenticating a user. The default is
23
+ # just :email. You can configure it to use [:username, :subdomain], so for
24
+ # authenticating a user, both parameters are required. Remember that those
25
+ # parameters are used only when authenticating and not when retrieving from
26
+ # session. If you need permissions, you should implement that in a before filter.
27
+ # You can also supply a hash where the value is a boolean determining whether
28
+ # or not authentication should be aborted when the value is not present.
29
+ # config.authentication_keys = [:email]
30
+
31
+ # Configure parameters from the request object used for authentication. Each entry
32
+ # given should be a request method and it will automatically be passed to the
33
+ # find_for_authentication method and considered in your model lookup. For instance,
34
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
35
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
36
+ # config.request_keys = []
37
+
38
+ # Configure which authentication keys should be case-insensitive.
39
+ # These keys will be downcased upon creating or modifying a user and when used
40
+ # to authenticate or find a user. Default is :email.
41
+ config.case_insensitive_keys = [:email]
42
+
43
+ # Configure which authentication keys should have whitespace stripped.
44
+ # These keys will have whitespace before and after removed upon creating or
45
+ # modifying a user and when used to authenticate or find a user. Default is :email.
46
+ config.strip_whitespace_keys = [:email]
47
+
48
+ # Tell if authentication through request.params is enabled. True by default.
49
+ # It can be set to an array that will enable params authentication only for the
50
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
51
+ # enable it only for database (email + password) authentication.
52
+ # config.params_authenticatable = true
53
+
54
+ # Tell if authentication through HTTP Auth is enabled. False by default.
55
+ # It can be set to an array that will enable http authentication only for the
56
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
57
+ # enable it only for database authentication. The supported strategies are:
58
+ # :database = Support basic authentication with authentication key + password
59
+ # config.http_authenticatable = false
60
+
61
+ # If 401 status code should be returned for AJAX requests. True by default.
62
+ # config.http_authenticatable_on_xhr = true
63
+
64
+ # The realm used in Http Basic Authentication. 'Application' by default.
65
+ # config.http_authentication_realm = 'Application'
66
+
67
+ # It will change confirmation, password recovery and other workflows
68
+ # to behave the same regardless if the e-mail provided was right or wrong.
69
+ # Does not affect registerable.
70
+ # config.paranoid = true
71
+
72
+ # By default Devise will store the user in session. You can skip storage for
73
+ # particular strategies by setting this option.
74
+ # Notice that if you are skipping storage for all authentication paths, you
75
+ # may want to disable generating routes to Devise's sessions controller by
76
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
77
+ config.skip_session_storage = [:http_auth]
78
+
79
+ # By default, Devise cleans up the CSRF token on authentication to
80
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
81
+ # requests for sign in and sign up, you need to get a new CSRF token
82
+ # from the server. You can disable this option at your own risk.
83
+ # config.clean_up_csrf_token_on_authentication = true
84
+
85
+ # ==> Configuration for :database_authenticatable
86
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
87
+ # using other encryptors, it sets how many times you want the password re-encrypted.
88
+ #
89
+ # Limiting the stretches to just one in testing will increase the performance of
90
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
91
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
92
+ # encryptor), the cost increases exponentially with the number of stretches (e.g.
93
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
94
+ config.stretches = Rails.env.test? ? 1 : 14
95
+
96
+ # Setup a pepper to generate the encrypted password.
97
+ # config.pepper = '5d76ec441fbfdd8655a4c58260d8752b1e25e1f866a2da8f58fb671c516bae05c9146862562857fbe3903a5887fcb7ff05e067cf98fbb1acadfe55bd6c1d4ff8'
98
+
99
+ # ==> Configuration for :confirmable
100
+ # A period that the user is allowed to access the website even without
101
+ # confirming their account. For instance, if set to 2.days, the user will be
102
+ # able to access the website for two days without confirming their account,
103
+ # access will be blocked just in the third day. Default is 0.days, meaning
104
+ # the user cannot access the website without confirming their account.
105
+ # config.allow_unconfirmed_access_for = 2.days
106
+
107
+ # A period that the user is allowed to confirm their account before their
108
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
109
+ # their account within 3 days after the mail was sent, but on the fourth day
110
+ # their account can't be confirmed with the token any more.
111
+ # Default is nil, meaning there is no restriction on how long a user can take
112
+ # before confirming their account.
113
+ # config.confirm_within = 3.days
114
+
115
+ # If true, requires any email changes to be confirmed (exactly the same way as
116
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
117
+ # db field (see migrations). Until confirmed, new email is stored in
118
+ # unconfirmed_email column, and copied to email column on successful confirmation.
119
+ config.reconfirmable = true
120
+
121
+ # Defines which key will be used when confirming an account
122
+ # config.confirmation_keys = [:email]
123
+
124
+ # ==> Configuration for :rememberable
125
+ # The time the user will be remembered without asking for credentials again.
126
+ # config.remember_for = 2.weeks
127
+
128
+ # Invalidates all the remember me tokens when the user signs out.
129
+ config.expire_all_remember_me_on_sign_out = true
130
+
131
+ # If true, extends the user's remember period when remembered via cookie.
132
+ # config.extend_remember_period = false
133
+
134
+ # Options to be passed to the created cookie. For instance, you can set
135
+ # secure: true in order to force SSL only cookies.
136
+ # config.rememberable_options = {}
137
+
138
+ # ==> Configuration for :validatable
139
+ # Range for password length.
140
+ config.password_length = 8..72
141
+
142
+ # Email regex used to validate email formats. It simply asserts that
143
+ # one (and only one) @ exists in the given string. This is mainly
144
+ # to give user feedback and not to assert the e-mail validity.
145
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
146
+
147
+ # ==> Configuration for :timeoutable
148
+ # The time you want to timeout the user session without activity. After this
149
+ # time the user will be asked for credentials again. Default is 30 minutes.
150
+ # config.timeout_in = 30.minutes
151
+
152
+ # ==> Configuration for :lockable
153
+ # Defines which strategy will be used to lock an account.
154
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
155
+ # :none = No lock strategy. You should handle locking by yourself.
156
+ # config.lock_strategy = :failed_attempts
157
+
158
+ # Defines which key will be used when locking and unlocking an account
159
+ # config.unlock_keys = [:email]
160
+
161
+ # Defines which strategy will be used to unlock an account.
162
+ # :email = Sends an unlock link to the user email
163
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
164
+ # :both = Enables both strategies
165
+ # :none = No unlock strategy. You should handle unlocking by yourself.
166
+ # config.unlock_strategy = :both
167
+
168
+ # Number of authentication tries before locking an account if lock_strategy
169
+ # is failed attempts.
170
+ # config.maximum_attempts = 20
171
+
172
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
173
+ # config.unlock_in = 1.hour
174
+
175
+ # Warn on the last attempt before the account is locked.
176
+ # config.last_attempt_warning = true
177
+
178
+ # ==> Configuration for :recoverable
179
+ #
180
+ # Defines which key will be used when recovering the password for an account
181
+ # config.reset_password_keys = [:email]
182
+
183
+ # Time interval you can reset your password with a reset password key.
184
+ # Don't put a too small interval or your users won't have the time to
185
+ # change their passwords.
186
+ config.reset_password_within = 6.hours
187
+
188
+ # When set to false, does not sign a user in automatically after their password is
189
+ # reset. Defaults to true, so a user is signed in automatically after a reset.
190
+ # config.sign_in_after_reset_password = true
191
+
192
+ # ==> Configuration for :encryptable
193
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
194
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
195
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
196
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
197
+ # REST_AUTH_SITE_KEY to pepper).
198
+ #
199
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
200
+ # config.encryptor = :sha512
201
+
202
+ # ==> Scopes configuration
203
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
204
+ # "users/sessions/new". It's turned off by default because it's slower if you
205
+ # are using only default views.
206
+ # config.scoped_views = false
207
+
208
+ # Configure the default scope given to Warden. By default it's the first
209
+ # devise role declared in your routes (usually :user).
210
+ # config.default_scope = :user
211
+
212
+ # Set this configuration to false if you want /users/sign_out to sign out
213
+ # only the current scope. By default, Devise signs out all scopes.
214
+ # config.sign_out_all_scopes = true
215
+
216
+ # ==> Navigation configuration
217
+ # Lists the formats that should be treated as navigational. Formats like
218
+ # :html, should redirect to the sign in page when the user does not have
219
+ # access, but formats like :xml or :json, should return 401.
220
+ #
221
+ # If you have any extra navigational formats, like :iphone or :mobile, you
222
+ # should add them to the navigational formats lists.
223
+ #
224
+ # The "*/*" below is required to match Internet Explorer requests.
225
+ # config.navigational_formats = ['*/*', :html]
226
+
227
+ # The default HTTP method used to sign out a resource. Default is :delete.
228
+ config.sign_out_via = :delete
229
+
230
+ # ==> OmniAuth
231
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
232
+ # up on your models and hooks.
233
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
234
+
235
+ # ==> Warden configuration
236
+ # If you want to use other strategies, that are not supported by Devise, or
237
+ # change the failure app, you can configure them inside the config.warden block.
238
+ #
239
+ # config.warden do |manager|
240
+ # manager.intercept_401 = false
241
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
242
+ # end
243
+ <% if ajax_login? -%>
244
+ config.warden do |manager|
245
+ manager.failure_app = AjaxFailure
246
+ end
247
+ <% end -%>
248
+
249
+ # ==> Mountable engine configurations
250
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
251
+ # is mountable, there are some extra configurations to be taken into account.
252
+ # The following options are available, assuming the engine is mounted as:
253
+ #
254
+ # mount MyEngine, at: '/my_engine'
255
+ #
256
+ # The router that invoked `devise_for`, in the example above, would be:
257
+ # config.router_name = :my_engine
258
+ #
259
+ # When using OmniAuth, Devise cannot automatically set OmniAuth path,
260
+ # so you need to do it manually. For the users scope, it would be:
261
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
262
+ end
@@ -0,0 +1,10 @@
1
+ Kaminari.configure do |config|
2
+ # config.default_per_page = 25
3
+ # config.max_per_page = nil
4
+ # config.window = 4
5
+ # config.outer_window = 0
6
+ # config.left = 0
7
+ # config.right = 0
8
+ # config.page_method_name = :page
9
+ # config.param_name = :page
10
+ end
@@ -0,0 +1,15 @@
1
+ # Configuration for seed_migrations gem
2
+
3
+ # SeedMigration.config do |c|
4
+ # c.migration_table_name = 'data_migrations'
5
+ # c.extend_native_migration_task = true
6
+ # end
7
+
8
+ # By default no models are registered, so running seed migrations won't update the seeds file.
9
+ # You have to manually register the models in the configuration file.
10
+
11
+ # Simply register a model:
12
+ # SeedMigration.register Product
13
+
14
+ # You can customize the 'seeded' attribute list:
15
+ # SeedMigration.register User { exclude :id, :password }