-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Technical/Update gem development dependencies (#154)
* Updated gem development dependencies * Updated simplecov/CircleCi config * Fix coverage issues, refactor tests * Updated gem version, changelog, documentation
- Loading branch information
Showing
19 changed files
with
175 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,19 @@ version: 2.1 | |
defaults: &defaults | ||
working_directory: ~/truemail | ||
docker: | ||
- image: circleci/ruby:2.5.0-node | ||
- image: cimg/ruby:<< parameters.ruby-version >> | ||
environment: | ||
CC_TEST_REPORTER_ID: 693272a1328521f6f7c09d7ffd419b21c00410da26e98e94c687fdd38b26e2cb | ||
|
||
orbs: | ||
ruby: circleci/[email protected].2 | ||
ruby: circleci/[email protected].3 | ||
|
||
references: | ||
install_bundler: &install_bundler | ||
run: | ||
name: Installing Bundler | ||
command: gem i bundler -v $(tail -1 Gemfile.lock | tr -d ' ') | ||
|
||
restore_bundle_cache: &restore_bundle_cache | ||
restore_cache: | ||
keys: | ||
|
@@ -29,63 +34,71 @@ references: | |
|
||
install_codeclimate_reporter: &install_codeclimate_reporter | ||
run: | ||
name: Install Code Climate Test Reporter | ||
name: Installing CodeClimate test reporter | ||
command: | | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
jobs: | ||
linters: | ||
linters-ruby: | ||
parameters: | ||
ruby-version: | ||
type: string | ||
|
||
<<: *defaults | ||
|
||
steps: | ||
- checkout | ||
|
||
- <<: *install_bundler | ||
- <<: *restore_bundle_cache | ||
- <<: *bundle_install | ||
- <<: *save_bundle_cache | ||
|
||
- run: | ||
name: Running overcommit | ||
name: Running Overcommit | ||
command: | | ||
bundle exec overcommit -s | ||
SKIP=AuthorEmail,AuthorName bundle exec overcommit -r | ||
tests: | ||
tests-ruby: | ||
parameters: | ||
ruby-version: | ||
type: string | ||
|
||
<<: *defaults | ||
|
||
steps: | ||
- checkout | ||
|
||
- <<: *install_bundler | ||
- <<: *restore_bundle_cache | ||
- <<: *bundle_install | ||
- <<: *save_bundle_cache | ||
- <<: *install_codeclimate_reporter | ||
|
||
- run: | ||
name: Running tests | ||
name: Running RSpec | ||
command: | | ||
mkdir /tmp/test-results | ||
./cc-test-reporter before-build | ||
bundle exec rspec | ||
- run: | ||
name: Code Climate Test Coverage | ||
name: Creating CodeClimate test coverage report | ||
command: | | ||
./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json" | ||
- store_test_results: | ||
path: /tmp/test-results | ||
|
||
- store_artifacts: | ||
path: /tmp/test-results | ||
destination: test-results | ||
name: Saving Simplecov coverage artifacts | ||
path: ~/truemail/coverage | ||
destination: coverage | ||
|
||
- deploy: | ||
name: Uploading CodeClimate test coverage report | ||
command: | | ||
./cc-test-reporter sum-coverage --output - --parts $CIRCLE_NODE_TOTAL coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --debug --input - | ||
compatibility-with-ruby: | ||
compatibility-ruby: | ||
parameters: | ||
ruby-version: | ||
type: string | ||
|
@@ -94,7 +107,6 @@ jobs: | |
steps: | ||
- checkout | ||
- ruby/install-deps: | ||
bundler-version: '1.16.6' | ||
with-cache: false | ||
path: './vendor/custom_bundle' | ||
- run: | ||
|
@@ -104,9 +116,15 @@ jobs: | |
workflows: | ||
build_and_test: | ||
jobs: | ||
- linters | ||
- tests | ||
- compatibility-with-ruby: | ||
- linters-ruby: | ||
matrix: | ||
parameters: | ||
ruby-version: ["2.5"] | ||
- tests-ruby: | ||
matrix: | ||
parameters: | ||
ruby-version: ["2.5"] | ||
- compatibility-ruby: | ||
matrix: | ||
parameters: | ||
ruby-version: ["2.6", "2.7", "3.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,11 +178,12 @@ Truemail.configure do |config| | |
|
||
# Optional parameter. You can predefine default validation type for | ||
# Truemail.validate('[email protected]') call without with-parameter | ||
# Available validation types: :regex, :mx, :smtp | ||
# Available validation types: :regex, :mx, :mx_blacklist, :smtp | ||
config.default_validation_type = :mx | ||
|
||
# Optional parameter. You can predefine which type of validation will be used for domains. | ||
# Also you can skip validation by domain. Available validation types: :regex, :mx, :smtp | ||
# Also you can skip validation by domain. | ||
# Available validation types: :regex, :mx, :mx_blacklist, :smtp | ||
# This configuration will be used over current or default validation type parameter | ||
# All of validations for 'somedomain.com' will be processed with regex validation only. | ||
# And all of validations for 'otherdomain.com' will be processed with mx validation only. | ||
|
@@ -222,7 +223,7 @@ Truemail.configure do |config| | |
config.not_rfc_mx_lookup_flow = true | ||
|
||
# Optional parameter. This option will provide to use smtp fail fast behaviour. When | ||
# smtp_fail_fast = true it means that truemail ends smtp validation session after first | ||
# smtp_fail_fast = true it means that Truemail ends smtp validation session after first | ||
# attempt on the first mx server in any fail cases (network connection/timeout error, | ||
# smtp validation error). This feature helps to reduce total time of SMTP validation | ||
# session up to 1 second. By default this option is disabled. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Truemail | ||
VERSION = '2.4.1' | ||
VERSION = '2.4.2' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'simplecov' | ||
if ::RUBY_VERSION[/\A2\.5.+\z/] | ||
require 'simplecov' | ||
|
||
SimpleCov.start | ||
SimpleCov.minimum_coverage(100) | ||
SimpleCov.start { add_filter(%r{\A/spec/}) } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.