diff options
author | Dino Maric <dino.onex@gmail.com> | 2018-12-14 11:06:12 +0100 |
---|---|---|
committer | Dino Maric <dino.onex@gmail.com> | 2018-12-14 11:06:12 +0100 |
commit | 4412ca6dac7dce284e2010678f7f2e276d60e4d1 (patch) | |
tree | ef47c14cd5164aa74ec0ffea4a4a553dd1e32ab4 /app | |
parent | af7d237002aca9667f28923f7181db7cb5e51460 (diff) | |
download | rails-4412ca6dac7dce284e2010678f7f2e276d60e4d1.tar.gz rails-4412ca6dac7dce284e2010678f7f2e276d60e4d1.tar.bz2 rails-4412ca6dac7dce284e2010678f7f2e276d60e4d1.zip |
Add frozen_string_literal: true to match Rails codebase
Diffstat (limited to 'app')
16 files changed, 32 insertions, 0 deletions
diff --git a/app/controllers/action_mailbox/base_controller.rb b/app/controllers/action_mailbox/base_controller.rb index b73f5b7708..f8764a8240 100644 --- a/app/controllers/action_mailbox/base_controller.rb +++ b/app/controllers/action_mailbox/base_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # The base class for all Active Mailbox ingress controllers. class ActionMailbox::BaseController < ActionController::Base skip_forgery_protection diff --git a/app/controllers/action_mailbox/ingresses/amazon/inbound_emails_controller.rb b/app/controllers/action_mailbox/ingresses/amazon/inbound_emails_controller.rb index 0c04170eae..2a8ec375c7 100644 --- a/app/controllers/action_mailbox/ingresses/amazon/inbound_emails_controller.rb +++ b/app/controllers/action_mailbox/ingresses/amazon/inbound_emails_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Ingests inbound emails from Amazon's Simple Email Service (SES). # # Requires the full RFC 822 message in the +content+ parameter. Authenticates requests by validating their signatures. diff --git a/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb b/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb index 7583e25f26..225bcc5565 100644 --- a/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb +++ b/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Ingests inbound emails from Mailgun. Requires the following parameters: # # - +body-mime+: The full RFC 822 message diff --git a/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb b/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb index 8be27009d2..5a85e6b7f0 100644 --- a/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb +++ b/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Ingests inbound emails from Mandrill. # # Requires a +mandrill_events+ parameter containing a JSON array of Mandrill inbound email event objects. diff --git a/app/controllers/action_mailbox/ingresses/postfix/inbound_emails_controller.rb b/app/controllers/action_mailbox/ingresses/postfix/inbound_emails_controller.rb index ba04effd1f..a3b794c65b 100644 --- a/app/controllers/action_mailbox/ingresses/postfix/inbound_emails_controller.rb +++ b/app/controllers/action_mailbox/ingresses/postfix/inbound_emails_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Ingests inbound emails relayed from Postfix. # # Authenticates requests using HTTP basic access authentication. The username is always +actionmailbox+, and the diff --git a/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller.rb b/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller.rb index 8e1d781c2c..c48abae66c 100644 --- a/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller.rb +++ b/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Ingests inbound emails from SendGrid. Requires an +email+ parameter containing a full RFC 822 message. # # Authenticates requests using HTTP basic access authentication. The username is always +actionmailbox+, and the diff --git a/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb b/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb index 9804f6ec5b..eb96d88691 100644 --- a/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb +++ b/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Rails::Conductor::ActionMailbox::InboundEmailsController < Rails::Conductor::BaseController def index @inbound_emails = ActionMailbox::InboundEmail.order(created_at: :desc) diff --git a/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb b/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb index 6191bda5e5..c53203049b 100644 --- a/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb +++ b/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Rerouting will run routing and processing on an email that has already been, or attempted to be, processed. class Rails::Conductor::ActionMailbox::ReroutesController < Rails::Conductor::BaseController def create diff --git a/app/controllers/rails/conductor/base_controller.rb b/app/controllers/rails/conductor/base_controller.rb index cfa0b84963..c95a7f3b93 100644 --- a/app/controllers/rails/conductor/base_controller.rb +++ b/app/controllers/rails/conductor/base_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # TODO: Move this to Rails::Conductor gem class Rails::Conductor::BaseController < ActionController::Base layout "rails/conductor" diff --git a/app/jobs/action_mailbox/incineration_job.rb b/app/jobs/action_mailbox/incineration_job.rb index 3c6c9aae4f..27dd9b151f 100644 --- a/app/jobs/action_mailbox/incineration_job.rb +++ b/app/jobs/action_mailbox/incineration_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # You can configure when this `IncinerationJob` will be run as a time-after-processing using the # `config.action_mailbox.incinerate_after` or `ActionMailbox.incinerate_after` setting. # diff --git a/app/jobs/action_mailbox/routing_job.rb b/app/jobs/action_mailbox/routing_job.rb index c345227617..fc3388daff 100644 --- a/app/jobs/action_mailbox/routing_job.rb +++ b/app/jobs/action_mailbox/routing_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Routing a new InboundEmail is an asynchronous operation, which allows the ingress controllers to quickly # accept new incoming emails without being burdened to hang while they're actually being processed. class ActionMailbox::RoutingJob < ActiveJob::Base diff --git a/app/models/action_mailbox/inbound_email.rb b/app/models/action_mailbox/inbound_email.rb index 156e2d4dbc..d815941922 100644 --- a/app/models/action_mailbox/inbound_email.rb +++ b/app/models/action_mailbox/inbound_email.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "mail" # The `InboundEmail` is an Active Record that keeps a reference to the raw email stored in Active Storage diff --git a/app/models/action_mailbox/inbound_email/incineratable.rb b/app/models/action_mailbox/inbound_email/incineratable.rb index a049b88b69..fb2461cf50 100644 --- a/app/models/action_mailbox/inbound_email/incineratable.rb +++ b/app/models/action_mailbox/inbound_email/incineratable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Ensure that the `InboundEmail` is automatically scheduled for later incineration if the status has been # changed to `processed`. The later incineration will be invoked at the time specified by the # `ActionMailbox.incinerate_after` time using the `IncinerationJob`. diff --git a/app/models/action_mailbox/inbound_email/incineratable/incineration.rb b/app/models/action_mailbox/inbound_email/incineratable/incineration.rb index 50861bc64b..c4aaaa25a9 100644 --- a/app/models/action_mailbox/inbound_email/incineratable/incineration.rb +++ b/app/models/action_mailbox/inbound_email/incineratable/incineration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Command class for carrying out the actual incineration of the `InboundMail` that's been scheduled # for removal. Before the incineration – which really is just a call to `#destroy!` – is run, we verify # that it's both eligible (by virtue of having already been processed) and time to do so (that is, diff --git a/app/models/action_mailbox/inbound_email/message_id.rb b/app/models/action_mailbox/inbound_email/message_id.rb index dc17e48e74..4807a2a293 100644 --- a/app/models/action_mailbox/inbound_email/message_id.rb +++ b/app/models/action_mailbox/inbound_email/message_id.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # The `Message-ID` as specified by rfc822 is supposed to be a unique identifier for that individual email. # That makes it an ideal tracking token for debugging and forensics, just like `X-Request-Id` does for # web request. diff --git a/app/models/action_mailbox/inbound_email/routable.rb b/app/models/action_mailbox/inbound_email/routable.rb index f042fa4f57..58d67eb20c 100644 --- a/app/models/action_mailbox/inbound_email/routable.rb +++ b/app/models/action_mailbox/inbound_email/routable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # A newly received `InboundEmail` will not be routed synchronously as part of ingress controller's receival. # Instead, the routing will be done asynchronously, using a `RoutingJob`, to ensure maximum parallel capacity. # |