Skip to content

Commit

Permalink
Chore: Use ruby 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joshleaves committed Feb 11, 2024
1 parent aeb6a6d commit 3679ad8
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
ruby-version: '3.3.0' # Not needed with a .ruby-version file
bundler-cache: true
- name: Check code with RuboCop
run: rubocop . --format github
run: bundle exec rubocop . --format github
- name: Check code with RSpec
run: rspec . --format RspecGithubActionsFormatter
run: bundle exec rspec --format RspecGithubActionsFormatter
- run: echo "🍏 This job's status is ${{ job.status }}."
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.0
4 changes: 1 addition & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
source 'https://rubygems.org'
ruby '3.3.0'

gem 'rspec'
gem 'rspec-github-actions-formatter'

gem 'rubocop'
gem 'rubocop-performance'
gem 'rubocop-rspec'

# For the lulz
gem 'nyan-cat-formatter'
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ GEM
diff-lcs (1.5.1)
json (2.7.1)
language_server-protocol (3.17.0.3)
nyan-cat-formatter (0.12.0)
rspec (>= 2.99, >= 2.14.2, < 4)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
Expand Down Expand Up @@ -60,12 +58,14 @@ PLATFORMS
ruby

DEPENDENCIES
nyan-cat-formatter
rspec
rspec-github-actions-formatter
rubocop
rubocop-performance
rubocop-rspec

RUBY VERSION
ruby 3.3.0p0

BUNDLED WITH
2.2.3
2.5.6
4 changes: 2 additions & 2 deletions year_2015/day_06.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Year2015
class Day06
CAPTURE_ONE = /(turn on|turn off|toggle) (\d+,\d+) through (\d+,\d+)/.freeze
CAPTURE_ONE = /(turn on|turn off|toggle) (\d+,\d+) through (\d+,\d+)/

def modify_lines(from, to, &_block)
def modify_lines(from, to)
from_x, from_y = from.split(',').map(&:to_i)
to_x, to_y = to.split(',').map(&:to_i)
from_x.upto(to_x) do |i|
Expand Down
8 changes: 4 additions & 4 deletions year_2023/day_02.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ class Line
attr_reader :line

RED_MAX = 12
RED_REG = /(\d+) red/.freeze
RED_REG = /(\d+) red/
GREEN_MAX = 13
GREEN_REG = /(\d+) green/.freeze
GREEN_REG = /(\d+) green/
BLUE_MAX = 14
BLUE_REG = /(\d+) blue/.freeze
ID_REG = /^Game (\d+):/.freeze
BLUE_REG = /(\d+) blue/
ID_REG = /^Game (\d+):/

def initialize(input_line)
@line = input_line
Expand Down

0 comments on commit 3679ad8

Please sign in to comment.