diff --git a/CHANGELOG.md b/CHANGELOG.md index 08a4a5fc..7f50e276 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,36 @@ **Merged pull requests:** +- Bump net-imap from 0.4.14 to 0.4.15 [\#836](https://github.com/DEFRA/flood-risk-engine/pull/836) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rexml from 3.3.5 to 3.3.6 [\#833](https://github.com/DEFRA/flood-risk-engine/pull/833) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump vcr from 6.2.0 to 6.3.1 [\#832](https://github.com/DEFRA/flood-risk-engine/pull/832) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump shoulda-matchers from 6.2.0 to 6.4.0 [\#830](https://github.com/DEFRA/flood-risk-engine/pull/830) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rspec-rails from 6.1.3 to 6.1.4 [\#829](https://github.com/DEFRA/flood-risk-engine/pull/829) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump govuk\_design\_system\_formbuilder from 5.4.1 to 5.5.0 [\#827](https://github.com/DEFRA/flood-risk-engine/pull/827) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rubocop from 1.65.0 to 1.65.1 [\#823](https://github.com/DEFRA/flood-risk-engine/pull/823) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump notifications-ruby-client from 6.1.0 to 6.2.0 [\#821](https://github.com/DEFRA/flood-risk-engine/pull/821) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pg from 1.5.6 to 1.5.7 [\#820](https://github.com/DEFRA/flood-risk-engine/pull/820) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump nokogiri from 1.16.6 to 1.16.7 [\#819](https://github.com/DEFRA/flood-risk-engine/pull/819) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rexml from 3.3.1 to 3.3.2 [\#818](https://github.com/DEFRA/flood-risk-engine/pull/818) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rgeo-geojson from 2.1.1 to 2.2.0 [\#817](https://github.com/DEFRA/flood-risk-engine/pull/817) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump govuk\_design\_system\_formbuilder from 5.4.0 to 5.4.1 [\#816](https://github.com/DEFRA/flood-risk-engine/pull/816) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump phonelib from 0.8.9 to 0.9.1 [\#815](https://github.com/DEFRA/flood-risk-engine/pull/815) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump bullet from 7.1.6 to 7.2.0 [\#814](https://github.com/DEFRA/flood-risk-engine/pull/814) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rubocop from 1.64.1 to 1.65.0 [\#812](https://github.com/DEFRA/flood-risk-engine/pull/812) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump phonelib from 0.8.8 to 0.8.9 [\#810](https://github.com/DEFRA/flood-risk-engine/pull/810) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump webmock from 3.23.0 to 3.23.1 [\#809](https://github.com/DEFRA/flood-risk-engine/pull/809) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rspec-rails from 6.1.2 to 6.1.3 [\#808](https://github.com/DEFRA/flood-risk-engine/pull/808) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rubocop-rails from 2.24.1 to 2.25.1 [\#807](https://github.com/DEFRA/flood-risk-engine/pull/807) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump net-imap from 0.4.10 to 0.4.14 [\#806](https://github.com/DEFRA/flood-risk-engine/pull/806) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump nokogiri from 1.16.4 to 1.16.6 [\#804](https://github.com/DEFRA/flood-risk-engine/pull/804) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rails from 7.1.3.2 to 7.1.3.4 [\#801](https://github.com/DEFRA/flood-risk-engine/pull/801) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rubocop from 1.63.4 to 1.64.1 [\#796](https://github.com/DEFRA/flood-risk-engine/pull/796) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump notifications-ruby-client from 6.0.0 to 6.1.0 [\#793](https://github.com/DEFRA/flood-risk-engine/pull/793) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Update CHANGELOG [\#792](https://github.com/DEFRA/flood-risk-engine/pull/792) ([PaulDoyle-DEFRA](https://github.com/PaulDoyle-DEFRA)) +- Bump govuk\_design\_system\_formbuilder from 5.3.3 to 5.4.0 [\#791](https://github.com/DEFRA/flood-risk-engine/pull/791) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump rexml from 3.2.6 to 3.2.8 [\#788](https://github.com/DEFRA/flood-risk-engine/pull/788) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump nokogiri from 1.16.4 to 1.16.5 [\#787](https://github.com/DEFRA/flood-risk-engine/pull/787) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump activerecord-postgis-adapter from 9.0.1 to 9.0.2 [\#783](https://github.com/DEFRA/flood-risk-engine/pull/783) ([dependabot[bot]](https://github.com/apps/dependabot)) - Cleanup [\#781](https://github.com/DEFRA/flood-risk-engine/pull/781) ([PaulDoyle-DEFRA](https://github.com/PaulDoyle-DEFRA)) - Bump faraday-retry from 2.2.0 to 2.2.1 [\#777](https://github.com/DEFRA/flood-risk-engine/pull/777) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump govuk\_design\_system\_formbuilder from 5.2.0 to 5.3.3 [\#776](https://github.com/DEFRA/flood-risk-engine/pull/776) ([dependabot[bot]](https://github.com/apps/dependabot)) diff --git a/Gemfile b/Gemfile index 601b330a..90f94e46 100644 --- a/Gemfile +++ b/Gemfile @@ -32,8 +32,10 @@ group :development, :test do gem "github_changelog_generator" # Used to ensure the code base matches our agreed styles and conventions gem "rubocop" + gem "rubocop-capybara" gem "rubocop-rails" gem "rubocop-rspec" + gem "rubocop-rspec_rails" gem "sass-rails", "~> 5" end diff --git a/Gemfile.lock b/Gemfile.lock index 9ea27d1d..7f933459 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,7 +3,7 @@ PATH specs: flood_risk_engine (1.2) aasm (~> 5.5) - activerecord-postgis-adapter + activerecord-postgis-adapter (~> 9) activerecord-session_store (~> 2) defra_ruby_address defra_ruby_alert (~> 2.1) @@ -24,7 +24,7 @@ PATH phonelib (~> 0.6) rails (~> 7.1) rgeo - rgeo-activerecord + rgeo-activerecord (~> 7) sucker_punch (~> 3) validates_email_format_of (~> 1) @@ -33,35 +33,35 @@ GEM specs: aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (7.1.3.4) - actionpack (= 7.1.3.4) - activesupport (= 7.1.3.4) + actioncable (7.1.5) + actionpack (= 7.1.5) + activesupport (= 7.1.5) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.3.4) - actionpack (= 7.1.3.4) - activejob (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) + actionmailbox (7.1.5) + actionpack (= 7.1.5) + activejob (= 7.1.5) + activerecord (= 7.1.5) + activestorage (= 7.1.5) + activesupport (= 7.1.5) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.1.3.4) - actionpack (= 7.1.3.4) - actionview (= 7.1.3.4) - activejob (= 7.1.3.4) - activesupport (= 7.1.3.4) + actionmailer (7.1.5) + actionpack (= 7.1.5) + actionview (= 7.1.5) + activejob (= 7.1.5) + activesupport (= 7.1.5) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.2) - actionpack (7.1.3.4) - actionview (= 7.1.3.4) - activesupport (= 7.1.3.4) + actionpack (7.1.5) + actionview (= 7.1.5) + activesupport (= 7.1.5) nokogiri (>= 1.8.5) racc rack (>= 2.2.4) @@ -69,27 +69,27 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.3.4) - actionpack (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) + actiontext (7.1.5) + actionpack (= 7.1.5) + activerecord (= 7.1.5) + activestorage (= 7.1.5) + activesupport (= 7.1.5) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.3.4) - activesupport (= 7.1.3.4) + actionview (7.1.5) + activesupport (= 7.1.5) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.3.4) - activesupport (= 7.1.3.4) + activejob (7.1.5) + activesupport (= 7.1.5) globalid (>= 0.3.6) - activemodel (7.1.3.4) - activesupport (= 7.1.3.4) - activerecord (7.1.3.4) - activemodel (= 7.1.3.4) - activesupport (= 7.1.3.4) + activemodel (7.1.5) + activesupport (= 7.1.5) + activerecord (7.1.5) + activemodel (= 7.1.5) + activesupport (= 7.1.5) timeout (>= 0.4.0) activerecord-postgis-adapter (3.1.2) activerecord (>= 4.2.0) @@ -101,58 +101,63 @@ GEM multi_json (~> 1.11, >= 1.11.2) rack (>= 2.0.8, < 4) railties (>= 6.1) - activestorage (7.1.3.4) - actionpack (= 7.1.3.4) - activejob (= 7.1.3.4) - activerecord (= 7.1.3.4) - activesupport (= 7.1.3.4) + activestorage (7.1.5) + actionpack (= 7.1.5) + activejob (= 7.1.5) + activerecord (= 7.1.5) + activesupport (= 7.1.5) marcel (~> 1.0) - activesupport (7.1.3.4) + activesupport (7.1.5) base64 + benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) mutex_m + securerandom (>= 0.3) tzinfo (~> 2.0) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) - airbrake (13.0.3) + airbrake (13.0.4) airbrake-ruby (~> 6.0) - airbrake-ruby (6.2.1) + airbrake-ruby (6.2.2) rbtree3 (~> 0.6) ast (2.4.2) - async (2.5.1) - console (~> 1.10) - io-event (~> 1.1) - timers (~> 4.1) - async-http (0.60.1) - async (>= 1.25) - async-io (>= 1.28) - async-pool (>= 0.2) - protocol-http (~> 0.24.0) - protocol-http1 (~> 0.15.0) - protocol-http2 (~> 0.15.0) - traces (>= 0.8.0) - async-http-faraday (0.12.0) + async (2.21.1) + console (~> 1.29) + fiber-annotation + io-event (~> 1.6, >= 1.6.5) + async-http (0.86.0) + async (>= 2.10.2) + async-pool (~> 0.9) + io-endpoint (~> 0.14) + io-stream (~> 0.6) + metrics (~> 0.12) + protocol-http (~> 0.43) + protocol-http1 (>= 0.28.1) + protocol-http2 (~> 0.22) + traces (~> 0.10) + async-http-faraday (0.19.0) async-http (~> 0.42) faraday - async-io (1.35.0) - async - async-pool (0.4.0) + async-pool (0.10.2) async (>= 1.25) - autoprefixer-rails (10.4.13.0) + traces + autoprefixer-rails (10.4.19.0) execjs (~> 2) awesome_print (1.9.2) base64 (0.2.0) + benchmark (0.4.0) bigdecimal (3.1.8) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) builder (3.3.0) - bullet (7.2.0) + bullet (8.0.0) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) byebug (11.1.3) @@ -165,18 +170,19 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - cgi (0.3.6) + cgi (0.4.1) cliver (0.3.2) concurrent-ruby (1.3.4) connection_pool (2.4.1) - console (1.17.0) + console (1.29.2) fiber-annotation - fiber-local + fiber-local (~> 1.1) + json crack (1.0.0) bigdecimal rexml crass (1.0.6) - date (3.3.4) + date (3.4.1) defra_ruby_address (0.1.0) rest-client (~> 2.0) defra_ruby_alert (2.2.1) @@ -193,7 +199,7 @@ GEM rubocop-factory_bot rubocop-rake rubocop-rspec - defra_ruby_validators (2.6.0) + defra_ruby_validators (2.7.2) activemodel i18n matrix @@ -204,7 +210,7 @@ GEM validates_email_format_of dibber (0.7.0) diff-lcs (1.5.1) - docile (1.4.0) + docile (1.4.1) domain_name (0.6.20240107) dotenv (2.8.1) dotenv-rails (2.8.1) @@ -212,25 +218,38 @@ GEM railties (>= 3.2) drb (2.2.1) erubi (1.13.0) - execjs (2.8.1) - factory_bot (6.4.5) + execjs (2.10.0) + factory_bot (6.5.0) activesupport (>= 5.0.0) - factory_bot_rails (6.4.3) - factory_bot (~> 6.4) + factory_bot_rails (6.4.4) + factory_bot (~> 6.5) railties (>= 5.0.0) faker (2.23.0) i18n (>= 1.8.11, < 2) - faraday (2.9.0) - faraday-net_http (>= 2.0, < 3.2) - faraday-http-cache (2.5.0) + faraday (2.12.2) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-http-cache (2.5.1) faraday (>= 0.8) - faraday-net_http (3.1.0) - net-http + faraday-net_http (3.4.0) + net-http (>= 0.5.0) faraday-retry (2.2.1) faraday (~> 2.0) - ffi (1.15.5) + ffi (1.17.0-aarch64-linux-gnu) + ffi (1.17.0-aarch64-linux-musl) + ffi (1.17.0-arm-linux-gnu) + ffi (1.17.0-arm-linux-musl) + ffi (1.17.0-arm64-darwin) + ffi (1.17.0-x86-linux-gnu) + ffi (1.17.0-x86-linux-musl) + ffi (1.17.0-x86_64-darwin) + ffi (1.17.0-x86_64-linux-gnu) + ffi (1.17.0-x86_64-linux-musl) fiber-annotation (0.2.0) - fiber-local (1.0.0) + fiber-local (1.1.0) + fiber-storage + fiber-storage (1.0.0) github_changelog_generator (1.16.4) activesupport async (>= 1.25.0) @@ -242,34 +261,37 @@ GEM rake (>= 10.0) globalid (1.2.1) activesupport (>= 6.1) - govuk_design_system_formbuilder (5.5.0) + govuk_design_system_formbuilder (5.7.1) actionview (>= 6.1) activemodel (>= 6.1) activesupport (>= 6.1) html-attributes-utils (~> 1) - hashdiff (1.1.0) + hashdiff (1.1.2) high_voltage (3.1.2) html-attributes-utils (1.0.2) activesupport (>= 6.1.4.4) http-accept (1.7.0) - http-cookie (1.0.5) + http-cookie (1.0.8) domain_name (~> 0.5) - i18n (1.14.5) + i18n (1.14.6) concurrent-ruby (~> 1.0) - io-console (0.7.2) - io-event (1.2.2) - irb (1.14.0) + io-console (0.8.0) + io-endpoint (0.14.0) + io-event (1.7.4) + io-stream (0.6.1) + irb (1.14.1) rdoc (>= 4.0.0) reline (>= 0.4.2) jquery-rails (4.6.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (2.7.2) - jwt (2.8.2) + json (2.9.0) + jwt (2.9.3) base64 language_server-protocol (3.17.0.3) - loofah (2.22.0) + logger (1.6.2) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -279,17 +301,18 @@ GEM net-smtp marcel (1.0.4) matrix (0.4.2) - mime-types (3.5.2) + metrics (0.12.1) + mime-types (3.6.0) + logger mime-types-data (~> 3.2015) - mime-types-data (3.2024.0206) + mime-types-data (3.2024.1203) mini_mime (1.1.5) - mini_portile2 (2.8.7) - minitest (5.25.1) + minitest (5.25.4) multi_json (1.15.0) - mutex_m (0.2.0) - net-http (0.4.1) + mutex_m (0.3.0) + net-http (0.6.0) uri - net-imap (0.4.15) + net-imap (0.5.1) date net-protocol net-pop (0.1.2) @@ -299,9 +322,18 @@ GEM net-smtp (0.5.0) net-protocol netrc (0.11.0) - nio4r (2.7.3) - nokogiri (1.16.7) - mini_portile2 (~> 2.8.2) + nio4r (2.7.4) + nokogiri (1.17.0-aarch64-linux) + racc (~> 1.4) + nokogiri (1.17.0-arm-linux) + racc (~> 1.4) + nokogiri (1.17.0-arm64-darwin) + racc (~> 1.4) + nokogiri (1.17.0-x86-linux) + racc (~> 1.4) + nokogiri (1.17.0-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.17.0-x86_64-linux) racc (~> 1.4) notifications-ruby-client (6.2.0) jwt (>= 1.5, < 3) @@ -310,48 +342,49 @@ GEM sawyer (~> 0.9) os_map_ref (0.5.0) parallel (1.26.3) - parser (3.3.4.2) + parser (3.3.6.0) ast (~> 2.4.1) racc - pg (1.5.7) - phonelib (0.9.1) + pg (1.5.9) + phonelib (0.10.1) poltergeist (1.18.1) capybara (>= 2.1, < 4) cliver (~> 0.3.1) websocket-driver (>= 0.2.0) - protocol-hpack (1.4.2) - protocol-http (0.24.7) - protocol-http1 (0.15.1) + protocol-hpack (1.5.1) + protocol-http (0.47.1) + protocol-http1 (0.28.1) protocol-http (~> 0.22) - protocol-http2 (0.15.1) + protocol-http2 (0.22.0) protocol-hpack (~> 1.4) protocol-http (~> 0.18) - psych (5.1.2) + psych (5.2.1) + date stringio - public_suffix (6.0.0) + public_suffix (6.0.1) racc (1.8.1) - rack (2.2.9) + rack (2.2.10) rack-session (1.0.2) rack (< 3) rack-test (2.1.0) rack (>= 1.3) - rackup (1.0.0) + rackup (1.0.1) rack (< 3) webrick - rails (7.1.3.4) - actioncable (= 7.1.3.4) - actionmailbox (= 7.1.3.4) - actionmailer (= 7.1.3.4) - actionpack (= 7.1.3.4) - actiontext (= 7.1.3.4) - actionview (= 7.1.3.4) - activejob (= 7.1.3.4) - activemodel (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) + rails (7.1.5) + actioncable (= 7.1.5) + actionmailbox (= 7.1.5) + actionmailer (= 7.1.5) + actionpack (= 7.1.5) + actiontext (= 7.1.5) + actionview (= 7.1.5) + activejob (= 7.1.5) + activemodel (= 7.1.5) + activerecord (= 7.1.5) + activestorage (= 7.1.5) + activesupport (= 7.1.5) bundler (>= 1.15.0) - railties (= 7.1.3.4) + railties (= 7.1.5) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -360,12 +393,12 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.1) loofah (~> 2.21) - nokogiri (~> 1.14) - railties (7.1.3.4) - actionpack (= 7.1.3.4) - activesupport (= 7.1.3.4) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (7.1.5) + actionpack (= 7.1.5) + activesupport (= 7.1.5) irb rackup (>= 1.0.0) rake (>= 12.2) @@ -374,21 +407,20 @@ GEM rainbow (3.1.1) rake (13.2.1) rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) rbtree3 (0.7.1) - rdoc (6.7.0) + rdoc (6.8.1) psych (>= 4.0.0) - regexp_parser (2.9.2) - reline (0.5.9) + regexp_parser (2.9.3) + reline (0.5.12) io-console (~> 0.5) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rexml (3.3.6) - strscan + rexml (3.3.9) rgeo (3.0.1) rgeo-activerecord (8.0.0) activerecord (>= 7.0) @@ -400,18 +432,18 @@ GEM rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.0) + rspec-core (3.13.2) rspec-support (~> 3.13.0) - rspec-expectations (3.13.1) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-html-matchers (0.10.0) nokogiri (~> 1) rspec (>= 3.0.0.a) - rspec-mocks (3.13.1) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (6.1.4) + rspec-rails (6.1.5) actionpack (>= 6.1) activesupport (>= 6.1) railties (>= 6.1) @@ -419,38 +451,35 @@ GEM rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) rspec-support (~> 3.13) - rspec-support (3.13.1) - rubocop (1.65.1) + rspec-support (3.13.2) + rubocop (1.69.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.36.2, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.1) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.36.2) parser (>= 3.3.1.0) - rubocop-capybara (2.20.0) - rubocop (~> 1.41) - rubocop-factory_bot (2.25.1) + rubocop-capybara (2.21.0) rubocop (~> 1.41) - rubocop-rails (2.25.1) + rubocop-factory_bot (2.26.1) + rubocop (~> 1.61) + rubocop-rails (2.27.0) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.33.0, < 2.0) + rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.29.1) - rubocop (~> 1.40) - rubocop-capybara (~> 2.17) - rubocop-factory_bot (~> 2.22) - rubocop-rspec_rails (~> 2.28) - rubocop-rspec_rails (2.28.3) - rubocop (~> 1.40) + rubocop-rspec (3.2.0) + rubocop (~> 1.61) + rubocop-rspec_rails (2.30.0) + rubocop (~> 1.61) + rubocop-rspec (~> 3, >= 3.0.1) ruby-progressbar (1.13.0) sass (3.7.4) sass-listen (~> 4.0.0) @@ -468,6 +497,7 @@ GEM sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) + securerandom (0.4.0) shoulda-matchers (6.4.0) activesupport (>= 5.2.0) simplecov (0.17.1) @@ -475,52 +505,61 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) - simpleidn (0.2.1) - unf (~> 0.1.4) - sprockets (3.7.2) + simpleidn (0.2.3) + sprockets (3.7.5) + base64 concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) - stringio (3.1.1) - strscan (3.1.0) + stringio (3.1.2) sucker_punch (3.2.0) concurrent-ruby (~> 1.0) - thor (1.3.1) - tilt (2.2.0) - timeout (0.4.1) - timers (4.3.5) - traces (0.9.1) + thor (1.3.2) + tilt (2.4.0) + timeout (0.4.2) + traces (0.14.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) uk_postcode (2.1.8) - unf (0.1.4) - unf_ext - unf_ext (0.0.9.1) - unicode-display_width (2.5.0) + unicode-display_width (3.1.2) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) uniform_notifier (1.16.0) - uri (0.13.0) + uri (1.0.2) validates_email_format_of (1.8.2) i18n (>= 0.8.0) simpleidn vcr (6.3.1) base64 - webmock (3.23.1) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.8.1) + webrick (1.9.1) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.17) + zeitwerk (2.7.1) PLATFORMS - ruby + aarch64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86-linux + x86-linux-gnu + x86-linux-musl + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES awesome_print @@ -542,8 +581,10 @@ DEPENDENCIES rspec-html-matchers rspec-rails (~> 6) rubocop + rubocop-capybara rubocop-rails rubocop-rspec + rubocop-rspec_rails sass-rails (~> 5) shoulda-matchers (~> 6) simplecov (~> 0.17.1) @@ -551,4 +592,4 @@ DEPENDENCIES webmock (~> 3) BUNDLED WITH - 2.3.13 + 2.5.8 diff --git a/app/models/flood_risk_engine/address.rb b/app/models/flood_risk_engine/address.rb index 9acdab23..4d919196 100644 --- a/app/models/flood_risk_engine/address.rb +++ b/app/models/flood_risk_engine/address.rb @@ -12,7 +12,7 @@ class Address < ApplicationRecord # Covers the RCDP Types # - enum address_type: { + enum :address_type, { primary: 0, secondary: 1, site: 2, diff --git a/app/models/flood_risk_engine/contact.rb b/app/models/flood_risk_engine/contact.rb index e884bce5..bf6f8dbb 100644 --- a/app/models/flood_risk_engine/contact.rb +++ b/app/models/flood_risk_engine/contact.rb @@ -7,7 +7,7 @@ class Contact < ApplicationRecord has_one :organisation, dependent: :restrict_with_exception has_one :address, as: :addressable, dependent: :restrict_with_exception - enum contact_type: { + enum :contact_type, { individual: 0, partner: 1, employee: 2, @@ -18,9 +18,9 @@ class Contact < ApplicationRecord } # Derived from RCDP customer data model - enum title: { "na" => 0, "Mr" => 1, "Mrs" => 2, "Miss" => 3, "Ms" => 4, "Dr" => 5, "Rev" => 6, "Sir" => 7, - "Lady" => 8, "Lord" => 9, "Captain" => 10, "Major" => 11, "Professor" => 12, "Dame" => 13, - "Colonel" => 14 } + enum :title, { "na" => 0, "Mr" => 1, "Mrs" => 2, "Miss" => 3, "Ms" => 4, "Dr" => 5, "Rev" => 6, "Sir" => 7, + "Lady" => 8, "Lord" => 9, "Captain" => 10, "Major" => 11, "Professor" => 12, "Dame" => 13, + "Colonel" => 14 } after_save do organisation.try(:update_searchable_content) diff --git a/app/models/flood_risk_engine/enrollment_exemption.rb b/app/models/flood_risk_engine/enrollment_exemption.rb index 18539241..2aa18d1c 100644 --- a/app/models/flood_risk_engine/enrollment_exemption.rb +++ b/app/models/flood_risk_engine/enrollment_exemption.rb @@ -8,7 +8,7 @@ class EnrollmentExemption < ApplicationRecord belongs_to :exemption has_many :comments, as: :commentable - enum status: { + enum :status, { building: 0, # FO: anywhere before the confirmation step pending: 1, # FO: enrollment submitted and awaiting BO processing being_processed: 2, # BO: prevents another admin user from processing it @@ -19,12 +19,12 @@ class EnrollmentExemption < ApplicationRecord deregistered: 7 # BO: approved only } - enum deregister_reason: { + enum :deregister_reason, { registered_in_error: 0, operator_failings: 1 } - enum assistance_mode: { + enum :assistance_mode, { unassisted: 0, fully_assisted: 1, partial: 2, diff --git a/app/models/flood_risk_engine/organisation.rb b/app/models/flood_risk_engine/organisation.rb index 812e31b9..1b2756c1 100644 --- a/app/models/flood_risk_engine/organisation.rb +++ b/app/models/flood_risk_engine/organisation.rb @@ -10,7 +10,7 @@ class Organisation < ApplicationRecord as: :addressable, dependent: :restrict_with_exception - enum org_type: { + enum :org_type, { local_authority: 0, limited_company: 1, limited_liability_partnership: 2, diff --git a/app/models/flood_risk_engine/transient_address.rb b/app/models/flood_risk_engine/transient_address.rb index 263a67d4..44f1bc9f 100644 --- a/app/models/flood_risk_engine/transient_address.rb +++ b/app/models/flood_risk_engine/transient_address.rb @@ -6,7 +6,7 @@ class TransientAddress < ApplicationRecord belongs_to :addressable, polymorphic: true - enum address_type: { unknown: 0, operator: 1, contact: 2, site: 3 } + enum :address_type, { unknown: 0, operator: 1, contact: 2, site: 3 } def manual? uprn.blank? diff --git a/app/services/flood_risk_engine/send_enrollment_submitted_email.rb b/app/services/flood_risk_engine/send_enrollment_submitted_email.rb index 83475d25..f04af086 100644 --- a/app/services/flood_risk_engine/send_enrollment_submitted_email.rb +++ b/app/services/flood_risk_engine/send_enrollment_submitted_email.rb @@ -29,7 +29,7 @@ def validate_enrollment def distinct_recipients [primary_contact_email, secondary_contact_email] - .select(&:present?) + .compact_blank .map(&:strip) .map(&:downcase) .uniq diff --git a/flood_risk_engine.gemspec b/flood_risk_engine.gemspec index ad75ec70..600b9108 100644 --- a/flood_risk_engine.gemspec +++ b/flood_risk_engine.gemspec @@ -52,9 +52,9 @@ Gem::Specification.new do |s| s.add_dependency "validates_email_format_of", "~> 1" # for handling Water Managment Areas spatial data - s.add_dependency "activerecord-postgis-adapter" + s.add_dependency "activerecord-postgis-adapter", "~> 9" s.add_dependency "rgeo" - s.add_dependency "rgeo-activerecord" + s.add_dependency "rgeo-activerecord", "~> 7" s.add_dependency "matrix", "~> 0.4" s.add_dependency "net-imap", "~> 0.2"