Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Setup] Configura MailCatcher e Procfile.dev #221

Merged
merged 3 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
web: env RUBY_DEBUG_OPEN=true bin/rails server
js: yarn build --watch
css: yarn watch:css
job: bundle exec rake solid_queue:start
eliseuramos93 marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ O Portfoliorrr é uma rede social com funcionalidades de portfólio para pessoas

- [Informações técnicas](https://github.com/TreinaDev/td11-portfoliorrr?tab=readme-ov-file#informa%C3%A7%C3%B5es-t%C3%A9cnicas)
- [Como configurar a aplicação](https://github.com/TreinaDev/td11-portfoliorrr?tab=readme-ov-file#como-configurar-a-aplica%C3%A7%C3%A3o)
- [Ver emails enviados em ambiente de desenvolvimento](https://github.com/TreinaDev/td11-portfoliorrr?tab=readme-ov-file#ver-emails-enviados-em-ambiente-de-desenvolvimento)
- [Como visualizar a aplicação no navegador](https://github.com/TreinaDev/td11-portfoliorrr?tab=readme-ov-file#como-visualizar-a-aplica%C3%A7%C3%A3o-no-navegador)
- [Documentação da API](https://github.com/TreinaDev/td11-portfoliorrr?tab=readme-ov-file#documenta%C3%A7%C3%A3o-da-api)

Expand All @@ -27,6 +28,19 @@ O Portfoliorrr é uma rede social com funcionalidades de portfólio para pessoas
- Rode o comando `bin/dev`;
- Acesse a aplicação através do endereço `http://localhost:4000/`

## Ver emails enviados em ambiente de desenvolvimento

- Siga as instruções de configuração da aplicação;
- Instale localmente a gem `mailcatcher` executando o comando abaixo:
```shell
gem install mailcatcher
```
- Execute o comando abaixo para iniciar o `mailcatcher`
```shell
mailcatcher
```
- Acesse o MailCatcher através do endereço `http://localhost:1080`. Todos e-mails enviados serão mostrados nessa página, que emula uma caixa de entrada.

## Como rodar os testes da aplicação

- Siga as instruções de configuração da aplicação
Expand Down
6 changes: 4 additions & 2 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@
config.active_storage.service = :local

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false

config.action_mailer.perform_caching = false
config.action_mailer.default_url_options = { host: 'localhost', port: 4000 }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { :address => '127.0.0.1', :port => 1025 }
config.action_mailer.raise_delivery_errors = false

# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
Expand Down Expand Up @@ -75,7 +78,6 @@
# Raise error when a before_action's only/except options reference missing actions
config.action_controller.raise_on_missing_callback_actions = true

config.action_mailer.default_url_options = { host: 'localhost', port: 4000 }

# Use a real queuing backend for Active Job (and separate queues per environment).
config.active_job.queue_adapter = :solid_queue
Expand Down
Loading