From 6023cc54e85df9639da8a1f362d6b1c5b7bba3f3 Mon Sep 17 00:00:00 2001 From: Hamed Asghari Date: Thu, 18 Jan 2024 21:02:08 -0700 Subject: [PATCH] ci: Update supported ruby versions --- .github/workflows/ruby.yml | 6 +-- .rubocop.yml | 2 +- .ruby-version | 2 +- .tool-versions | 2 +- Gemfile | 7 ++++ Gemfile.lock | 82 ++++++++++++++++++++++---------------- conifer.gemspec | 10 +---- spec/conifer/file_spec.rb | 4 +- spec/conifer_spec.rb | 2 +- 9 files changed, 65 insertions(+), 52 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 9fbba6f..8b89620 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -10,13 +10,13 @@ jobs: strategy: matrix: ruby: - - '2.6' - - '2.7' - '3.0' - '3.1' + - '3.2' + - '3.3' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 diff --git a/.rubocop.yml b/.rubocop.yml index b276671..36ceeb7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -3,7 +3,7 @@ require: AllCops: NewCops: enable - TargetRubyVersion: 2.6 + TargetRubyVersion: 3.0 Layout/LineLength: Max: 120 diff --git a/.ruby-version b/.ruby-version index 4a36342..15a2799 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.0 +3.3.0 diff --git a/.tool-versions b/.tool-versions index 0b2d858..3294aed 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -ruby 3.1.2 +ruby 3.3.0 diff --git a/Gemfile b/Gemfile index 907659d..a387c7b 100644 --- a/Gemfile +++ b/Gemfile @@ -6,3 +6,10 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } # Specify your gem's dependencies in conifer.gemspec gemspec + +gem 'climate_control' +gem 'rake' +gem 'rspec' +gem 'rubocop' +gem 'rubocop-rspec' +gem 'simplecov' diff --git a/Gemfile.lock b/Gemfile.lock index e606f62..fb60185 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,56 +7,68 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) - climate_control (1.0.0) - diff-lcs (1.4.4) - docile (1.3.5) - parallel (1.21.0) - parser (3.0.3.2) + climate_control (1.2.0) + diff-lcs (1.5.0) + docile (1.4.0) + json (2.7.1) + language_server-protocol (3.17.0.3) + parallel (1.24.0) + parser (3.3.0.4) ast (~> 2.4.1) - rainbow (3.0.0) - rake (13.0.3) - regexp_parser (2.2.0) - rexml (3.2.5) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + racc + racc (1.7.3) + rainbow (3.1.1) + rake (13.1.0) + regexp_parser (2.9.0) + rexml (3.2.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.2) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-support (3.10.2) - rubocop (1.24.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.1) + rubocop (1.60.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.15.0, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.15.0) - parser (>= 3.0.1.1) - rubocop-rspec (2.3.0) - rubocop (~> 1.0) - rubocop-ast (>= 1.1.0) - ruby-progressbar (1.11.0) - simplecov (0.21.2) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) + rubocop (~> 1.41) + rubocop-rspec (2.26.1) + rubocop (~> 1.40) + rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) + ruby-progressbar (1.13.0) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) - simplecov_json_formatter (0.1.2) - unicode-display_width (2.1.0) + simplecov_json_formatter (0.1.4) + unicode-display_width (2.5.0) PLATFORMS x86_64-darwin-19 x86_64-darwin-20 x86_64-darwin-21 + x86_64-darwin-23 x86_64-linux DEPENDENCIES @@ -69,4 +81,4 @@ DEPENDENCIES simplecov BUNDLED WITH - 2.3.3 + 2.5.4 diff --git a/conifer.gemspec b/conifer.gemspec index 34d5536..eed58b3 100644 --- a/conifer.gemspec +++ b/conifer.gemspec @@ -15,7 +15,8 @@ Gem::Specification.new do |spec| spec.homepage = 'https://github.com/hasghari/conifer' spec.license = 'MIT' - spec.required_ruby_version = '>= 2.6' + spec.required_ruby_version = '>= 3.0' + spec.metadata['rubygems_mfa_required'] = 'true' # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. @@ -25,11 +26,4 @@ Gem::Specification.new do |spec| spec.bindir = 'exe' spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] - - spec.add_development_dependency 'climate_control' - spec.add_development_dependency 'rake' - spec.add_development_dependency 'rspec' - spec.add_development_dependency 'rubocop' - spec.add_development_dependency 'rubocop-rspec' - spec.add_development_dependency 'simplecov' end diff --git a/spec/conifer/file_spec.rb b/spec/conifer/file_spec.rb index 366ea50..87c158c 100644 --- a/spec/conifer/file_spec.rb +++ b/spec/conifer/file_spec.rb @@ -42,7 +42,7 @@ describe '#exists?' do context 'when file exists' do it 'returns true' do - expect(file.exists?).to eq true + expect(file.exists?).to be true end end @@ -50,7 +50,7 @@ let(:name) { :missing } it 'returns false' do - expect(file.exists?).to eq false + expect(file.exists?).to be false end end end diff --git a/spec/conifer_spec.rb b/spec/conifer_spec.rb index cf7ef42..a1e5fc3 100644 --- a/spec/conifer_spec.rb +++ b/spec/conifer_spec.rb @@ -2,7 +2,7 @@ RSpec.describe Conifer do it 'has a version number' do - expect(Conifer::VERSION).not_to be nil + expect(Conifer::VERSION).not_to be_nil end describe '::conifer' do