From 849f2b6634074d32ab35e4537f9f2852d5052e80 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Tue, 18 Dec 2018 22:11:22 +0100 Subject: Resurrect installer. Running `./bin/rails generate mailbox application --no-test-framework` generates: ``` class ApplicationMailbox < ApplicationMailbox def process end end ``` which is not correct for the application mailbox. It shouldn't respond to process but it should contain a routing hint. Generally generators aren't meant to be used like the previous commit. The mailbox generator can certainly add in the ApplicationMailbox if missing, but it shouldn't be called with "application" as an argument. Also adds back auto inserting an `ingress` config line in `config/environmnets/production.rb`. Fixes #13. [Kasper Timm Hansen, Andrew Babichev] --- lib/rails/generators/installer.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lib/rails/generators/installer.rb (limited to 'lib/rails') diff --git a/lib/rails/generators/installer.rb b/lib/rails/generators/installer.rb new file mode 100644 index 0000000000..a2bc4b5412 --- /dev/null +++ b/lib/rails/generators/installer.rb @@ -0,0 +1,8 @@ +say "Copying application_mailbox.rb to app/mailboxes" +copy_file "#{__dir__}/mailbox/templates/application_mailbox.rb", "app/mailboxes/application_mailbox.rb" + +environment <<~end_of_config, env: 'production' + # Prepare the ingress controller used to receive mail + # config.action_mailbox.ingress = :amazon + +end_of_config -- cgit v1.2.3