From b41c7c7e77be8c09a496ccfaab7ea872b25f83e3 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Wed, 8 Jul 2026 16:40:33 +0100 Subject: [PATCH 01/12] Moved development dependencies from gemspec to Gemfile Also removed constraints where possible --- Gemfile | 12 ++++++++++++ sapi-client-ruby.gemspec | 10 ---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index c868835..bd332c2 100644 --- a/Gemfile +++ b/Gemfile @@ -6,3 +6,15 @@ source 'https://rubygems.org' # Specify your gem's dependencies in sapi-nt-client-ruby.gemspec gemspec + +group :development do + gem 'bundler' + gem 'byebug' + gem 'minitest', '~> 5.0' + gem 'minitest-reporters', '~> 1.0' + gem 'mocha', '~> 2.0' + gem 'rake' + gem 'rubocop' + gem 'simplecov' + gem 'vcr', '~> 6.0' +end diff --git a/sapi-client-ruby.gemspec b/sapi-client-ruby.gemspec index 449e96b..f00b982 100644 --- a/sapi-client-ruby.gemspec +++ b/sapi-client-ruby.gemspec @@ -33,14 +33,4 @@ Gem::Specification.new do |spec| spec.add_dependency 'faraday_middleware', '~> 1.0.0' spec.add_dependency 'i18n', '~> 1.5' - - spec.add_development_dependency 'bundler', '~> 2.4.22' - spec.add_development_dependency 'byebug', '~> 11.1.3' - spec.add_development_dependency 'minitest', '~> 5.25' - spec.add_development_dependency 'minitest-reporters', '~> 1.7' - spec.add_development_dependency 'mocha', '~> 2.4' - spec.add_development_dependency 'rake', '~> 13.0.1' - spec.add_development_dependency 'rubocop', '~> 1.26.0' - spec.add_development_dependency 'simplecov', '~> 0.21.1' - spec.add_development_dependency 'vcr', '~> 6.0.0' end From 6039c8c7984bbf57bd3d9ad5e234d6f9adc305dd Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Wed, 8 Jul 2026 16:40:49 +0100 Subject: [PATCH 02/12] Regenerated Gemfile.lock --- Gemfile.lock | 86 ++++++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b4c138e..1f31d49 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,12 +9,12 @@ GEM remote: https://rubygems.org/ specs: ansi (1.5.0) - ast (2.4.2) + ast (2.4.3) builder (3.3.0) byebug (11.1.3) - concurrent-ruby (1.3.4) + concurrent-ruby (1.3.7) docile (1.4.1) - faraday (1.10.4) + faraday (1.10.6) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -27,74 +27,82 @@ GEM faraday-retry (~> 1.0) ruby2_keywords (>= 0.0.4) faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) + faraday-em_synchrony (1.0.1) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.1.0) + faraday-multipart (1.2.0) multipart-post (~> 2.0) faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) - faraday-retry (1.0.3) + faraday-retry (1.0.4) faraday_middleware (1.0.0) faraday (~> 1.0) - i18n (1.14.6) + i18n (1.14.8) concurrent-ruby (~> 1.0) - minitest (5.25.4) - minitest-reporters (1.7.1) + json (2.20.0) + language_server-protocol (3.17.0.6) + lint_roller (1.1.0) + minitest (5.26.1) + minitest-reporters (1.8.0) ansi builder - minitest (>= 5.0) + minitest (>= 5.0, < 7) ruby-progressbar - mocha (2.7.1) + mocha (2.8.2) ruby2_keywords (>= 0.0.5) multipart-post (2.4.1) - parallel (1.26.3) - parser (3.3.6.0) + parallel (1.28.0) + parser (3.3.11.1) ast (~> 2.4.1) racc + prism (1.9.0) racc (1.8.1) rainbow (3.1.1) - rake (13.0.6) - regexp_parser (2.10.0) - rexml (3.4.0) - rubocop (1.26.1) - parallel (~> 1.10) - parser (>= 3.1.0.0) + rake (13.4.2) + regexp_parser (2.12.0) + rubocop (1.88.2) + json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (>= 1.10) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.16.0, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.37.0) - parser (>= 3.3.1.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.50.0) + parser (>= 3.3.7.2) + prism (~> 1.7) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - simplecov (0.21.2) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.13.1) + simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) - unicode-display_width (2.6.0) - vcr (6.0.0) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) + vcr (6.4.0) PLATFORMS - ruby + x86_64-darwin-24 DEPENDENCIES - bundler (~> 2.4.22) - byebug (~> 11.1.3) - minitest (~> 5.25) - minitest-reporters (~> 1.7) - mocha (~> 2.4) - rake (~> 13.0.1) - rubocop (~> 1.26.0) + bundler + byebug + minitest (~> 5.0) + minitest-reporters (~> 1.0) + mocha (~> 2.0) + rake + rubocop sapi-client-ruby! - simplecov (~> 0.21.1) - vcr (~> 6.0.0) + simplecov + vcr (~> 6.0) BUNDLED WITH 2.4.22 From 687405e3fdb676fd42de1d51b8e6ad46baeef338 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Wed, 8 Jul 2026 16:42:50 +0100 Subject: [PATCH 03/12] Added changelog entry --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 012cbb5..13ad8f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes will be documented in this file. +## Unreleased + +- (Bogdan) Moved development dependencies from `gemspec` to `Gemfile` and updated + all dependencies [#37](https://github.com/epimorphics/nrw-landing/issues/37) + ## 1.4.0 - 2026-03-04 - (AlexT) When finding wrapper type, select the most specific type if more are available From 631c11f8f29ed81023b330217de8eeb0519a17ef Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Thu, 9 Jul 2026 11:34:48 +0100 Subject: [PATCH 04/12] Added linux platform in Gemfile.lock --- Gemfile.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile.lock b/Gemfile.lock index 1f31d49..707123d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,6 +91,7 @@ GEM PLATFORMS x86_64-darwin-24 + x86_64-linux DEPENDENCIES bundler From a9bad479f12bb3b03ca1f8f77cbffa7f74b11468 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Thu, 9 Jul 2026 11:37:23 +0100 Subject: [PATCH 05/12] Fixed rubocop errors --- exe/sapi | 6 +++--- lib/sapi_client/application.rb | 2 +- lib/sapi_client/endpoint_group.rb | 2 +- lib/sapi_client/endpoint_values.rb | 2 +- lib/sapi_client/hierarchy_resource.rb | 2 +- lib/sapi_client/instance.rb | 2 +- lib/sapi_client/resource_wrapper.rb | 6 +++--- lib/sapi_client/sapi_endpoint.rb | 2 +- lib/sapi_client/sapi_resource.rb | 4 ++-- lib/sapi_client/view.rb | 2 +- test/sapi_client/endpoint_values_test.rb | 2 +- test/sapi_client/sapi_resource_test.rb | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/exe/sapi b/exe/sapi index e6fc03e..e2358b6 100755 --- a/exe/sapi +++ b/exe/sapi @@ -1,13 +1,13 @@ #!/usr/bin/env ruby -# frozen-string-literal: true +# frozen_string_literal: true require 'bundler/setup' require 'optparse' require 'sapi_client' options = { - base: ENV['SAPI_BASE_URL'], - spec: ENV['SAPI_SPEC_FILE'] || ENV['SAPI_SPEC'] + base: ENV.fetch('SAPI_BASE_URL', nil), + spec: ENV['SAPI_SPEC_FILE'] || ENV.fetch('SAPI_SPEC', nil) } def spec_file_or_dir(options) diff --git a/lib/sapi_client/application.rb b/lib/sapi_client/application.rb index f9b62f1..38346a0 100644 --- a/lib/sapi_client/application.rb +++ b/lib/sapi_client/application.rb @@ -1,4 +1,4 @@ -# frozen-string-literal: true +# frozen_string_literal: true module SapiClient # Wraps an entire Sapi-NT application, such that we can walk over all of the diff --git a/lib/sapi_client/endpoint_group.rb b/lib/sapi_client/endpoint_group.rb index 958f20a..0bb40b4 100644 --- a/lib/sapi_client/endpoint_group.rb +++ b/lib/sapi_client/endpoint_group.rb @@ -1,4 +1,4 @@ -# frozen-string-literal: true +# frozen_string_literal: true module SapiClient # Encapsulates the specification of a group of SAPI endpoints, and some diff --git a/lib/sapi_client/endpoint_values.rb b/lib/sapi_client/endpoint_values.rb index 253df01..04d4c7a 100644 --- a/lib/sapi_client/endpoint_values.rb +++ b/lib/sapi_client/endpoint_values.rb @@ -1,4 +1,4 @@ -# frozen-string-literal: true +# frozen_string_literal: true module SapiClient # Encapsulates a set of values from a given endpoint, conditioned by various diff --git a/lib/sapi_client/hierarchy_resource.rb b/lib/sapi_client/hierarchy_resource.rb index 8d1cf74..2d411ee 100644 --- a/lib/sapi_client/hierarchy_resource.rb +++ b/lib/sapi_client/hierarchy_resource.rb @@ -8,7 +8,7 @@ class HierarchyResource < SapiResource attr_reader :children, :parent def initialize(resource) - super(resource) + super @children = [] end diff --git a/lib/sapi_client/instance.rb b/lib/sapi_client/instance.rb index 4683b49..88f11c8 100644 --- a/lib/sapi_client/instance.rb +++ b/lib/sapi_client/instance.rb @@ -1,4 +1,4 @@ -# frozen-string-literal: true +# frozen_string_literal: true module SapiClient # Denotes a particular instance of a Sapi-NT API. The instance has the basic diff --git a/lib/sapi_client/resource_wrapper.rb b/lib/sapi_client/resource_wrapper.rb index 45363fa..3a19414 100644 --- a/lib/sapi_client/resource_wrapper.rb +++ b/lib/sapi_client/resource_wrapper.rb @@ -30,11 +30,11 @@ def self.default_resource_wrapper_type # Find the first wrapper type for which there is an existing # class constant with the same name. If no such value is # found, return the default resource wrapper - # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength + # rubocop:disable Metrics/MethodLength def self.find_wrapper_type(types) all_wrapped = Array(types) .map { |type| wrapper_class_constant(de_uri(type)) } - .filter { |wrapper| !wrapper.nil? } + .compact most_specific_wrapped = all_wrapped .filter do |t| all_wrapped.none? do |a| @@ -45,7 +45,7 @@ def self.find_wrapper_type(types) default_resource_wrapper_type end - # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength + # rubocop:enable Metrics/MethodLength # Return the wrapper class for the given resource. If the # `options` specifies the wrapper class, then use that. diff --git a/lib/sapi_client/sapi_endpoint.rb b/lib/sapi_client/sapi_endpoint.rb index 7d83bd3..6a5cf03 100644 --- a/lib/sapi_client/sapi_endpoint.rb +++ b/lib/sapi_client/sapi_endpoint.rb @@ -1,4 +1,4 @@ -# frozen-string-literal: true +# frozen_string_literal: true module SapiClient # Denotes a single SAPI-NT endpoint, which we can call to get back JSON data diff --git a/lib/sapi_client/sapi_resource.rb b/lib/sapi_client/sapi_resource.rb index 80ac44e..8198f64 100644 --- a/lib/sapi_client/sapi_resource.rb +++ b/lib/sapi_client/sapi_resource.rb @@ -1,4 +1,4 @@ -# frozen-string-literal: true +# frozen_string_literal: true module SapiClient # Encapsulates a JSON-LD -style resource that we get back from a Sapi-NT endpoint, @@ -193,7 +193,7 @@ def lang_select(values, preferred_lang) # Return the given value as an un-wrapped resource. A Hash given to this # method will have its keys transformed to symbols. def as_resource(res) - if res.is_a?(SapiResource) # rubocop:disable Style/CaseLikeIf + if res.is_a?(SapiResource) res.resource.clone elsif res.is_a?(Hash) hash_with_symbol_keys(res) diff --git a/lib/sapi_client/view.rb b/lib/sapi_client/view.rb index a8601a1..ae9f628 100644 --- a/lib/sapi_client/view.rb +++ b/lib/sapi_client/view.rb @@ -1,4 +1,4 @@ -# frozen-string-literal: true +# frozen_string_literal: true module SapiClient # Encapsulates a view of a Sapi-NT endpoint, which tells us information about diff --git a/test/sapi_client/endpoint_values_test.rb b/test/sapi_client/endpoint_values_test.rb index 5ae5a31..5ed98e6 100644 --- a/test/sapi_client/endpoint_values_test.rb +++ b/test/sapi_client/endpoint_values_test.rb @@ -1,4 +1,4 @@ -# frozen-string-literal: true +# frozen_string_literal: true require 'test_helper' require 'sapi_client' diff --git a/test/sapi_client/sapi_resource_test.rb b/test/sapi_client/sapi_resource_test.rb index 9df921d..1c6bb93 100644 --- a/test/sapi_client/sapi_resource_test.rb +++ b/test/sapi_client/sapi_resource_test.rb @@ -1,4 +1,4 @@ -# frozen-string-literal: true +# frozen_string_literal: true require 'test_helper' require 'sapi_client' From c850322d699f3936af026ebba7c431c84bd73e03 Mon Sep 17 00:00:00 2001 From: Alex Tucker Date: Thu, 9 Jul 2026 11:38:50 +0100 Subject: [PATCH 06/12] Make .ruby-version the minimal currently supported Ruby. --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index 6a81b4c..a8bf53a 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.8 +3.3.11 \ No newline at end of file From f5f97de93561725f4734ba10d7ddd424b5c6d655 Mon Sep 17 00:00:00 2001 From: Alex Tucker Date: Thu, 9 Jul 2026 11:45:06 +0100 Subject: [PATCH 07/12] Update GH actions/checkout to v6 Test against rubies 3.3 to 4.0. --- .github/workflows/lint-app.yml | 4 ++-- .github/workflows/publish.yml | 2 +- .github/workflows/test-app.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-app.yml b/.github/workflows/lint-app.yml index 99b48ce..93eb7e1 100644 --- a/.github/workflows/lint-app.yml +++ b/.github/workflows/lint-app.yml @@ -6,11 +6,11 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: 3.3 - name: Install dependencies (bundle) run: bundle install - name: Run Rubocop diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5501c93..37a9997 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 diff --git a/.github/workflows/test-app.yml b/.github/workflows/test-app.yml index c89b792..42d07e0 100644 --- a/.github/workflows/test-app.yml +++ b/.github/workflows/test-app.yml @@ -6,10 +6,10 @@ jobs: test: strategy: matrix: - ruby: ['2.7', '3.0', '3.1', '3.2', '3.3'] + ruby: ['3.3', '3.4', '4.0'] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: From 68a91a7dc0a93a395b7301d998e40cb8008c60d0 Mon Sep 17 00:00:00 2001 From: Alex Tucker Date: Thu, 9 Jul 2026 11:52:39 +0100 Subject: [PATCH 08/12] Tests fail with Ruby 4.0 so remove for now. --- .github/workflows/test-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-app.yml b/.github/workflows/test-app.yml index 42d07e0..f8783be 100644 --- a/.github/workflows/test-app.yml +++ b/.github/workflows/test-app.yml @@ -6,7 +6,7 @@ jobs: test: strategy: matrix: - ruby: ['3.3', '3.4', '4.0'] + ruby: ['3.3', '3.4'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 From 363e2f78cd54ae0a0aa06a80dc065d9e35252c1a Mon Sep 17 00:00:00 2001 From: Alex Tucker Date: Thu, 9 Jul 2026 15:23:37 +0100 Subject: [PATCH 09/12] Set required Ruby versions to ~> 3.3, i.e. >= 3.3 and < 4.0. --- sapi-client-ruby.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapi-client-ruby.gemspec b/sapi-client-ruby.gemspec index f00b982..bbede1f 100644 --- a/sapi-client-ruby.gemspec +++ b/sapi-client-ruby.gemspec @@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'sapi_client/version' Gem::Specification.new do |spec| - spec.required_ruby_version = '>= 2.7.8' + spec.required_ruby_version = '~> 3.3' spec.name = 'sapi-client-ruby' spec.version = SapiClient::VERSION spec.authors = ['Epimorphics Ltd'] From 799a0bf6aa3eec09f3d6c678abcf2153bd40dc64 Mon Sep 17 00:00:00 2001 From: Alex Tucker Date: Thu, 9 Jul 2026 15:28:32 +0100 Subject: [PATCH 10/12] Update Rubocop target Ruby version. Apply Rubocop corrections. --- .rubocop.yml | 2 +- lib/sapi_client/hierarchy_resource.rb | 4 ++-- lib/sapi_client/version.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 2ada576..158328b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.3 NewCops: enable Style/FrozenStringLiteralComment: Enabled: true diff --git a/lib/sapi_client/hierarchy_resource.rb b/lib/sapi_client/hierarchy_resource.rb index 2d411ee..5677e49 100644 --- a/lib/sapi_client/hierarchy_resource.rb +++ b/lib/sapi_client/hierarchy_resource.rb @@ -22,8 +22,8 @@ def add_child(resource, add_reciprocal: true) resource.send(:parent=, self, add_reciprocal: false) if add_reciprocal end - def each_child(&block) - children.each(&block) + def each_child(&) + children.each(&) end end end diff --git a/lib/sapi_client/version.rb b/lib/sapi_client/version.rb index 88ff5e8..962942a 100644 --- a/lib/sapi_client/version.rb +++ b/lib/sapi_client/version.rb @@ -4,5 +4,5 @@ module SapiClient MAJOR = 1 MINOR = 4 FIX = 0 - VERSION = "#{MAJOR}.#{MINOR}.#{FIX}" + VERSION = "#{MAJOR}.#{MINOR}.#{FIX}".freeze end From 5469347055e7e036277cdd2c5ea41b73fb88994c Mon Sep 17 00:00:00 2001 From: Alex Tucker Date: Fri, 10 Jul 2026 12:38:11 +0100 Subject: [PATCH 11/12] Remove .ruby-version: gem build doesn't use it, presumably using the default Ruby in the GH runner. Move Rubucop to matrix so it'll run using the latest in 3.3 and 3.4 series Rubies. --- .github/workflows/lint-app.yml | 17 ----------------- .github/workflows/test-app.yml | 2 ++ .ruby-version | 1 - 3 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/lint-app.yml delete mode 100644 .ruby-version diff --git a/.github/workflows/lint-app.yml b/.github/workflows/lint-app.yml deleted file mode 100644 index 93eb7e1..0000000 --- a/.github/workflows/lint-app.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Rubocop checking - -on: [push] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.3 - - name: Install dependencies (bundle) - run: bundle install - - name: Run Rubocop - run: bundle exec rubocop diff --git a/.github/workflows/test-app.yml b/.github/workflows/test-app.yml index f8783be..be8225c 100644 --- a/.github/workflows/test-app.yml +++ b/.github/workflows/test-app.yml @@ -15,5 +15,7 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true + - name: Run Rubocop + run: bundle exec rubocop - name: Run tests run: bundle exec rake test diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index a8bf53a..0000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -3.3.11 \ No newline at end of file From c1176fbef8a222f50cf444e33795142e80bddfcc Mon Sep 17 00:00:00 2001 From: Alex Tucker Date: Fri, 10 Jul 2026 14:27:22 +0100 Subject: [PATCH 12/12] Only run tests/lints on pull_request as including pushes will duplicate the test runs. Remove targetRubyVersion from Rubocop config as it will conservatively use the minimal version from the gemspec. Avoid re-running Rubocop for anything other than the minimal Ruby version in the matrix. --- .github/workflows/test-app.yml | 9 +++++++-- .rubocop.yml | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-app.yml b/.github/workflows/test-app.yml index be8225c..49c8e0d 100644 --- a/.github/workflows/test-app.yml +++ b/.github/workflows/test-app.yml @@ -1,21 +1,26 @@ name: Ruby tests -on: [push, pull_request] +on: pull_request jobs: test: strategy: matrix: + # In support versions of Ruby this Gem will be tested against. + # This should correspond to the version range in the gemfile. ruby: ['3.3', '3.4'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@v1.316.0 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - name: Run Rubocop + # Note that Rubocop will conservatively use the minimal version from the gemfile for its rules + # we should only run it on the minimal Ruby version + if: matrix.ruby == '3.3' run: bundle exec rubocop - name: Run tests run: bundle exec rake test diff --git a/.rubocop.yml b/.rubocop.yml index 158328b..8330b68 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,4 @@ AllCops: - TargetRubyVersion: 3.3 NewCops: enable Style/FrozenStringLiteralComment: Enabled: true