aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/request_controller.rb2
-rw-r--r--app/models/info_request.rb2
-rwxr-xr-xscript/mailin2
-rw-r--r--spec/models/info_request_spec.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 441ddc417..81dffaa80 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -19,7 +19,7 @@ class RequestController < ApplicationController
include RequestControllerCustomStates
@@custom_states_loaded = true
end
- rescue NameError
+ rescue MissingSourceFile
end
def show
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index db576b33d..e6a520fd2 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -112,7 +112,7 @@ class InfoRequest < ActiveRecord::Base
include InfoRequestCustomStates
@@custom_states_loaded = true
end
- rescue NameError
+ rescue MissingSourceFile
end
# only check on create, so existing models with mixed case are allowed
diff --git a/script/mailin b/script/mailin
index 738034c26..733eaff3d 100755
--- a/script/mailin
+++ b/script/mailin
@@ -22,7 +22,7 @@ then
# send error to administators (use mutt for MIME encoding)
SUBJ="Mail import error for $OPTION_DOMAIN"
BODY="There was an error code $ERROR_CODE returned by the RequestMailer.receive command in script/mailin. See attached for details. This might be quite serious, such as the database was down, or might be an email with corrupt headers that Rails is choking on. The email was returned with an exit code 75, which for Exim at least means the MTA will try again later. A well configured installation of this code will separately have had Exim make a backup copy of the email in a separate mailbox, just in case."
- echo "$BODY" | /usr/bin/mutt -s "$SUBJ" -a $OUTPUT -a $INPUT $OPTION_CONTACT_EMAIL
+ echo "$BODY" | /usr/bin/mutt -s "$SUBJ" -a $OUTPUT $INPUT -- $OPTION_CONTACT_EMAIL
# tell exim error was temporary, so try again later (no point bouncing message to authority)
rm -f $OUTPUT
diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb
index 549296149..d0b0e0e32 100644
--- a/spec/models/info_request_spec.rb
+++ b/spec/models/info_request_spec.rb
@@ -40,7 +40,7 @@ describe InfoRequest do
describe " when emailing" do
- fixtures :info_requests, :info_request_events, :public_bodies, :public_body_translations, :users, :comments
+ fixtures :info_requests, :info_request_events, :outgoing_messages, :public_bodies, :public_body_translations, :users, :comments
before do
@info_request = info_requests(:fancy_dog_request)