From 72c0cf04d2bc8d8bb27534123354ad2b2107ab41 Mon Sep 17 00:00:00 2001 From: Vladislav Trotsenko Date: Wed, 9 Feb 2022 13:29:43 +0200 Subject: [PATCH] Technical/Lock latest dependencies within Ruby version (#206) * Added gemspec with latest dependencies * Removed dependencies version locks in truemail.gemspec * Updated compatible gemspec * Updated circleci config * Rollback ruby-version to minimal (2.5.0) * Updated gem version, changelog --- .circleci/config.yml | 20 +++++++++---- .circleci/gemspec_compatible | 2 +- .circleci/gemspec_latest | 54 ++++++++++++++++++++++++++++++++++++ .ruby-version | 2 +- CHANGELOG.md | 16 +++++++++++ lib/truemail/version.rb | 2 +- truemail.gemspec | 37 ++++++++++++------------ 7 files changed, 105 insertions(+), 28 deletions(-) create mode 100644 .circleci/gemspec_latest diff --git a/.circleci/config.yml b/.circleci/config.yml index b7d29da..3cc955b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,9 +27,9 @@ references: paths: - vendor/bundle - system_dependencies: &system_dependencies + install_system_dependencies: &install_system_dependencies run: - name: Installing system requirements + name: Installing system dependencies command: | bundle exec smtp_mock -s -i ~ @@ -40,9 +40,15 @@ references: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter chmod +x ./cc-test-reporter + use_latest_gemspec: &use_latest_gemspec + run: + name: Using latest gemspec + command: | + cp .circleci/gemspec_latest truemail.gemspec + use_compatible_gemspec: &use_compatible_gemspec run: - name: Use compatible gemspec + name: Using compatible gemspec command: | cp .circleci/gemspec_compatible truemail.gemspec @@ -57,6 +63,7 @@ jobs: steps: - checkout + - <<: *use_latest_gemspec - <<: *restore_bundle_cache - <<: *bundle_install - <<: *save_bundle_cache @@ -77,10 +84,11 @@ jobs: steps: - checkout + - <<: *use_latest_gemspec - <<: *restore_bundle_cache - <<: *bundle_install - <<: *save_bundle_cache - - <<: *system_dependencies + - <<: *install_system_dependencies - <<: *install_codeclimate_reporter - run: @@ -114,10 +122,10 @@ jobs: - checkout - <<: *use_compatible_gemspec - ruby/install-deps: - bundler-version: "2.3.5" + bundler-version: "2.3.6" with-cache: false path: './vendor/custom_bundle' - - <<: *system_dependencies + - <<: *install_system_dependencies - run: name: Running compatibility tests command: bundle exec rspec diff --git a/.circleci/gemspec_compatible b/.circleci/gemspec_compatible index b500a1e..a298d8a 100644 --- a/.circleci/gemspec_compatible +++ b/.circleci/gemspec_compatible @@ -24,7 +24,7 @@ Gem::Specification.new do |spec| 'bug_tracker_uri' => 'https://github.com/truemail-rb/truemail/issues' } - spec.required_ruby_version = '>= 2.5.0' + spec.required_ruby_version = ['>= 2.5.0', '< 3.1.0'] spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } spec.bindir = 'exe' diff --git a/.circleci/gemspec_latest b/.circleci/gemspec_latest new file mode 100644 index 0000000..edbef8a --- /dev/null +++ b/.circleci/gemspec_latest @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +lib = File.expand_path('lib', __dir__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'truemail/version' + +Gem::Specification.new do |spec| + spec.name = 'truemail' + spec.version = Truemail::VERSION + spec.authors = ['Vladislav Trotsenko'] + spec.email = ['admin@bestweb.com.ua'] + + spec.summary = %(truemail) + spec.description = %(Configurable framework agnostic plain Ruby email validator. Verify email via Regex, DNS, SMTP and even more.) + + spec.homepage = 'https://github.com/truemail-rb/truemail' + spec.license = 'MIT' + + spec.metadata = { + 'homepage_uri' => 'https://truemail-rb.org', + 'changelog_uri' => 'https://github.com/truemail-rb/truemail/blob/master/CHANGELOG.md', + 'source_code_uri' => 'https://github.com/truemail-rb/truemail', + 'documentation_uri' => 'https://truemail-rb.org/truemail-gem', + 'bug_tracker_uri' => 'https://github.com/truemail-rb/truemail/issues' + } + + spec.required_ruby_version = '>= 2.5.0' + + spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + spec.bindir = 'exe' + spec.executables = spec.files.grep(%r{^exe/}) { |f| ::File.basename(f) } + spec.require_paths = ['lib'] + + spec.add_runtime_dependency 'net-smtp', '~> 0.3.1' + spec.add_runtime_dependency 'simpleidn', '~> 0.2.1' + + spec.add_development_dependency 'bundler-audit', '~> 0.9.0.1' + spec.add_development_dependency 'dns_mock', '~> 1.5', '>= 1.5.1' + spec.add_development_dependency 'fasterer', '~> 0.9.0' + spec.add_development_dependency 'ffaker', '~> 2.20' + spec.add_development_dependency 'json_matchers', '~> 0.11.1' + spec.add_development_dependency 'overcommit', '~> 0.58.0' + spec.add_development_dependency 'pry-byebug', '~> 3.9' + spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6' + spec.add_development_dependency 'reek', '~> 6.1' + spec.add_development_dependency 'rspec', '~> 3.10' + spec.add_development_dependency 'rubocop', '~> 1.25', '>= 1.25.1' + spec.add_development_dependency 'rubocop-performance', '~> 1.13', '>= 1.13.2' + spec.add_development_dependency 'rubocop-rspec', '~> 2.8' + spec.add_development_dependency 'simplecov', '~> 0.21.2' + spec.add_development_dependency 'smtp_mock', '~> 1.0' + spec.add_development_dependency 'truemail-rspec', '~> 0.7.0' + spec.add_development_dependency 'webmock', '~> 3.14' +end diff --git a/.ruby-version b/.ruby-version index 872e120..bf080da 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.1.0 +ruby-2.5.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index b794d98..e10d2d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.6.5] - 2022.02.09 + +### Added + +- Added gemspec with latest dependencies for lates Ruby env + +### Updated + +- Updated default gemspec, ruby-version +- Updated CircleCI Ruby env flow +- Updated gem version + +### Fixed + +- Fixed redefining builtin implementations caused using stdlib as external dependencies + ## [2.6.4] - 2022.02.09 ### Fixed diff --git a/lib/truemail/version.rb b/lib/truemail/version.rb index 98c9ede..ca6cdea 100644 --- a/lib/truemail/version.rb +++ b/lib/truemail/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Truemail - VERSION = '2.6.4' + VERSION = '2.6.5' end diff --git a/truemail.gemspec b/truemail.gemspec index 1062e16..2fb794f 100644 --- a/truemail.gemspec +++ b/truemail.gemspec @@ -31,24 +31,23 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| ::File.basename(f) } spec.require_paths = ['lib'] - spec.add_runtime_dependency 'net-smtp', '~> 0.3' if ::RUBY_VERSION >= '3.1.0' spec.add_runtime_dependency 'simpleidn', '~> 0.2.1' - - spec.add_development_dependency 'bundler-audit', '~> 0.9.0.1' - spec.add_development_dependency 'dns_mock', '~> 1.5', '>= 1.5.1' - spec.add_development_dependency 'fasterer', '~> 0.9.0' - spec.add_development_dependency 'ffaker', '~> 2.20' - spec.add_development_dependency 'json_matchers', '~> 0.11.1' - spec.add_development_dependency 'overcommit', '~> 0.58.0' - spec.add_development_dependency 'pry-byebug', '~> 3.9' - spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6' - spec.add_development_dependency 'reek', '~> 6.1' - spec.add_development_dependency 'rspec', '~> 3.10' - spec.add_development_dependency 'rubocop', '~> 1.25', '>= 1.25.1' - spec.add_development_dependency 'rubocop-performance', '~> 1.13', '>= 1.13.2' - spec.add_development_dependency 'rubocop-rspec', '~> 2.8' - spec.add_development_dependency 'simplecov', '~> 0.21.2' - spec.add_development_dependency 'smtp_mock', '~> 1.0' - spec.add_development_dependency 'truemail-rspec', '~> 0.7.0' - spec.add_development_dependency 'webmock', '~> 3.14' + spec.add_runtime_dependency 'net-smtp', '~> 0.3.1' if ::RUBY_VERSION >= '3.1.0' + + spec.add_development_dependency 'bundler-audit' + spec.add_development_dependency 'dns_mock' + spec.add_development_dependency 'fasterer' + spec.add_development_dependency 'ffaker' + spec.add_development_dependency 'json_matchers' + spec.add_development_dependency 'overcommit' + spec.add_development_dependency 'pry-byebug' + spec.add_development_dependency 'rake' + spec.add_development_dependency 'reek' + spec.add_development_dependency 'rspec' + spec.add_development_dependency 'rubocop' + spec.add_development_dependency 'rubocop-performance' + spec.add_development_dependency 'rubocop-rspec' + spec.add_development_dependency 'smtp_mock' + spec.add_development_dependency 'truemail-rspec' + spec.add_development_dependency 'webmock' end