Skip to content

Commit

Permalink
Technical/Update gem development dependencies
Browse files Browse the repository at this point in the history
* Refactored gem codebase
* Updated gem development dependencies
* Updated CircleCI config
* Updated codeclimate config
  • Loading branch information
bestwebua committed Aug 14, 2023
1 parent e36c009 commit 96bf3a8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defaults: &defaults
- image: cimg/ruby:<< parameters.ruby-version >>

orbs:
ruby: circleci/ruby@2.0.0
ruby: circleci/ruby@2.1.0

references:
bundle_install: &bundle_install
Expand Down
6 changes: 3 additions & 3 deletions .circleci/gemspecs/latest
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
spec.add_development_dependency 'reek', '~> 6.1', '>= 6.1.4'
spec.add_development_dependency 'rspec', '~> 3.12'
spec.add_development_dependency 'rubocop', '~> 1.54', '>= 1.54.2'
spec.add_development_dependency 'rubocop-performance', '~> 1.18'
spec.add_development_dependency 'rubocop-rspec', '~> 2.22'
spec.add_development_dependency 'rubocop', '~> 1.56'
spec.add_development_dependency 'rubocop-performance', '~> 1.19'
spec.add_development_dependency 'rubocop-rspec', '~> 2.23', '>= 2.23.2'
spec.add_development_dependency 'simplecov', '~> 0.22.0'
spec.add_development_dependency 'smtp_mock', '~> 1.3', '>= 1.3.4'
spec.add_development_dependency 'truemail-rspec', '~> 1.1'
Expand Down
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ checks:
plugins:
rubocop:
enabled: true
channel: rubocop-1-54
channel: rubocop-1-56
config:
file: .circleci/linter_configs/.rubocop.yml

Expand Down
2 changes: 1 addition & 1 deletion lib/truemail/validate/smtp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def success_response?

def not_includes_user_not_found_errors?
return false unless configuration.smtp_safe_check
result.smtp_debug.map(&:response).map(&:errors).all? do |errors|
result.smtp_debug.map { |request| request.response.errors }.all? do |errors|
next true unless errors.key?(:rcptto)
errors.slice(:rcptto).values.none? do |error|
configuration.smtp_error_body_pattern.match?(error)
Expand Down
9 changes: 3 additions & 6 deletions spec/truemail/validate/list_match_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@

context 'when email exists on both lists' do
specify do
allow(configuration_instance).to receive(:whitelisted_emails).and_return([email])
allow(configuration_instance).to receive(:blacklisted_emails).and_return([email])
allow(configuration_instance).to receive_messages(whitelisted_emails: [email], blacklisted_emails: [email])
expect { domain_list_match_validator }
.to change(result_instance, :success)
.from(nil).to(true)
Expand All @@ -84,8 +83,7 @@

context 'when email domain exists on both lists' do
specify do
allow(configuration_instance).to receive(:whitelisted_domains).and_return([domain])
allow(configuration_instance).to receive(:blacklisted_domains).and_return([domain])
allow(configuration_instance).to receive_messages(whitelisted_domains: [domain], blacklisted_domains: [domain])
expect { domain_list_match_validator }
.to change(result_instance, :success)
.from(nil).to(true)
Expand All @@ -96,8 +94,7 @@

context 'when email domain exists not on both lists' do
specify do
allow(configuration_instance).to receive(:whitelisted_domains).and_return([])
allow(configuration_instance).to receive(:blacklisted_domains).and_return([])
allow(configuration_instance).to receive_messages(whitelisted_domains: [], blacklisted_domains: [])
expect { domain_list_match_validator }
.to not_change(result_instance, :success)
.and change(result_instance, :domain)
Expand Down
3 changes: 1 addition & 2 deletions spec/truemail/validate/smtp/request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@

it 'rcptto smtp server error' do
allow(session).to receive(:start).with(verifier_domain).and_yield(session)
allow(session).to receive(:helo).and_return(true)
allow(session).to receive(:mailfrom).and_return(true)
allow(session).to receive_messages(helo: true, mailfrom: true)
allow(session).to receive(:rcptto).and_raise(::StandardError, error_message)

expect { response_instance_target_method }
Expand Down

0 comments on commit 96bf3a8

Please sign in to comment.