admin_invitable 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +5 -5
  2. data/MIT-LICENSE +18 -17
  3. data/lib/admin_invitable/engine.rb +1 -2
  4. data/lib/admin_invitable/version.rb +1 -1
  5. data/spec/dummy/Rakefile +1 -1
  6. data/spec/dummy/app/admin/admin_users.rb +1 -3
  7. data/spec/dummy/app/admin/dashboard.rb +2 -3
  8. data/spec/dummy/app/assets/config/manifest.js +2 -0
  9. data/spec/dummy/app/assets/javascripts/active_admin.js +1 -0
  10. data/spec/dummy/app/assets/stylesheets/{active_admin.css.scss → active_admin.scss} +3 -3
  11. data/spec/dummy/app/assets/stylesheets/application.css +5 -5
  12. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  13. data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
  14. data/spec/dummy/app/controllers/application_controller.rb +1 -1
  15. data/spec/dummy/app/javascript/packs/application.js +15 -0
  16. data/spec/dummy/app/jobs/application_job.rb +7 -0
  17. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  18. data/spec/dummy/app/models/admin_user.rb +2 -2
  19. data/spec/dummy/app/models/application_record.rb +3 -0
  20. data/spec/dummy/app/views/layouts/application.html.erb +10 -9
  21. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  22. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  23. data/spec/dummy/bin/rails +3 -3
  24. data/spec/dummy/bin/rake +2 -2
  25. data/spec/dummy/bin/setup +33 -0
  26. data/spec/dummy/config.ru +3 -1
  27. data/spec/dummy/config/application.rb +12 -13
  28. data/spec/dummy/config/boot.rb +3 -3
  29. data/spec/dummy/config/cable.yml +10 -0
  30. data/spec/dummy/config/database.yml +2 -2
  31. data/spec/dummy/config/environment.rb +1 -1
  32. data/spec/dummy/config/environments/development.rb +56 -12
  33. data/spec/dummy/config/environments/production.rb +65 -23
  34. data/spec/dummy/config/environments/test.rb +29 -9
  35. data/spec/dummy/config/initializers/active_admin.rb +106 -4
  36. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
  37. data/spec/dummy/config/initializers/assets.rb +6 -2
  38. data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -3
  39. data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
  40. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -1
  41. data/spec/dummy/config/initializers/devise.rb +94 -32
  42. data/spec/dummy/config/initializers/filter_parameter_logging.rb +3 -1
  43. data/spec/dummy/config/initializers/permissions_policy.rb +11 -0
  44. data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
  45. data/spec/dummy/config/locales/devise.en.yml +7 -2
  46. data/spec/dummy/config/locales/devise_invitable.en.yml +9 -1
  47. data/spec/dummy/config/locales/en.yml +11 -1
  48. data/spec/dummy/config/puma.rb +43 -0
  49. data/spec/dummy/config/storage.yml +34 -0
  50. data/spec/dummy/db/migrate/{20150410143721_devise_create_admin_users.rb → 20210618143445_devise_create_admin_users.rb} +9 -13
  51. data/spec/dummy/db/migrate/{20150410143725_create_active_admin_comments.rb → 20210618143451_create_active_admin_comments.rb} +2 -5
  52. data/spec/dummy/db/migrate/{20150410152955_devise_invitable_add_to_admin_users.rb → 20210618143525_devise_invitable_add_to_admin_users.rb} +4 -9
  53. data/spec/dummy/db/schema.rb +34 -42
  54. data/spec/dummy/public/404.html +6 -6
  55. data/spec/dummy/public/422.html +6 -6
  56. data/spec/dummy/public/500.html +6 -6
  57. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  58. data/spec/dummy/public/apple-touch-icon.png +0 -0
  59. data/spec/dummy/spec/factories/admin_users.rb +3 -3
  60. data/spec/dummy/spec/models/admin_user_spec.rb +7 -0
  61. data/spec/rails_helper.rb +6 -4
  62. metadata +116 -61
  63. data/spec/dummy/README.rdoc +0 -28
  64. data/spec/dummy/bin/bundle +0 -3
  65. data/spec/dummy/config/initializers/session_store.rb +0 -3
  66. data/spec/dummy/config/secrets.yml +0 -22
  67. data/spec/dummy/db/test.sqlite3 +0 -0
  68. data/spec/dummy/log/test.log +0 -464
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7ae01eced5bdd6e48d2ac4a4d01d963d849f5295
4
- data.tar.gz: 414c17dc8937f3214f8a7969db56920efcbdfd87
2
+ SHA256:
3
+ metadata.gz: 981dbbab33ca019078f9efe91e904ce07787c567c213fe486cf92065b94b4f53
4
+ data.tar.gz: 0e20df01ca9aad591bfb1182af06a954892b434fe0f74569d31424b24dac05d2
5
5
  SHA512:
