diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e1e3041..962a3fab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/Gemfile b/Gemfile index 508d613e..f0242465 100644 --- a/Gemfile +++ b/Gemfile @@ -56,6 +56,9 @@ gem 'omniauth-google-oauth2' gem 'omniauth-rails_csrf_protection' gem 'scenic' +gem 'net-imap', require: false +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 diff --git a/Gemfile.lock b/Gemfile.lock index e6f570a0..8f5ddfe2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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 diff --git a/app/workers/import_disclosure_log_worker.rb b/app/workers/import_disclosure_log_worker.rb index ff9cf185..0066060b 100644 --- a/app/workers/import_disclosure_log_worker.rb +++ b/app/workers/import_disclosure_log_worker.rb @@ -8,7 +8,7 @@ class ImportDisclosureLogWorker def perform(duration = nil) @duration = duration - DisclosureLog.new(arguments).import! + DisclosureLog.new(**arguments).import! end private diff --git a/docker/Dockerfile b/docker/Dockerfile index 8e0b7454..3388471e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.7-bullseye +FROM ruby:3.2-bullseye ENV DOCKER 1 ENV DEBIAN_FRONTEND noninteractive diff --git a/gemfiles/rails_7.gemfile.lock b/gemfiles/rails_7.gemfile.lock index adb48d82..b3a1c8fd 100644 --- a/gemfiles/rails_7.gemfile.lock +++ b/gemfiles/rails_7.gemfile.lock @@ -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 diff --git a/gemfiles/rails_main.gemfile.lock b/gemfiles/rails_main.gemfile.lock index de908287..9ce227f5 100644 --- a/gemfiles/rails_main.gemfile.lock +++ b/gemfiles/rails_main.gemfile.lock @@ -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 diff --git a/spec/services/generate_foi_suggestion_spec.rb b/spec/services/generate_foi_suggestion_spec.rb index 5289d69e..ac0e3065 100644 --- a/spec/services/generate_foi_suggestion_spec.rb +++ b/spec/services/generate_foi_suggestion_spec.rb @@ -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 diff --git a/spec/workers/import_disclosure_log_worker_spec.rb b/spec/workers/import_disclosure_log_worker_spec.rb index ccad8ce5..589a5d0a 100644 --- a/spec/workers/import_disclosure_log_worker_spec.rb +++ b/spec/workers/import_disclosure_log_worker_spec.rb @@ -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