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

Add ActionMailer support #3

Merged
merged 2 commits into from
Aug 1, 2022
Merged

Add ActionMailer support #3

merged 2 commits into from
Aug 1, 2022

Conversation

r4do
Copy link
Member

@r4do r4do commented Jul 22, 2022

No description provided.

mailtrap.gemspec Outdated
@@ -19,6 +19,9 @@ Gem::Specification.new do |spec|
spec.metadata['changelog_uri'] = 'https://github.com/railsware/mailtrap-ruby/blob/main/CHANGELOG.md'
spec.metadata['rubygems_mfa_required'] = 'true'

spec.add_dependency 'mail'
spec.add_dependency 'net-smtp'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gem is needed as Ruby 3.1 doesn't have 'net/smtp' package included.
mikel/mail#1472

Or should we move this to regular Gemfile since we not require ActionMailer (thus are not using mail in runtime)?

module Sending
module Convert
class << self
def from_message(message) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we commit code with rubocop:disasble?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a good idea to liberate rubocop settings for the entire repo having in mind we are talking about a single method with disables.
Any ideas to simplify the code?

lib/mailtrap/sending/convert.rb Outdated Show resolved Hide resolved
@r4do r4do force-pushed the add-actionmailer-integration branch from 0e9e628 to 02512d9 Compare July 27, 2022 10:55
Copy link
Member

@leonid-shevtsov leonid-shevtsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, i have a couple cleanup suggestions, that's all

README.md Outdated Show resolved Hide resolved
lib/mailtrap/action_mailer/delivery_method.rb Outdated Show resolved Hide resolved
mailtrap.gemspec Outdated Show resolved Hide resolved
@r4do r4do merged commit 84b0867 into main Aug 1, 2022
@r4do r4do deleted the add-actionmailer-integration branch August 1, 2022 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants