diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 59c01fe2..1bdc783e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.1' + ruby-version: '3.4' bundler-cache: true - run: bundle exec standardrb test: @@ -42,8 +42,8 @@ jobs: - lint strategy: matrix: - rails: ['6.1', '7.0', '7.1'] - ruby: ['3.1', '3.2', '3.3'] + rails: ['7.2', '8.0', '8.1'] + ruby: ['3.2', '3.3', '3.4', '4.0'] runs-on: ubuntu-latest env: RAILS_VERSION: ${{ matrix.rails }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e624ca6..7655099c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. 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). +## [UNRELEASED] +### Changed +- Updated CI test matrix to support Rails 7.2, 8.0, 8.1 and Ruby 3.2, 3.3, 3.4, 4.0 by [@nehresma](https://github.com/nehresma) and [@pacso](https://github.com/pacso) + + ## [0.17.0] - 2024-07-18 ### Added - Indonesian translations. ([#505](https://github.com/seejohnrun/ice_cube/pull/505)) by [@achmiral](https://github.com/achmiral) diff --git a/ice_cube.gemspec b/ice_cube.gemspec index a2016902..4209f784 100644 --- a/ice_cube.gemspec +++ b/ice_cube.gemspec @@ -22,4 +22,5 @@ Gem::Specification.new do |s| s.add_development_dependency("rake") s.add_development_dependency("rspec", "> 3") s.add_development_dependency("standard") + s.add_development_dependency("benchmark") end diff --git a/lib/ice_cube/rule.rb b/lib/ice_cube/rule.rb index 30689267..6c4c96ef 100644 --- a/lib/ice_cube/rule.rb +++ b/lib/ice_cube/rule.rb @@ -36,8 +36,8 @@ def self.from_ical(ical) end # Yaml implementation - def to_yaml(*args) - YAML.dump(to_hash, *args) + def to_yaml(*) + YAML.dump(to_hash, *) end # From yaml diff --git a/lib/ice_cube/validations/day.rb b/lib/ice_cube/validations/day.rb index c99ada7e..a572ea61 100644 --- a/lib/ice_cube/validations/day.rb +++ b/lib/ice_cube/validations/day.rb @@ -61,7 +61,7 @@ def build_ical(builder) elsif validation_days == (1..5).to_a IceCube::I18n.t("ice_cube.on_weekdays") else - day_names = ->(d) { (IceCube::I18n.t("ice_cube.days_on")[d]).to_s } + day_names = ->(d) { IceCube::I18n.t("ice_cube.days_on")[d].to_s } segments = validation_days.map(&day_names) IceCube::I18n.t("ice_cube.on_days", days: StringBuilder.sentence(segments)) end diff --git a/spec/examples/ice_cube_spec.rb b/spec/examples/ice_cube_spec.rb index d925f63d..bdaf6995 100644 --- a/spec/examples/ice_cube_spec.rb +++ b/spec/examples/ice_cube_spec.rb @@ -485,8 +485,8 @@ end_time = DAY + IceCube::ONE_DAY * 2 schedule = IceCube::Schedule.new(start_time, duration: 20) schedule.add_recurrence_rule IceCube::Rule.daily.until(end_time) - expect(schedule.occurring_at?((DAY + 2 * IceCube::ONE_DAY + 10))).to be_truthy # in range - expect(schedule.occurring_at?((DAY + 4 * IceCube::ONE_DAY + 10))).to be_falsey # out of range + expect(schedule.occurring_at?(DAY + 2 * IceCube::ONE_DAY + 10)).to be_truthy # in range + expect(schedule.occurring_at?(DAY + 4 * IceCube::ONE_DAY + 10)).to be_falsey # out of range end it "should not create an infinite loop crossing over february - github issue 6" do