From 74037ce691bf7c21aa5cf18d006f2c6d24d25702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= Date: Wed, 3 Sep 2025 11:41:40 -0600 Subject: [PATCH] Update dependencies and improve codebase --- .github/workflows/testing.yml | 28 +++++++++++ .rubocop.yml | 6 ++- .ruby-version | 1 + .travis.yml | 9 ---- Gemfile | 7 +-- Gemfile.lock | 92 ++++++++++++++++++----------------- Rakefile | 2 +- yondu.gemspec | 2 +- 8 files changed, 87 insertions(+), 60 deletions(-) create mode 100644 .github/workflows/testing.yml create mode 100644 .ruby-version delete mode 100644 .travis.yml diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 0000000..1d51992 --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,28 @@ +name: Testing + +on: + pull_request: + branches: + - main + +permissions: + contents: read + checks: write + +jobs: + test: + name: Running tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true + + - name: Run tests + run: bundle exec rake diff --git a/.rubocop.yml b/.rubocop.yml index 6670105..72f9e6a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,8 +1,10 @@ -require: rubocop-rspec +plugins: + - rubocop-rake + - rubocop-rspec AllCops: NewCops: enable - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.2 Style/StringLiterals: Enabled: true diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..4f5e697 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.4.5 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7f89214..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -language: ruby -cache: bundler -rvm: - - 2.7.8 - - 3.0.6 - - 3.1.4 - - 3.2.2 -before_install: gem install bundler -v 2.3.20 diff --git a/Gemfile b/Gemfile index 076f81a..476e9d0 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,8 @@ source "https://rubygems.org" # Specify your gem's dependencies in yondu.gemspec gemspec -gem "rake", "~> 13.0" -gem "rspec", "~> 3.12" -gem "rubocop", "~> 1.50" +gem "rake", "~> 13.3" +gem "rspec", "~> 3.13" +gem "rubocop", "~> 1.80" +gem "rubocop-rake", require: false gem "rubocop-rspec", require: false diff --git a/Gemfile.lock b/Gemfile.lock index ee0485f..cb93740 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,65 +6,69 @@ PATH GEM remote: https://rubygems.org/ specs: - ast (2.4.2) - diff-lcs (1.5.0) - json (2.6.3) - language_server-protocol (3.17.0.3) - parallel (1.23.0) - parser (3.2.2.3) + ast (2.4.3) + diff-lcs (1.6.2) + json (2.13.2) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + parallel (1.27.0) + parser (3.3.9.0) ast (~> 2.4.1) racc - racc (1.7.1) + prism (1.4.0) + racc (1.8.1) rainbow (3.1.1) - rake (13.0.6) - regexp_parser (2.8.1) - rexml (3.2.5) - 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) + rake (13.3.0) + regexp_parser (2.11.2) + rspec (3.13.1) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.5) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.6) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-support (3.12.1) - rubocop (1.54.2) + rspec-support (~> 3.13.0) + rspec-support (3.13.5) + rubocop (1.80.2) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.46.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) - parser (>= 3.2.1.0) - rubocop-capybara (2.18.0) - rubocop (~> 1.41) - rubocop-factory_bot (2.23.1) - rubocop (~> 1.33) - rubocop-rspec (2.22.0) - rubocop (~> 1.33) - rubocop-capybara (~> 2.17) - rubocop-factory_bot (~> 2.22) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.46.0) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-rake (0.7.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) + rubocop-rspec (3.7.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) ruby-progressbar (1.13.0) - unicode-display_width (2.4.2) + unicode-display_width (3.1.5) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) PLATFORMS - arm64-darwin-22 + arm64-darwin-24 + ruby DEPENDENCIES - rake (~> 13.0) - rspec (~> 3.12) - rubocop (~> 1.50) + rake (~> 13.3) + rspec (~> 3.13) + rubocop (~> 1.80) + rubocop-rake rubocop-rspec yondu! BUNDLED WITH - 2.4.17 + 2.7.1 diff --git a/Rakefile b/Rakefile index cca7175..dcdeab9 100644 --- a/Rakefile +++ b/Rakefile @@ -9,4 +9,4 @@ require "rubocop/rake_task" RuboCop::RakeTask.new -task default: %i[spec rubocop] +task default: %i[rubocop spec] diff --git a/yondu.gemspec b/yondu.gemspec index 94157fb..f583c95 100644 --- a/yondu.gemspec +++ b/yondu.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |spec| spec.description = "Settings object for extending configuration" spec.homepage = "https://github.com/amco/yondu-rb" spec.license = "MIT" - spec.required_ruby_version = ">= 2.7.0" + spec.required_ruby_version = ">= 3.2" # Prevent pushing this gem to RubyGems.org. To allow pushes either set the "allowed_push_host" # to allow pushing to a single host or delete this section to allow pushing to any host.