Skip to content

Commit 83144a5

Browse files
nehresmapacso
andauthored
Update supported Rails and Ruby versions (#565)
* add rails 7.2 and 8.0 to github action tests * Update test matrix and CHANGELOG.md * Fix linting error * Update ruby version in lint runner * Fix lint errors * Add benchmark gem as a dev dependency --------- Co-authored-by: Jon Pascoe <jon.pascoe@me.com>
1 parent ee21ea6 commit 83144a5

6 files changed

Lines changed: 14 additions & 8 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- uses: actions/checkout@v4
3434
- uses: ruby/setup-ruby@v1
3535
with:
36-
ruby-version: '3.1'
36+
ruby-version: '3.4'
3737
bundler-cache: true
3838
- run: bundle exec standardrb
3939
test:
@@ -42,8 +42,8 @@ jobs:
4242
- lint
4343
strategy:
4444
matrix:
45-
rails: ['6.1', '7.0', '7.1']
46-
ruby: ['3.1', '3.2', '3.3']
45+
rails: ['7.2', '8.0', '8.1']
46+
ruby: ['3.2', '3.3', '3.4', '4.0']
4747
runs-on: ubuntu-latest
4848
env:
4949
RAILS_VERSION: ${{ matrix.rails }}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [UNRELEASED]
8+
### Changed
9+
- 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)
10+
11+
712
## [0.17.0] - 2024-07-18
813
### Added
914
- Indonesian translations. ([#505](https://github.com/seejohnrun/ice_cube/pull/505)) by [@achmiral](https://github.com/achmiral)

ice_cube.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ Gem::Specification.new do |s|
2222
s.add_development_dependency("rake")
2323
s.add_development_dependency("rspec", "> 3")
2424
s.add_development_dependency("standard")
25+
s.add_development_dependency("benchmark")
2526
end

lib/ice_cube/rule.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def self.from_ical(ical)
3636
end
3737

3838
# Yaml implementation
39-
def to_yaml(*args)
40-
YAML.dump(to_hash, *args)
39+
def to_yaml(*)
40+
YAML.dump(to_hash, *)
4141
end
4242

4343
# From yaml

lib/ice_cube/validations/day.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def build_ical(builder)
6161
elsif validation_days == (1..5).to_a
6262
IceCube::I18n.t("ice_cube.on_weekdays")
6363
else
64-
day_names = ->(d) { (IceCube::I18n.t("ice_cube.days_on")[d]).to_s }
64+
day_names = ->(d) { IceCube::I18n.t("ice_cube.days_on")[d].to_s }
6565
segments = validation_days.map(&day_names)
6666
IceCube::I18n.t("ice_cube.on_days", days: StringBuilder.sentence(segments))
6767
end

spec/examples/ice_cube_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,8 @@
485485
end_time = DAY + IceCube::ONE_DAY * 2
486486
schedule = IceCube::Schedule.new(start_time, duration: 20)
487487
schedule.add_recurrence_rule IceCube::Rule.daily.until(end_time)
488-
expect(schedule.occurring_at?((DAY + 2 * IceCube::ONE_DAY + 10))).to be_truthy # in range
489-
expect(schedule.occurring_at?((DAY + 4 * IceCube::ONE_DAY + 10))).to be_falsey # out of range
488+
expect(schedule.occurring_at?(DAY + 2 * IceCube::ONE_DAY + 10)).to be_truthy # in range
489+
expect(schedule.occurring_at?(DAY + 4 * IceCube::ONE_DAY + 10)).to be_falsey # out of range
490490
end
491491

492492
it "should not create an infinite loop crossing over february - github issue 6" do

0 commit comments

Comments
 (0)