summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-04-22 16:13:59 -0400
committerRobert Speicher <rspeicher@gmail.com>2016-04-22 16:13:59 -0400
commit702380f1aed9d20cc48d24164e4910613ec18703 (patch)
tree371d2fae333a4d282c5d6514dcc073d24166f64f
parent80893cad672361e62c0c05c2cf9262209bc54fd2 (diff)
downloadgitlab-ce-rs-letter_opener_web.tar.gz
Add letter_opener_web gemrs-letter_opener_web
Sent emails in the development environment will no longer automatically be opened in the browser. If a sent email needs to be viewed, it can be found at the `/rails/letter_opener` route.
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock8
-rw-r--r--config/environments/development.rb2
-rw-r--r--config/routes.rb10
4 files changed, 14 insertions, 8 deletions
diff --git a/Gemfile b/Gemfile
index 67cc3f34b8c..05cf0219166 100644
--- a/Gemfile
+++ b/Gemfile
@@ -243,7 +243,7 @@ group :development do
gem 'brakeman', '~> 3.2.0', require: false
gem "annotate", "~> 2.7.0"
- gem "letter_opener", '~> 1.1.2'
+ gem 'letter_opener_web', '~> 1.3.0'
gem 'quiet_assets', '~> 1.0.2'
gem 'rerun', '~> 0.11.0'
gem 'bullet', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index b00d7b35c84..1ac0b20bbaf 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -450,8 +450,12 @@ GEM
kgio (2.10.0)
launchy (2.4.3)
addressable (~> 2.3)
- letter_opener (1.1.2)
+ letter_opener (1.4.1)
launchy (~> 2.2)
+ letter_opener_web (1.3.0)
+ actionmailer (>= 3.2)
+ letter_opener (~> 1.0)
+ railties (>= 3.2)
licensee (8.0.0)
rugged (>= 0.24b)
listen (3.0.5)
@@ -958,7 +962,7 @@ DEPENDENCIES
jquery-turbolinks (~> 2.1.0)
jquery-ui-rails (~> 5.0.0)
kaminari (~> 0.16.3)
- letter_opener (~> 1.1.2)
+ letter_opener_web (~> 1.3.0)
licensee (~> 8.0.0)
loofah (~> 2.0.3)
mail_room (~> 0.6.1)
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 689694a3480..4f39016bfa4 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -36,7 +36,7 @@ Rails.application.configure do
# For having correct urls in mails
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
# Open sent mails in browser
- config.action_mailer.delivery_method = :letter_opener
+ config.action_mailer.delivery_method = :letter_opener_web
# Don't make a mess when bootstrapping a development environment
config.action_mailer.perform_deliveries = (ENV['BOOTSTRAP'] != '1')
diff --git a/config/routes.rb b/config/routes.rb
index 2f820aafed1..d664434e1a6 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -16,16 +16,18 @@ Rails.application.routes.draw do
end
end
- # Make the built-in Rails routes available in development, otherwise they'd
- # get swallowed by the `namespace/project` route matcher below.
- #
- # See https://git.io/va79N
if Rails.env.development?
+ # Make the built-in Rails routes available in development, otherwise they'd
+ # get swallowed by the `namespace/project` route matcher below.
+ #
+ # See https://git.io/va79N
get '/rails/mailers' => 'rails/mailers#index'
get '/rails/mailers/:path' => 'rails/mailers#preview'
get '/rails/info/properties' => 'rails/info#properties'
get '/rails/info/routes' => 'rails/info#routes'
get '/rails/info' => 'rails/info#index'
+
+ mount LetterOpenerWeb::Engine, at: '/rails/letter_opener'
end
namespace :ci do