Skip to content

Commit 73ef8a7

Browse files
authored
Do not load unused Rails frameworks (#261)
Since we're not using ActionCable, ActionText, ActionMailer or ActionMailbox, we can simplify the app by not loading them and removing related configuration and files.
2 parents 6a59ca3 + 97d940a commit 73ef8a7

File tree

9 files changed

+4
-62
lines changed

9 files changed

+4
-62
lines changed

app/channels/application_cable/channel.rb

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/channels/application_cable/connection.rb

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/mailers/application_mailer.rb

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/views/layouts/mailer.html.erb

Lines changed: 0 additions & 13 deletions
This file was deleted.

app/views/layouts/mailer.text.erb

Lines changed: 0 additions & 1 deletion
This file was deleted.

config/application.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
require 'active_record/railtie'
1010
require 'active_storage/engine'
1111
require 'action_controller/railtie'
12-
require 'action_mailer/railtie'
13-
require 'action_mailbox/engine'
14-
require 'action_text/engine'
12+
# require 'action_mailer/railtie'
13+
# require 'action_mailbox/engine'
14+
# require 'action_text/engine'
1515
require 'action_view/railtie'
16-
require 'action_cable/engine'
16+
# require 'action_cable/engine'
1717
# require "rails/test_unit/railtie"
1818
require_relative '../lib/corp_middleware'
1919

config/environments/development.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@
3939
config.active_storage.service = :local
4040
Rails.application.routes.default_url_options = { host: ENV.fetch('HOST_URL', 'http://localhost:3000') }
4141

42-
# Don't care if the mailer can't send.
43-
config.action_mailer.raise_delivery_errors = false
44-
45-
config.action_mailer.perform_caching = false
46-
4742
# Print deprecation notices to the Rails logger.
4843
config.active_support.deprecation = :log
4944

@@ -65,9 +60,6 @@
6560
# Annotate rendered view with file names.
6661
# config.action_view.annotate_rendered_view_with_filenames = true
6762

68-
# Uncomment if you wish to allow Action Cable access from any origin.
69-
# config.action_cable.disable_request_forgery_protection = true
70-
7163
# Allow smee requests
7264
config.hosts << 'smee.io'
7365
config.hosts << 'editor-api.rpfdev.com'

config/environments/production.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@
3636
"https://#{ENV.fetch('HEROKU_APP_NAME', '')}.herokuapp.com")
3737
}
3838

39-
# Mount Action Cable outside main process or domain.
40-
# config.action_cable.mount_path = nil
41-
# config.action_cable.url = "wss://example.com/cable"
42-
# config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
43-
4439
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
4540
# config.force_ssl = true
4641

@@ -58,12 +53,6 @@
5853
# config.active_job.queue_adapter = :resque
5954
# config.active_job.queue_name_prefix = "app_production"
6055

61-
config.action_mailer.perform_caching = false
62-
63-
# Ignore bad email addresses and do not raise email delivery errors.
64-
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
65-
# config.action_mailer.raise_delivery_errors = false
66-
6756
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
6857
# the I18n.default_locale when a translation cannot be found).
6958
config.i18n.fallbacks = true

config/environments/test.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@
3939
config.active_storage.service = :test
4040
Rails.application.routes.default_url_options = { host: ENV.fetch('HOST_URL', 'http://localhost:3000') }
4141

42-
config.action_mailer.perform_caching = false
43-
44-
# Tell Action Mailer not to deliver emails to the real world.
45-
# The :test delivery method accumulates sent emails in the
46-
# ActionMailer::Base.deliveries array.
47-
config.action_mailer.delivery_method = :test
48-
4942
# Print deprecation notices to the stderr.
5043
config.active_support.deprecation = :stderr
5144

0 commit comments

Comments
 (0)