6
- metadata.gz: 91bf3c4b8417bf5b24e02a54f20ba314eb1317170827e48db59fb92f03f1a145c8c2e64696ab255acfb8a761a2481b3f07590c85773e5ef7f36da86fbd4e6b8b
7
- data.tar.gz: 952428edde7515eb072e1714059f7e79f576d49fd29d2282d21ab3862d3dc2d691def2977bdc6290c21c67f8315d5e50d2bd6aead6e67e9ce44ca3f2b0ce8fd6
6
+ metadata.gz: 57b6f0fac16c367d107fda1f56650811d2a8b0766d512ec4d0ec08da88e47cb7eb205fc8c9fc0efd826c21a9479b252d174ca32dd93414adae8523afd54f97cd
7
+ data.tar.gz: 563cde3bafa0f29c01d527ae770ee0d9db56c9c3442c47e82c48025bf9592a31d6ad9928c78390cd395881a56e3b500416aac8bfb8642ff6f94e6210d91bfd0d
data/MIT-LICENSE CHANGED
@@ -1,20 +1,21 @@
1
- Copyright 2015 YOURNAME
1
+ The MIT License (MIT)
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
3
+ Copyright 2021 Platanus
10
4
 
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
13
11
 
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -4,10 +4,9 @@ module AdminInvitable
4
4
 
5
5
  config.generators do |g|
6
6
  g.test_framework :rspec
7
- g.fixture_replacement :factory_girl, :dir => 'spec/factories'
8
7
  end
9
8
 
10
- initializer "ativeadmin_invitable_patch" do |app|
9
+ initializer "ativeadmin_invitable_patch" do |_app|
11
10
  require_relative "activeadmin_invitable_patch"
12
11
  end
13
12
  end
@@ -1,3 +1,3 @@
1
1
  module AdminInvitable
2
- VERSION = "0.1.0"
2
+ VERSION = "1.0.0"
3
3
  end
data/spec/dummy/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
- require File.expand_path('../config/application', __FILE__)
4
+ require_relative "config/application"
5
5
 
6
6
  Rails.application.load_tasks
@@ -5,19 +5,17 @@ ActiveAdmin.register AdminUser do
5
5
  selectable_column
6
6
  id_column
7
7
  column :email
8
- column :current_sign_in_at
9
8
  column :sign_in_count
10
9
  column :created_at
11
10
  actions
12
11
  end
13
12
 
14
13
  filter :email
15
- filter :current_sign_in_at
16
14
  filter :sign_in_count
17
15
  filter :created_at
18
16
 
19
17
  form do |f|
20
- f.inputs "Admin Details" do
18
+ f.inputs do
21
19
  f.input :email
22
20
  f.input :password
23
21
  f.input :password_confirmation
@@ -1,8 +1,7 @@
1
1
  ActiveAdmin.register_page "Dashboard" do
2
+ menu priority: 1, label: proc { I18n.t("active_admin.dashboard") }
2
3
 
3
- menu priority: 1, label: proc{ I18n.t("active_admin.dashboard") }
4
-
5
- content title: proc{ I18n.t("active_admin.dashboard") } do
4
+ content title: proc { I18n.t("active_admin.dashboard") } do
6
5
  div class: "blank_slate_container", id: "dashboard_default_message" do
7
6
  span class: "blank_slate" do
8
7
  span I18n.t("active_admin.dashboard_welcome.welcome")
@@ -0,0 +1,2 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../stylesheets .css
@@ -0,0 +1 @@
1
+ //= require active_admin/base
@@ -1,7 +1,7 @@
1
- // SASS variable overrides must be declared before loading up Active Admin's styles.
1
+ // Sass variable overrides must be declared before loading up Active Admin's styles.
2
2
  //
3
3
  // To view the variables that Active Admin provides, take a look at
4
- // `app/assets/stylesheets/active_admin/mixins/_variables.css.scss` in the
4
+ // `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the
5
5
  // Active Admin source.
6
6
  //
7
7
  // For example, to change the sidebar width:
@@ -11,7 +11,7 @@
11
11
  @import "active_admin/mixins";
12
12
  @import "active_admin/base";
13
13
 
14
- // Overriding any non-variable SASS must be done after the fact.
14
+ // Overriding any non-variable Sass must be done after the fact.
15
15
  // For example, to change the default status-tag color:
16
16
  //
17
17
  // .status_tag { background: #6090DB; }
@@ -3,13 +3,13 @@
3
3
  * listed below.
