Skip to content

Commit

Permalink
Technical/Lock latest dependencies within Ruby version (#206)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
bestwebua authored Feb 9, 2022
1 parent c36bd4a commit 72c0cf0
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 28 deletions.
20 changes: 14 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ~
Expand All @@ -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
Expand All @@ -57,6 +63,7 @@ jobs:
steps:
- checkout

- <<: *use_latest_gemspec
- <<: *restore_bundle_cache
- <<: *bundle_install
- <<: *save_bundle_cache
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .circleci/gemspec_compatible
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
54 changes: 54 additions & 0 deletions .circleci/gemspec_latest
Original file line number Diff line number Diff line change
@@ -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 = ['[email protected]']

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
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.1.0
ruby-2.5.0
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/truemail/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Truemail
VERSION = '2.6.4'
VERSION = '2.6.5'
end
37 changes: 18 additions & 19 deletions truemail.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 72c0cf0

Please sign in to comment.