Skip to content

Commit

Permalink
chore: upgrade to Ruby 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraichen committed Jan 23, 2023
1 parent 4a736f5 commit d6146dd
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push, pull_request]
jobs:
rspec:
name: rspec
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

services:
postgres:
Expand All @@ -26,11 +26,11 @@ jobs:
- uses: actions/checkout@master
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: '3.2'
bundler-cache: true
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: '18'
- uses: c-hive/gha-yarn-cache@v2
- run: yarn install
- run: yarn build
Expand All @@ -39,12 +39,12 @@ jobs:

rubocop:
name: rubocop
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@master
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: '3.2'
bundler-cache: true
- run: bundle exec rubocop --color --parallel --fail-level E
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
--color
--require spec_helper
--backtrace
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.7
3.2.0
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

source 'https://rubygems.org'

ruby '~> 3.2'

gem 'puma', '~> 6.0'
gem 'rails', '~> 7.0.0'
gem 'unicorn', '~> 6.0'
Expand Down
7 changes: 5 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ GEM
rspec-mocks (~> 3.11)
rspec-support (~> 3.11)
rspec-support (3.12.0)
rubocop (1.43.0)
rubocop (1.44.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
Expand Down Expand Up @@ -396,5 +396,8 @@ DEPENDENCIES
uuid4 (~> 1.3)
web-console (>= 3.3.0)

RUBY VERSION
ruby 3.2.0p0

BUNDLED WITH
2.3.26
2.4.5
2 changes: 1 addition & 1 deletion app/models/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def fetch(name:, platform:)
# We do need `upsert` here for performance reasons.
# rubocop:disable Rails/SkipsModelValidations
find_by(name: name, platform_id: platform) ||
upsert(name: name, platform_id: platform)
upsert({name: name, platform_id: platform})
# rubocop:enable Rails/SkipsModelValidations
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def to_param
class << self
def fetch(name:)
# rubocop:disable Rails/SkipsModelValidations
find_by(name: name) || upsert(name: name)
find_by(name: name) || upsert({name: name})
# rubocop:enable Rails/SkipsModelValidations
end
end
Expand Down

0 comments on commit d6146dd

Please sign in to comment.