4
4
  *
5
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.
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
7
  *
8
8
  * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
12
  *
13
+ *= require_tree .
13
14
  *= require_self
14
- *= require common
15
15
  */
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Channel < ActionCable::Channel::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ end
4
+ end
@@ -2,5 +2,5 @@ class ApplicationController < ActionController::Base
2
2
  # Prevent CSRF attacks by raising an exception.
3
3
  # For APIs, you may want to use :null_session instead.
4
4
  protect_from_forgery with: :exception
5
- skip_before_filter :verify_authenticity_token
5
+ skip_before_action :verify_authenticity_token
6
6
  end
@@ -0,0 +1,15 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require rails-ujs
14
+ //= require activestorage
15
+ //= require_tree .
@@ -0,0 +1,7 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ # Automatically retry jobs that encountered a deadlock
3
+ # retry_on ActiveRecord::Deadlocked
4
+
5
+ # Most jobs are safe to ignore if the underlying records are no longer available
6
+ # discard_on ActiveJob::DeserializationError
7
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -1,6 +1,6 @@
1
- class AdminUser < ActiveRecord::Base
1
+ class AdminUser < ApplicationRecord
2
2
  # Include default devise modules. Others available are:
3
3
  # :confirmable, :lockable, :timeoutable and :omniauthable
4
4
  devise :invitable, :database_authenticatable,
5
- :recoverable, :rememberable, :trackable, :validatable
5
+ :recoverable, :rememberable, :validatable
6
6
  end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -1,14 +1,15 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <%= csrf_meta_tags %>
7
+ <%= csp_meta_tag %>
10
8
 
11
- <%= yield %>
9
+ <%= stylesheet_link_tag 'application', media: 'all' %>
10
+ </head>
12
11
 
13
- </body>
12
+ <body>
13
+ <%= yield %>
14
+ </body>
14
15
  </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
data/spec/dummy/bin/rails CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
+ require_relative "../config/boot"
4
+ require "rails/commands"
data/spec/dummy/bin/rake CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
2
+ require_relative "../config/boot"
3
+ require "rake"
4
4
  Rake.application.run
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env ruby
2
+ require "fileutils"
3
+
4
+ # path to your application root.
5
+ APP_ROOT = File.expand_path('..', __dir__)
6
+
7
+ def system!(*args)
8
+ system(*args) || abort("\n== Command #{args} failed ==")
9
+ end
10
+
11
+ FileUtils.chdir APP_ROOT do
12
+ # This script is a way to set up or update your development environment automatically.
13
+ # This script is idempotent, so that you can run it at any time and get an expectable outcome.
14
+ # Add necessary setup steps to this file.
15
+
16
+ puts '== Installing dependencies =='
17
+ system! 'gem install bundler --conservative'
18
+ system('bundle check') || system!('bundle install')
19
+
20
+ # puts "\n== Copying sample files =="
21
+ # unless File.exist?('config/database.yml')
22
+ # FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
23
+ # end
24
+
25
+ puts "\n== Preparing database =="
26
+ system! 'bin/rails db:prepare'
27
+
28
+ puts "\n== Removing old logs and tempfiles =="
29
+ system! 'bin/rails log:clear tmp:clear'
30
+
31
+ puts "\n== Restarting application server =="
32
+ system! 'bin/rails restart'
33
+ end
data/spec/dummy/config.ru CHANGED
@@ -1,4 +1,6 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require ::File.expand_path('../config/environment', __FILE__)
3
+ require_relative "config/environment"
4
+
4
5
  run Rails.application
6
+ Rails.application.load_server
@@ -1,23 +1,22 @@
1
- require File.expand_path('../boot', __FILE__)
1
+ require_relative "boot"
2
2
 
3
- require 'rails/all'
3
+ require "rails/all"
4
4
 
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
5
7
  Bundler.require(*Rails.groups)
6
8
  require "admin_invitable"
7
9
 
8
10
  module Dummy
9
11
  class Application < Rails::Application
10
- # Settings in config/environments/* take precedence over those specified here.
11
- # Application configuration should go into files in config/initializers
12
- # -- all .rb files in that directory are automatically loaded.
12
+ config.load_defaults Rails::VERSION::STRING.to_f
13
13
 
14
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
- # config.time_zone = 'Central Time (US & Canada)'
17
-
18
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
- # config.i18n.default_locale = :de
14
+ # Configuration for the application, engines, and railties goes here.
15
+ #
16
+ # These settings can be overridden in specific environments using the files
17
+ # in config/environments, which are processed later.
18
+ #
19
+ # config.time_zone = "Central Time (US & Canada)"
20
+ # config.eager_load_paths << Rails.root.join("extras")
21
21
  end
