Skip to content

Commit

Permalink
Technical/Update gem development dependencies (#34)
Browse files Browse the repository at this point in the history
* Updated default test environment to Ruby 3.1
* Updated gem development dependencies
* Changed faker to ffaker dependency
* Updated rubocop/codeclimate/simplecov/circleci configs
* Updated gem version, changelog
  • Loading branch information
bestwebua authored Jan 26, 2022
1 parent 7472da6 commit 7355c16
Show file tree
Hide file tree
Showing 17 changed files with 91 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ workflows:
- linters-ruby:
matrix:
parameters:
ruby-version: ["3.0"]
ruby-version: ["3.1"]
- tests-ruby:
matrix:
parameters:
ruby-version: ["3.0"]
ruby-version: ["3.1"]
- compatibility-ruby:
matrix:
parameters:
ruby-version: ["2.5", "2.6", "2.7"]
ruby-version: ["2.5", "2.6", "2.7", "3.0"]
6 changes: 3 additions & 3 deletions .circleci/gemspec_compatible
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
lib = ::File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'truemail/client/version'

Expand Down Expand Up @@ -28,10 +28,10 @@ Gem::Specification.new do |spec|

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.executables = spec.files.grep(%r{^exe/}) { |f| ::File.basename(f) }
spec.require_paths = ['lib']

spec.add_development_dependency 'faker', '~> 2.19'
spec.add_development_dependency 'ffaker', '~> 2.20'
spec.add_development_dependency 'json_matchers', '~> 0.11.1'
spec.add_development_dependency 'pry-byebug', '~> 3.9'
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
Expand Down
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ checks:
plugins:
rubocop:
enabled: true
channel: rubocop-1-21
channel: rubocop-1-25

reek:
enabled: true
53 changes: 52 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Naming/RescuedExceptionsVariableName:
Naming/InclusiveLanguage:
Enabled: false

Naming/BlockForwarding:
Enabled: true

Style/Documentation:
Enabled: false

Expand Down Expand Up @@ -150,6 +153,27 @@ Style/QuotedSymbols:
Style/RedundantSelfAssignmentBranch:
Enabled: true

Style/FileRead:
Enabled: true

Style/FileWrite:
Enabled: true

Style/MapToHash:
Enabled: true

Style/NumberedParameters:
Enabled: true

Style/NumberedParametersLimit:
Enabled: true

Style/OpenStructUse:
Enabled: true

Style/SelectByRegexp:
Enabled: true

Layout/LineLength:
Max: 140

Expand Down Expand Up @@ -268,6 +292,21 @@ Lint/AmbiguousRange:
Lint/IncompatibleIoSelectWithFiberScheduler:
Enabled: true

Lint/RequireRelativeSelfPath:
Enabled: true

Lint/UselessRuby2Keywords:
Enabled: true

Gemspec/DateAssignment:
Enabled: true

Gemspec/RequireMFA:
Enabled: false

Security/IoMethods:
Enabled: true

Performance/AncestorsInclude:
Enabled: true

Expand Down Expand Up @@ -316,7 +355,10 @@ Performance/RedundantSplitRegexpArgument:
Performance/Sum:
Enabled: true

Gemspec/DateAssignment:
Performance/ConcurrentMonotonicTime:
Enabled: true

Performance/StringIdentifierArgument:
Enabled: true

RSpec/ExampleLength:
Expand Down Expand Up @@ -354,3 +396,12 @@ RSpec/IdenticalEqualityAssertion:

RSpec/Rails/AvoidSetupHook:
Enabled: true

RSpec/ExcessiveDocstringSpacing:
Enabled: true

RSpec/SubjectDeclaration:
Enabled: true

RSpec/FactoryBot/SyntaxMethods:
Enabled: true
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.0.0
ruby-3.1.0
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

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).

## [0.4.0] - 2022-01-26

### Changed

- Updated default test environment to Ruby 3.1
- Updated gem development dependencies
- Changed faker to ffaker dependency
- Updated rubocop/codeclimate/simplecov/circleci configs
- Updated gem version

## [0.3.4] - 2021-09-16

### Changed
Expand Down
2 changes: 1 addition & 1 deletion bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ require 'truemail/client'
# Pry.start

require 'irb'
IRB.start(__FILE__)
::IRB.start(__FILE__)
2 changes: 1 addition & 1 deletion lib/truemail/client/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Truemail
module Client
VERSION = '0.3.4'
VERSION = '0.4.0'
end
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# frozen_string_literal: true

require 'faker'
require 'ffaker'
2 changes: 1 addition & 1 deletion spec/support/config/simplecov.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

