Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix travis-ci conf; add exception_notifier gem and sendgrid conf

  • Loading branch information...
commit 3d92c5d5f8534d53f1ba8a8517cd584bfe981c62 1 parent 572d9a9
@potomak authored
View
1  .travis.yml
@@ -1,4 +1,5 @@
language: ruby
+bundler_args: --without development
rvm:
- 1.9.2
- 1.9.3
View
10 Gemfile
@@ -69,9 +69,15 @@ gem 'kaminari'
# Gamification
gem 'merit'
-group :development, :test do
- gem 'heroku'
+# Notify exceptions
+gem 'exception_notification'
+
+group :test do
gem 'mocha'
+end
+
+group :development do
+ gem 'heroku'
# Virtual box provisioning with vagrant and librarian gems
gem 'vagrant'
View
3  Gemfile.lock
@@ -50,6 +50,8 @@ GEM
dalli (2.0.5)
erubis (2.7.0)
eventmachine (0.12.10)
+ exception_notification (2.6.1)
+ actionmailer (>= 3.0.4)
excon (0.14.0)
execjs (1.4.0)
multi_json (~> 1.0)
@@ -218,6 +220,7 @@ DEPENDENCIES
bson_ext
coffee-rails (~> 3.2.1)
dalli
+ exception_notification
heroku
jquery-rails
kaminari
View
5 config/environments/production.rb
@@ -57,4 +57,9 @@
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
+
+ config.middleware.use ExceptionNotifier,
+ :email_prefix => "[TomatoesApp] ",
+ :sender_address => %{"Exception Notifier" <exception@tomato.es>},
+ :exception_recipients => ENV['EXCEPTION_RECIPIENTS']
end
View
9 config/initializers/mail.rb
@@ -0,0 +1,9 @@
+ActionMailer::Base.smtp_settings = {
+ :address => 'smtp.sendgrid.net',
+ :port => '587',
+ :authentication => :plain,
+ :user_name => ENV['SENDGRID_USERNAME'],
+ :password => ENV['SENDGRID_PASSWORD'],
+ :domain => 'heroku.com'
+}
+ActionMailer::Base.delivery_method = :smtp
Please sign in to comment.
Something went wrong with that request. Please try again.