Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Ruby 3.2 #627

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
fail-fast: false
matrix:
include:
- { ruby: 2.7 }
- { ruby: 2.7, gemfile: 'gemfiles/rails_7.gemfile' }
- { ruby: 2.7, gemfile: 'gemfiles/rails_main.gemfile' }
- { ruby: 3.2 }
- { ruby: 3.2, gemfile: 'gemfiles/rails_7.gemfile' }
- { ruby: 3.2, gemfile: 'gemfiles/rails_main.gemfile' }

services:
postgres:
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
gem 'omniauth-rails_csrf_protection'

gem 'scenic'
gem 'net-imap', require: false

Check notice on line 59 in Gemfile

View workflow job for this annotation

GitHub Actions / rubocop

[rubocop] Gemfile#L59 <Bundler/OrderedGems>

Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem `net-imap` should appear before `scenic`.
Raw output
Gemfile:59:1: C: Bundler/OrderedGems: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem `net-imap` should appear before `scenic`.
gem 'net-pop', require: false
gem 'net-smtp', require: false

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger
Expand Down
23 changes: 19 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ GEM
concurrent-ruby (1.1.10)
connection_pool (2.2.5)
crass (1.0.6)
date (3.4.1)
diff-lcs (1.5.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
Expand All @@ -101,6 +102,10 @@ GEM
ruby2_keywords (>= 0.0.4)
faraday-net_http (2.0.2)
ffi (1.17.0)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
fugit (1.5.3)
et-orbi (~> 1, >= 1.2.7)
raabro (~> 1.4)
Expand Down Expand Up @@ -138,6 +143,7 @@ GEM
activesupport (>= 5.0.0)
json (2.5.1)
jwt (2.2.3)
libv8-node (16.10.0.0)
libv8-node (16.10.0.0-aarch64-linux)
libv8-node (16.10.0.0-arm64-darwin)
libv8-node (16.10.0.0-x86_64-darwin)
Expand All @@ -163,15 +169,20 @@ GEM
msgpack (1.5.1)
multi_json (1.15.0)
multi_xml (0.6.0)
net-imap (0.5.2)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
net-protocol
netrc (0.11.0)
nio4r (2.7.4)
nokogiri (1.13.6)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.13.6-aarch64-linux)
racc (~> 1.4)
nokogiri (1.13.6-x86_64-linux)
racc (~> 1.4)
oauth2 (1.4.9)
faraday (>= 0.17.3, < 3.0)
jwt (>= 1.0, < 3.0)
Expand Down Expand Up @@ -333,6 +344,7 @@ GEM
thwait (0.2.0)
e2mmap
tilt (2.0.10)
timeout (0.4.3)
ttfunk (1.7.0)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
Expand Down Expand Up @@ -375,6 +387,9 @@ DEPENDENCIES
jbuilder (~> 2.11)
listen (>= 3.0.5, < 3.8)
mini_racer
net-imap
net-pop
net-smtp
omniauth (~> 2.0.4)
omniauth-google-oauth2
omniauth-rails_csrf_protection
Expand Down
2 changes: 1 addition & 1 deletion app/workers/import_disclosure_log_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ImportDisclosureLogWorker

def perform(duration = nil)
@duration = duration
DisclosureLog.new(arguments).import!
DisclosureLog.new(**arguments).import!
end

private
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7-bullseye
FROM ruby:3.2-bullseye

ENV DOCKER 1
ENV DEBIAN_FRONTEND noninteractive
Expand Down
3 changes: 3 additions & 0 deletions gemfiles/rails_7.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ DEPENDENCIES
jbuilder (~> 2.11)
listen (>= 3.0.5, < 3.8)
mini_racer
net-imap
net-pop
net-smtp
omniauth (~> 2.0.4)
omniauth-google-oauth2
omniauth-rails_csrf_protection
Expand Down
3 changes: 3 additions & 0 deletions gemfiles/rails_main.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,9 @@ DEPENDENCIES
jbuilder (~> 2.11)
listen (>= 3.0.5, < 3.8)
mini_racer
net-imap
net-pop
net-smtp
omniauth (~> 2.0.4)
omniauth-google-oauth2
omniauth-rails_csrf_protection
Expand Down
4 changes: 2 additions & 2 deletions spec/services/generate_foi_suggestion_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def suggest_all(body = nil, request: nil)
described_class.from_request(request)
end

def suggest(*args)
suggest_all(*args).first
def suggest(*args, **kwargs)
suggest_all(*args, **kwargs).first
end

context 'resources with keywords' do
Expand Down
2 changes: 1 addition & 1 deletion spec/workers/import_disclosure_log_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

context 'no duration' do
it 'calls #import! on DisclosureLog instance without duration' do
expect(DisclosureLog).to receive(:new).with({}).and_return(log)
expect(DisclosureLog).to receive(:new).with(no_args).and_return(log)
expect(log).to receive(:import!)
perform
end
Expand Down
Loading