if ::RUBY_VERSION[/\A3\.0.+\z/]
if ::RUBY_VERSION[/\A3\.1.+\z/]
require 'simplecov'

SimpleCov.minimum_coverage(100)
Expand Down
2 changes: 1 addition & 1 deletion spec/support/helpers/configuration_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def create_token

def configure_client(**configuration_settings)
Truemail::Client.reset_configuration!
configuration_settings[:host] = Faker::Internet.domain_name unless configuration_settings[:host]
configuration_settings[:host] = FFaker::Internet.domain_name unless configuration_settings[:host]
configuration_settings[:token] = create_token unless configuration_settings[:token]
Truemail::Client.configure(&configuration_block(**configuration_settings))
end
Expand Down
2 changes: 1 addition & 1 deletion spec/support/helpers/configuration_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
end

context 'with custom params' do
let(:host) { Faker::Internet.domain_name }
let(:host) { FFaker::Internet.domain_name }
let(:token) { create_token }
let(:params) { { host: host, token: token } }

Expand Down
6 changes: 3 additions & 3 deletions spec/support/helpers/request_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
RSpec.describe RequestHelper, type: :helper do
describe '#have_sent_request_with' do
let(:secure_connection) { true }
let(:host) { Faker::Internet.domain_name }
let(:port) { rand(80..8080) }
let(:host) { FFaker::Internet.domain_name }
let(:port) { ::Random.rand(80..8080) }
let(:token) { create_token }
let(:method) { :get }
let(:endpoint) { '/some_endpoint' }
let(:request_params) { { email: Faker::Internet.email } }
let(:request_params) { { email: FFaker::Internet.email } }
let(:accept) { 'accept_header' }
let(:content_type) { 'content_type_header' }
let(:user_agent) { 'user_agent_header' }
Expand Down
2 changes: 1 addition & 1 deletion spec/truemail/client/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RSpec.describe Truemail::Client::Configuration do
subject(:configuration_instance) { described_class.new }

let(:host) { Faker::Internet.domain_name }
let(:host) { FFaker::Internet.domain_name }
let(:token) { create_token }

describe 'defined constants' do
Expand Down
2 changes: 1 addition & 1 deletion spec/truemail/client/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

context 'when validation endpoint' do
let(:endpoint) { Truemail::Client::Http::VALIDATION_ENDPOINT }
let(:request_params) { { email: Faker::Internet.email } }
let(:request_params) { { email: FFaker::Internet.email } }
let(:request_settings) do
{
method: :get,
Expand Down
6 changes: 3 additions & 3 deletions spec/truemail/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
end

describe 'global configuration methods' do
let(:host) { Faker::Internet.domain_name }
let(:host) { FFaker::Internet.domain_name }
let(:token) { create_token }
let(:config_block) { configuration_block(host: host, token: token) }

Expand Down Expand Up @@ -70,7 +70,7 @@
specify { expect(configuration).to be_instance_of(Truemail::Client::Configuration) }

it 'accepts to rewrite current configuration settings' do
secure_connection, new_host, port, new_token = true, Faker::Internet.domain_name, 8080, create_token
secure_connection, new_host, port, new_token = true, FFaker::Internet.domain_name, 8080, create_token

expect do
configuration.tap(&configuration_block(
Expand Down Expand Up @@ -113,7 +113,7 @@
describe '.validate' do
subject(:validate) { described_class.validate(email) }

let(:email) { Faker::Internet.email }
let(:email) { FFaker::Internet.email }
let(:http_instance) { instance_double('Http') }

context 'when global configuration was set' do
Expand Down
14 changes: 7 additions & 7 deletions truemail-client.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
lib = ::File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'truemail/client/version'

Expand Down Expand Up @@ -28,21 +28,21 @@ Gem::Specification.new do |spec|

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.executables = spec.files.grep(%r{^exe/}) { |f| ::File.basename(f) }
spec.require_paths = ['lib']

spec.add_development_dependency 'bundler-audit', '~> 0.9.0.1'
spec.add_development_dependency 'faker', '~> 2.19'
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.0', '>= 6.0.6'
spec.add_development_dependency 'reek', '~> 6.1'
spec.add_development_dependency 'rspec', '~> 3.10'
spec.add_development_dependency 'rubocop', '~> 1.21'
spec.add_development_dependency 'rubocop-performance', '~> 1.11', '>= 1.11.5'
spec.add_development_dependency 'rubocop-rspec', '~> 2.4'
spec.add_development_dependency 'rubocop', '~> 1.25'
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.17.1'
spec.add_development_dependency 'webmock', '~> 3.14'
end

0 comments on commit 7355c16

Please sign in to comment.