Skip to content

Commit

Permalink
Use letter_opener instead of mailcatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
littleforest committed Sep 14, 2020
1 parent e65a2dd commit e0634f9
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 27 deletions.
4 changes: 0 additions & 4 deletions DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ $ docker-compose exec database psql -h database -Upostgres casa_development
$ docker-compose exec web rails c
```

## Mailcatcher
We use [Mailcatcher](https://mailcatcher.me/) to receive mail in development.
All mail sent in the development environment can be viewed at http://localhost:1080.

## Testing Suite
Run the testing suite from within the container:

Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ Bullet points `formatted like this` are commands you can run on your machine
- If you're on Ubuntu/WSL, use `sudo apt-get install libpq-dev` so the gem can install. [Use the Postgres repo for Ubuntu or WSL to get the server and client tools](https://www.postgresql.org/download/linux/ubuntu/).
- If you're using Docker, do what you need to do.

**Mailcatcher**

1. Install the [Mailcatcher](https://mailcatcher.me) gem: `gem install mailcatcher`
2. Start mailcatcher on the command line: `mailcatcher`
3. All mail sent in development can be viewed at http://localhost:1080

**Chromedriver**

1. Install the current stable release of [chromedriver](https://chromedriver.chromium.org/) for your operating system so the browser-based Ruby feature/integration tests can run. Installing `chromium-browser` is enough, even in WSL.
Expand Down
1 change: 0 additions & 1 deletion config/docker.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
DOCKER=true
DATABASE_HOST=database
MAILCATCHER_HOST=mailcatcher

POSTGRES_USER=postgres
POSTGRES_HOST_AUTH_METHOD=trust
11 changes: 1 addition & 10 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.

config.action_mailer.default_url_options = {host: "localhost", port: 3000} # for devise authentication

config.action_mailer.raise_delivery_errors = false
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: ENV["MAILCATCHER_HOST"] || "127.0.0.1",
port: 1025,
domain: "127.0.0.1"
}

# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
Expand Down Expand Up @@ -46,6 +36,7 @@
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = false
config.action_mailer.perform_caching = false
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }

# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
Expand Down
6 changes: 0 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ services:
ports:
- '5435:5432'

mailcatcher:
image: schickling/mailcatcher:latest
ports:
- '1080:1080'
- '1025:1025'

selenium_chrome:
image: selenium/standalone-chrome-debug
logging:
Expand Down

0 comments on commit e0634f9

Please sign in to comment.