Merge pull request #2761 from tchak/letter_opener_web

Use letter opener
This commit is contained in:
gregoirenovel 2018-10-04 18:39:43 +02:00 committed by GitHub
commit 7c2eb362c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 14 deletions

View file

@ -164,6 +164,7 @@ group :development do
gem 'rubocop-rspec-focused', require: false
gem 'haml-lint'
gem 'scss_lint', require: false
gem 'letter_opener_web'
end
group :development, :test do

View file

@ -459,6 +459,12 @@ GEM
leaflet-markercluster-rails (0.7.0)
railties (>= 3.1)
leaflet-rails (0.7.7)
letter_opener (1.6.0)
launchy (~> 2.2)
letter_opener_web (1.3.4)
actionmailer (>= 3.2)
letter_opener (~> 1.0)
railties (>= 3.2)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
@ -855,6 +861,7 @@ DEPENDENCIES
leaflet-draw-rails
leaflet-markercluster-rails (~> 0.7.0)
leaflet-rails
letter_opener_web
lograge
logstash-event
mailjet
@ -906,4 +913,4 @@ DEPENDENCIES
zxcvbn-ruby
BUNDLED WITH
1.16.4
1.16.5

View file

@ -1,3 +1,2 @@
server: bin/rails server
jobs: bin/delayed_job run
mails: mailcatcher -f

View file

@ -13,9 +13,6 @@ chdir APP_ROOT do
# This script is a starting point to setup your application.
# Add necessary setup steps to this file.
puts '== Installing global tools =='
system! 'gem install mailcatcher --conservative'
puts "\n== Installing dependencies =="
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')

View file

@ -45,17 +45,11 @@ Rails.application.configure do
config.assets.raise_runtime_errors = true
# Action Mailer settings
config.action_mailer.delivery_method = :smtp
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
# Config for mailcatcher https://mailcatcher.me/
config.action_mailer.smtp_settings = {
address: 'localhost',
port: 1025,
locale: 'fr'
}
config.action_mailer.delivery_method = :letter_opener_web
Rails.application.routes.default_url_options = {
host: 'localhost:3000'
host: 'localhost',
port: 3000
}
# Raises error for missing translations

View file

@ -45,6 +45,14 @@ Rails.application.routes.draw do
root to: "administrateurs#index"
end
#
# Letter Opener
#
if Rails.env.development?
mount LetterOpenerWeb::Engine, at: "/letter_opener"
end
#
# Monitoring
#