From e808ccd88c55985485c2e3a54782dd5667a322bc Mon Sep 17 00:00:00 2001 From: gangelo Date: Sat, 18 May 2024 19:04:46 -0400 Subject: [PATCH] Update ruby gems and update GitHub Actions ...to include testing against ruby versions '3.0.7', '3.1', '3.2' and '3.3' on ubuntu-latest, macos-latest and windows-latest. --- .github/workflows/ruby.yml | 45 +++++++++++++---------- .ruby-version | 2 +- CHANGELOG.md | 6 +++ Gemfile.lock | 65 +++++++++++++++++++-------------- README.md | 10 ++--- dsu.gemspec | 3 +- lib/dsu/version.rb | 2 +- spec/dsu/crud/json_file_spec.rb | 3 +- 8 files changed, 80 insertions(+), 56 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index d19a3bf2..ab63ece5 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -1,10 +1,3 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake -# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby - name: Ruby on: @@ -18,26 +11,40 @@ permissions: jobs: test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: - # Use `rbenv install -l` and only use the latest stable - # version of ruby. - ruby-version: ["3.0.1", "3.0.6", "3.1.4", "3.2.2"] + os: [ubuntu-latest, macos-latest, windows-latest] + ruby: ['3.0.7', '3.1', '3.2', '3.3'] steps: - uses: actions/checkout@v3 - - name: Set timezone + - name: Set timezone on Linux + if: matrix.os == 'ubuntu-latest' run: sudo timedatectl set-timezone 'America/New_York' - - name: Run a command - run: date + + - name: Set timezone on macOS + if: matrix.os == 'macos-latest' + run: sudo systemsetup -settimezone America/New_York + + - name: Set timezone on Windows + if: matrix.os == 'windows-latest' + run: tzutil /s "Eastern Standard Time" + - name: Set up Ruby - # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, - # change this to (see https://github.com/ruby/setup-ruby#versioning): - # uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby-version }} + ruby-version: ${{ matrix.ruby }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically + + - name: Update RubyGems + run: gem update --system + + - name: Disable bundler frozen setting + run: bundle config set frozen false + + - name: Install dependencies + run: bundle install + - name: Run tests run: bundle exec rake diff --git a/.ruby-version b/.ruby-version index cb2b00e4..2451c27c 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.1 +3.0.7 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ad67b32..f4263265 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [3.0.2] - 2024-05-18 + +### Changes +[x] Update ruby gems. +[x] Update GitHub Actions to include testing against ruby versions '3.0.7', '3.1', '3.2' and '3.3' on ubuntu-latest, macos-latest and windows-latest. + ## [3.0.1] - 2024-02-19 ### Changes diff --git a/Gemfile.lock b/Gemfile.lock index a343fd12..98ea8075 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,20 +1,21 @@ PATH remote: . specs: - dsu (3.0.1) + dsu (3.0.2) activemodel (>= 7.0.8, < 8.0) activesupport (>= 7.0.8, < 8.0) colorize (>= 1.1, < 2.0) os (>= 1.1, < 2.0) thor (>= 1.2, < 2.0) thor_nested_subcommand (>= 1.0, < 2.0) + tzinfo-data (~> 1.2024, >= 1.2024.1) GEM remote: https://rubygems.org/ specs: - activemodel (7.1.3) - activesupport (= 7.1.3) - activesupport (7.1.3) + activemodel (7.1.3.3) + activesupport (= 7.1.3.3) + activesupport (7.1.3.3) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -26,7 +27,7 @@ GEM tzinfo (~> 2.0) ast (2.4.2) base64 (0.2.0) - bigdecimal (3.1.6) + bigdecimal (3.1.8) byebug (11.1.3) coderay (1.1.3) colorize (1.1.0) @@ -35,8 +36,7 @@ GEM diff-lcs (1.5.1) docile (1.4.0) dotenv (2.8.1) - drb (2.2.0) - ruby2_keywords + drb (2.2.1) dry-configurable (1.1.0) dry-core (~> 1.0, < 2) zeitwerk (~> 2.6) @@ -67,16 +67,16 @@ GEM factory_bot (6.4.6) activesupport (>= 5.0.0) ffaker (2.23.0) - i18n (1.14.1) + i18n (1.14.5) concurrent-ruby (~> 1.0) - json (2.7.1) + json (2.7.2) language_server-protocol (3.17.0.3) - method_source (1.0.0) - minitest (5.22.2) + method_source (1.1.0) + minitest (5.23.0) mutex_m (0.2.0) os (1.1.4) parallel (1.24.0) - parser (3.3.0.5) + parser (3.3.1.0) ast (~> 2.4.1) racc pry (0.14.2) @@ -85,16 +85,17 @@ GEM pry-byebug (3.10.1) byebug (~> 11.0) pry (>= 0.13, < 0.15) - racc (1.7.3) + racc (1.8.0) rainbow (3.1.1) - rake (13.1.0) + rake (13.2.1) reek (6.3.0) dry-schema (~> 1.13.0) parser (~> 3.3.0) rainbow (>= 2.0, < 4.0) rexml (~> 3.1) - regexp_parser (2.9.0) - rexml (3.2.6) + regexp_parser (2.9.2) + rexml (3.2.8) + strscan (>= 3.0.9) rspec (3.13.0) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) @@ -104,11 +105,11 @@ GEM rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-support (3.13.0) - rubocop (1.60.2) + rspec-support (3.13.1) + rubocop (1.63.5) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -116,40 +117,48 @@ GEM rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.30.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) rubocop-capybara (2.20.0) rubocop (~> 1.41) rubocop-factory_bot (2.25.1) rubocop (~> 1.41) - rubocop-performance (1.20.2) + rubocop-performance (1.21.0) rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.26.1) + rubocop-rspec (2.29.2) rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) + rubocop-rspec_rails (~> 2.28) + rubocop-rspec_rails (2.28.3) + rubocop (~> 1.40) ruby-progressbar (1.13.0) - ruby2_keywords (0.0.5) 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.4) - thor (1.3.0) + strscan (3.1.0) + thor (1.3.1) thor_nested_subcommand (1.0.8) tzinfo (2.0.6) concurrent-ruby (~> 1.0) + tzinfo-data (1.2024.1) + tzinfo (>= 1.0.0) unicode-display_width (2.5.0) - zeitwerk (2.6.13) + zeitwerk (2.6.14) PLATFORMS + arm64-darwin-22 + x64-mingw-ucrt + x64-mingw32 x86_64-darwin-19 x86_64-darwin-21 x86_64-linux diff --git a/README.md b/README.md index 5da488a1..0203c333 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,10 @@ The [dsu wiki](https://github.com/gangelo/dsu/wiki) is currently the gold standa * Visit the [How I use dsu daily as an Agile developer](https://github.com/gangelo/dsu/wiki/How-I-use-dsu-daily-as-an-Agile-developer) wiki for examples of how _I_ use `dsu` on a daily basis. # Supported ruby versions -`dsu` _should_ work with any ruby version `['>= 3.0.1', '< 4.0']`; however, `dsu` is currently tested against the following ruby versions: -- 3.0.1 -- 3.0.6 -- 3.1.4 -- 3.2.2 +`dsu` _should_ work with any ruby version `['>= 3.0.7', '< 4.0']`; however, `dsu` is currently tested against the ubuntu-latest, macos-latest and windows-latest platforms, using the following ruby versions: +- 3.0.7 +- 3.1 +- 3.2 +- 3.3 Copyright (c) 2023-2024 Gene Angelo. See [LICENSE](https://github.com/gangelo/dsu/blob/main/LICENSE.txt) for details. diff --git a/dsu.gemspec b/dsu.gemspec index 9b07c2d1..47802a81 100644 --- a/dsu.gemspec +++ b/dsu.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| DESC spec.homepage = 'https://github.com/gangelo/dsu' spec.license = 'MIT' - spec.required_ruby_version = ['>= 3.0.1', '< 4.0'] + spec.required_ruby_version = ['>= 3.0.7', '< 4.0'] spec.metadata['homepage_uri'] = spec.homepage spec.metadata['documentation_uri'] = 'https://github.com/gangelo/dsu/wiki' @@ -44,6 +44,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'os', '>= 1.1', '< 2.0' spec.add_dependency 'thor', '>= 1.2', '< 2.0' spec.add_dependency 'thor_nested_subcommand', '>= 1.0', '< 2.0' + spec.add_dependency 'tzinfo-data', '~> 1.2024', '>= 1.2024.1' spec.metadata['rubygems_mfa_required'] = 'true' diff --git a/lib/dsu/version.rb b/lib/dsu/version.rb index 0ee80021..8842d57b 100644 --- a/lib/dsu/version.rb +++ b/lib/dsu/version.rb @@ -2,5 +2,5 @@ module Dsu VERSION_REGEX = /\A\d+\.\d+\.\d+(\.(alpha|beta|rc)\.\d+)?\z/ - VERSION = '3.0.1' + VERSION = '3.0.2' end diff --git a/spec/dsu/crud/json_file_spec.rb b/spec/dsu/crud/json_file_spec.rb index 95d8c104..45e94cd7 100644 --- a/spec/dsu/crud/json_file_spec.rb +++ b/spec/dsu/crud/json_file_spec.rb @@ -20,7 +20,8 @@ def to_h end before do - File.delete(temp_file) + temp_file.close + File.delete(temp_file.path) end let(:input_file) { 'spec/fixtures/files/json_file.json' }