22
22
  end
23
-
@@ -1,5 +1,5 @@
1
1
  # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3
3
 
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
4
+ require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
5
+ $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
@@ -0,0 +1,10 @@
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: test
6
+
7
+ production:
8
+ adapter: redis
9
+ url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10
+ channel_prefix: dummy_production
@@ -1,4 +1,4 @@
1
- # SQLite version 3.x
1
+ # SQLite. Versions 3.8.0 and up are supported.
2
2
  # gem install sqlite3
3
3
  #
4
4
  # Ensure the SQLite 3 gem is defined in your Gemfile
@@ -6,7 +6,7 @@
6
6
  #
7
7
  default: &default
8
8
  adapter: sqlite3
9
- pool: 5
9
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
10
  timeout: 5000
11
11
 
12
12
  development:
@@ -1,5 +1,5 @@
1
1
  # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
2
+ require_relative "application"
3
3
 
4
4
  # Initialize the Rails application.
5
5
  Rails.application.initialize!
@@ -1,39 +1,83 @@
1
+ require "active_support/core_ext/integer/time"
2
+
1
3
  Rails.application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
+ # In the development environment your application's code is reloaded any time
7
+ # it changes. This slows down response time but is perfect for development
6
8
  # since you don't have to restart the web server when you make code changes.
7
9
  config.cache_classes = false
8
10
 
9
11
  # Do not eager load code on boot.
10
12
  config.eager_load = false
11
13
 
12
- # Show full error reports and disable caching.
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
14
+ # Show full error reports.
15
+ config.consider_all_requests_local = true
16
+
17
+ # Enable/disable caching. By default caching is disabled.
18
+ # Run rails dev:cache to toggle caching.
19
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
20
+ config.action_controller.perform_caching = true
21
+ config.action_controller.enable_fragment_cache_logging = true
22
+
23
+ config.cache_store = :memory_store
24
+ config.public_file_server.headers = {
25
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
26
+ }
27
+ else
28
+ config.action_controller.perform_caching = false
29
+
30
+ config.cache_store = :null_store
31
+ end
32
+
33
+ # Store uploaded files on the local file system (see config/storage.yml for options).
34
+ config.active_storage.service = :local
15
35
 
16
36
  # Don't care if the mailer can't send.
17
37
  config.action_mailer.raise_delivery_errors = false
18
- config.action_mailer.default_url_options = {:host => "localhost:3000"}
38
+
39
+ config.action_mailer.perform_caching = false
40
+
19
41
  config.action_mailer.delivery_method = :letter_opener
20
42
 
43
+ config.action_mailer.default_url_options = {
44
+ host: ENV.fetch('APPLICATION_HOST', 'localhost:3000'),
45
+ protocol: 'http'
46
+ }
47
+
21
48
  # Print deprecation notices to the Rails logger.
22
49
  config.active_support.deprecation = :log
23
50
 
51
+ # Raise exceptions for disallowed deprecations.
52
+ config.active_support.disallowed_deprecation = :raise
53
+
54
+ # Tell Active Support which deprecation messages to disallow.
55
+ config.active_support.disallowed_deprecation_warnings = []
56
+
24
57
  # Raise an error on page load if there are pending migrations.
25
58
  config.active_record.migration_error = :page_load
26
59
 
60
+ # Highlight code that triggered database queries in logs.
61
+ config.active_record.verbose_query_logs = true
62
+
27
63
  # Debug mode disables concatenation and preprocessing of assets.
28
64
  # This option may cause significant delays in view rendering with a large
29
65
  # number of complex assets.
30
66
  config.assets.debug = true
31
67
 
32
- # Adds additional error checking when serving assets at runtime.
33
- # Checks for improperly declared sprockets dependencies.
34
- # Raises helpful error messages.
35
- config.assets.raise_runtime_errors = true
68
+ # Suppress logger output for asset requests.
69
+ config.assets.quiet = true
70
+
71
+ # Raises error for missing translations.
72
+ # config.i18n.raise_on_missing_translations = true
73
+
74
+ # Annotate rendered view with file names.
75
+ # config.action_view.annotate_rendered_view_with_filenames = true
76
+
77
+ # Use an evented file watcher to asynchronously detect changes in source code,
78
+ # routes, locales, etc. This feature depends on the listen gem.
79
+ # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
36
80
 
37
- # Raises error for missing translations
38
- # config.action_view.raise_on_missing_translations = true
81
+ # Uncomment if you wish to allow Action Cable access from any origin.
82
+ # config.action_cable.disable_request_forgery_protection = true
39
83
  end