From 79f2a5f6c3357d63f92423a2b173893f4c4d06d8 Mon Sep 17 00:00:00 2001 From: eliegaboriau <93646702+eliegaboriau@users.noreply.github.com> Date: Thu, 12 Jan 2023 17:18:11 +0100 Subject: [PATCH] bump to 0.27 (#11) --- .rubocop-disabled.yml | 11 + .rubocop.yml | 1 + .ruby-version | 2 +- Gemfile.lock | 585 ++++++++++-------- .../decidim/admin/exports_controller.rb | 31 - .../authorization_modals/_content.html.erb | 45 -- .../verifications/authorizations/new.html.erb | 4 +- config/i18n-tasks.yml | 4 + decidim-phone_authorization_handler.gemspec | 1 + .../phone_authorization_handler/version.rb | 2 +- spec/lib/decidim/exporters/csv_spec.rb | 4 +- spec/lib/decidim/exporters/excel_spec.rb | 4 +- .../phone_authorization_handler_spec.rb | 4 +- .../decidim/open_data_exporter_spec.rb | 2 +- .../phone_authorization_handler_spec.rb | 14 +- .../proposals/proposal_serializer_spec.rb | 2 +- .../manage_system_authorizations_spec.rb | 2 +- 17 files changed, 352 insertions(+), 366 deletions(-) create mode 100644 .rubocop-disabled.yml delete mode 100644 app/controllers/decidim/admin/exports_controller.rb delete mode 100644 app/views/decidim/authorization_modals/_content.html.erb diff --git a/.rubocop-disabled.yml b/.rubocop-disabled.yml new file mode 100644 index 0000000..de7949f --- /dev/null +++ b/.rubocop-disabled.yml @@ -0,0 +1,11 @@ +Style/OpenStructUse: + Enabled: false + +Gemspec/RequireMFA: + Enabled: false + +Naming/MemoizedInstanceVariableName: + Enabled: false + +RSpec/VerifiedDoubleReference: + Enabled: false diff --git a/.rubocop.yml b/.rubocop.yml index 870c0b9..0975cd3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,4 @@ inherit_from: - .rubocop_ruby.yml - .rubocop_rails.yml + - .rubocop-disabled.yml diff --git a/.ruby-version b/.ruby-version index 860487c..cb2b00e 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.1 +3.0.1 diff --git a/Gemfile.lock b/Gemfile.lock index d64298e..2c5bcd7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,43 +12,45 @@ PATH remote: . specs: decidim-phone_authorization_handler (1.0.0) - decidim-core (~> 0.26) + decidim-core (~> 0.27) GEM remote: https://rubygems.org/ specs: - actioncable (6.0.5) - actionpack (= 6.0.5) + actioncable (6.1.7) + actionpack (= 6.1.7) + activesupport (= 6.1.7) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.5) - actionpack (= 6.0.5) - activejob (= 6.0.5) - activerecord (= 6.0.5) - activestorage (= 6.0.5) - activesupport (= 6.0.5) + actionmailbox (6.1.7) + actionpack (= 6.1.7) + activejob (= 6.1.7) + activerecord (= 6.1.7) + activestorage (= 6.1.7) + activesupport (= 6.1.7) mail (>= 2.7.1) - actionmailer (6.0.5) - actionpack (= 6.0.5) - actionview (= 6.0.5) - activejob (= 6.0.5) + actionmailer (6.1.7) + actionpack (= 6.1.7) + actionview (= 6.1.7) + activejob (= 6.1.7) + activesupport (= 6.1.7) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.5) - actionview (= 6.0.5) - activesupport (= 6.0.5) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.7) + actionview (= 6.1.7) + activesupport (= 6.1.7) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.5) - actionpack (= 6.0.5) - activerecord (= 6.0.5) - activestorage (= 6.0.5) - activesupport (= 6.0.5) + actiontext (6.1.7) + actionpack (= 6.1.7) + activerecord (= 6.1.7) + activestorage (= 6.1.7) + activesupport (= 6.1.7) nokogiri (>= 1.8.5) - actionview (6.0.5) - activesupport (= 6.0.5) + actionview (6.1.7) + activesupport (= 6.1.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -56,31 +58,33 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.0.5) - activesupport (= 6.0.5) + activejob (6.1.7) + activesupport (= 6.1.7) globalid (>= 0.3.6) - activemodel (6.0.5) - activesupport (= 6.0.5) - activerecord (6.0.5) - activemodel (= 6.0.5) - activesupport (= 6.0.5) - activestorage (6.0.5) - actionpack (= 6.0.5) - activejob (= 6.0.5) - activerecord (= 6.0.5) + activemodel (6.1.7) + activesupport (= 6.1.7) + activerecord (6.1.7) + activemodel (= 6.1.7) + activesupport (= 6.1.7) + activestorage (6.1.7) + actionpack (= 6.1.7) + activejob (= 6.1.7) + activerecord (= 6.1.7) + activesupport (= 6.1.7) marcel (~> 1.0) - activesupport (6.0.5) + mini_mime (>= 1.1.0) + activesupport (6.1.7) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) acts_as_list (0.9.19) activerecord (>= 3.0) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) - axe-core-api (4.4.1) + axe-core-api (4.5.1) dumb_delegator virtus axe-core-rspec (4.1.0) @@ -102,12 +106,12 @@ GEM parser (>= 2.4) smart_properties bindex (0.8.1) - bootsnap (1.12.0) + bootsnap (1.15.0) msgpack (~> 1.2) browser (2.7.1) builder (3.2.4) byebug (11.1.3) - capybara (3.37.1) + capybara (3.38.0) addressable matrix mini_mime (>= 0.1.3) @@ -116,7 +120,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (2.2.2) + carrierwave (2.2.3) activemodel (>= 5.0.0) activesupport (>= 5.0.0) addressable (~> 2.6) @@ -136,9 +140,9 @@ GEM actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) charlock_holmes (0.7.7) - chef-utils (17.10.0) + chef-utils (18.1.0) concurrent-ruby - childprocess (3.0.0) + childprocess (4.1.0) coercible (1.0.0) descendants_tracker (~> 0.0.1) coffee-rails (5.0.0) @@ -148,65 +152,67 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) + commonmarker (0.23.6) concurrent-ruby (1.1.10) crack (0.4.5) rexml crass (1.0.6) - css_parser (1.11.0) + css_parser (1.14.0) addressable - date_validator (0.9.0) - activemodel - activesupport + date (3.3.3) + date_validator (0.12.0) + activemodel (>= 3) + activesupport (>= 3) db-query-matchers (0.10.0) activesupport (>= 4.0, < 7) rspec (~> 3.0) - decidim (0.26.2) - decidim-accountability (= 0.26.2) - decidim-admin (= 0.26.2) - decidim-api (= 0.26.2) - decidim-assemblies (= 0.26.2) - decidim-blogs (= 0.26.2) - decidim-budgets (= 0.26.2) - decidim-comments (= 0.26.2) - decidim-core (= 0.26.2) - decidim-debates (= 0.26.2) - decidim-forms (= 0.26.2) - decidim-generators (= 0.26.2) - decidim-meetings (= 0.26.2) - decidim-pages (= 0.26.2) - decidim-participatory_processes (= 0.26.2) - decidim-proposals (= 0.26.2) - decidim-sortitions (= 0.26.2) - decidim-surveys (= 0.26.2) - decidim-system (= 0.26.2) - decidim-templates (= 0.26.2) - decidim-verifications (= 0.26.2) - decidim-accountability (0.26.2) - decidim-comments (= 0.26.2) - decidim-core (= 0.26.2) - decidim-admin (0.26.2) + decidim (0.27.1) + decidim-accountability (= 0.27.1) + decidim-admin (= 0.27.1) + decidim-api (= 0.27.1) + decidim-assemblies (= 0.27.1) + decidim-blogs (= 0.27.1) + decidim-budgets (= 0.27.1) + decidim-comments (= 0.27.1) + decidim-core (= 0.27.1) + decidim-debates (= 0.27.1) + decidim-forms (= 0.27.1) + decidim-generators (= 0.27.1) + decidim-meetings (= 0.27.1) + decidim-pages (= 0.27.1) + decidim-participatory_processes (= 0.27.1) + decidim-proposals (= 0.27.1) + decidim-sortitions (= 0.27.1) + decidim-surveys (= 0.27.1) + decidim-system (= 0.27.1) + decidim-templates (= 0.27.1) + decidim-verifications (= 0.27.1) + decidim-accountability (0.27.1) + decidim-comments (= 0.27.1) + decidim-core (= 0.27.1) + decidim-admin (0.27.1) active_link_to (~> 1.0) - decidim-core (= 0.26.2) + decidim-core (= 0.27.1) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0) - decidim-api (0.26.2) + decidim-api (0.27.1) graphql (~> 1.12, < 1.13) + graphql-docs (~> 2.1.0) rack-cors (~> 1.0) + decidim-assemblies (0.27.1) + decidim-core (= 0.27.1) + decidim-blogs (0.27.1) + decidim-admin (= 0.27.1) + decidim-comments (= 0.27.1) + decidim-core (= 0.27.1) + decidim-budgets (0.27.1) + decidim-comments (= 0.27.1) + decidim-core (= 0.27.1) + decidim-comments (0.27.1) + decidim-core (= 0.27.1) redcarpet (~> 3.5, >= 3.5.1) - decidim-assemblies (0.26.2) - decidim-core (= 0.26.2) - decidim-blogs (0.26.2) - decidim-admin (= 0.26.2) - decidim-comments (= 0.26.2) - decidim-core (= 0.26.2) - decidim-budgets (0.26.2) - decidim-comments (= 0.26.2) - decidim-core (= 0.26.2) - decidim-comments (0.26.2) - decidim-core (= 0.26.2) - redcarpet (~> 3.5, >= 3.5.1) - decidim-core (0.26.2) + decidim-core (0.27.1) active_link_to (~> 1.0) acts_as_list (~> 0.9) batch-loader (~> 1.2) @@ -215,17 +221,17 @@ GEM cells-erb (~> 0.1.0) cells-rails (~> 0.1.3) charlock_holmes (~> 0.7) - date_validator (~> 0.9.0) - decidim-api (= 0.26.2) + date_validator (~> 0.12.0) + decidim-api (= 0.27.1) devise (~> 4.7) devise-i18n (~> 1.2) diffy (~> 3.3) doorkeeper (~> 5.1) doorkeeper-i18n (~> 4.0) - file_validators (~> 2.1) + file_validators (~> 3.0) fog-local (~> 0.6) - foundation_rails_helper - geocoder (~> 1.7.5) + foundation_rails_helper (~> 4.0) + geocoder (~> 1.8) hashdiff (>= 0.4.0, < 2.0.0) invisible_captcha (~> 0.12) kaminari (~> 1.2, >= 1.2.1) @@ -244,90 +250,89 @@ GEM premailer-rails (~> 1.10) rack (~> 2.2, >= 2.2.3) rack-attack (~> 6.0) - rails (~> 6.0.4) + rails (~> 6.1.0) rails-i18n (~> 6.0) ransack (~> 2.4.1) - rectify (~> 0.13.0) redis (~> 4.1) request_store (~> 1.5.0) rubyXL (~> 3.4) rubyzip (~> 2.0) - searchlight (~> 4.1) seven_zip_ruby (~> 1.3) social-share-button (~> 1.2, >= 1.2.1) valid_email2 (~> 2.1) webpacker (= 6.0.0.rc.5) + webpush (~> 1.1) wisper (~> 2.0) - decidim-debates (0.26.2) - decidim-comments (= 0.26.2) - decidim-core (= 0.26.2) - decidim-dev (0.26.2) + decidim-debates (0.27.1) + decidim-comments (= 0.27.1) + decidim-core (= 0.27.1) + decidim-dev (0.27.1) axe-core-rspec (~> 4.1.0) byebug (~> 11.0) capybara (~> 3.24) db-query-matchers (~> 0.10.0) - decidim (= 0.26.2) + decidim (= 0.27.1) erb_lint (~> 0.0.35) factory_bot_rails (~> 4.8) i18n-tasks (~> 0.9.18) mdl (~> 0.5) - nokogiri (~> 1.12) + nokogiri (~> 1.13) + parallel_tests (~> 3.7) puma (~> 5.0) rails-controller-testing (~> 1.0) - rspec-cells (~> 0.3.4) + rspec-cells (~> 0.3.7) rspec-html-matchers (~> 0.9.1) rspec-rails (~> 4.0) rspec-retry (~> 0.6.2) rspec_junit_formatter (~> 0.3.0) - rubocop (~> 0.92.0) - rubocop-rails (~> 2.8) - rubocop-rspec (= 1.43.2) - selenium-webdriver (~> 3.142) - simplecov (~> 0.19.0) - simplecov-cobertura (~> 1.3.1) - system_test_html_screenshots (~> 0.2) + rubocop (~> 1.28.0) + rubocop-rails (~> 2.14) + rubocop-rspec (~> 2.10) + selenium-webdriver (~> 4.1.0) + simplecov (~> 0.21.0) + simplecov-cobertura (~> 2.1.0) w3c_rspec_validators (~> 0.3.0) webmock (~> 3.6) wisper-rspec (~> 1.0) - decidim-forms (0.26.2) - decidim-core (= 0.26.2) + decidim-forms (0.27.1) + decidim-core (= 0.27.1) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.26.2) - decidim-core (= 0.26.2) - decidim-meetings (0.26.2) - decidim-core (= 0.26.2) - decidim-forms (= 0.26.2) + decidim-generators (0.27.1) + decidim-core (= 0.27.1) + decidim-meetings (0.27.1) + decidim-core (= 0.27.1) + decidim-forms (= 0.27.1) icalendar (~> 2.5) - decidim-pages (0.26.2) - decidim-core (= 0.26.2) - decidim-participatory_processes (0.26.2) - decidim-core (= 0.26.2) - decidim-proposals (0.26.2) - decidim-comments (= 0.26.2) - decidim-core (= 0.26.2) - doc2text (~> 0.4.4) + decidim-pages (0.27.1) + decidim-core (= 0.27.1) + decidim-participatory_processes (0.27.1) + decidim-core (= 0.27.1) + decidim-proposals (0.27.1) + decidim-comments (= 0.27.1) + decidim-core (= 0.27.1) + doc2text (~> 0.4.5) redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.26.2) - decidim-admin (= 0.26.2) - decidim-comments (= 0.26.2) - decidim-core (= 0.26.2) - decidim-proposals (= 0.26.2) - decidim-surveys (0.26.2) - decidim-core (= 0.26.2) - decidim-forms (= 0.26.2) - decidim-templates (= 0.26.2) - decidim-system (0.26.2) + decidim-sortitions (0.27.1) + decidim-admin (= 0.27.1) + decidim-comments (= 0.27.1) + decidim-core (= 0.27.1) + decidim-proposals (= 0.27.1) + decidim-surveys (0.27.1) + decidim-core (= 0.27.1) + decidim-forms (= 0.27.1) + decidim-templates (= 0.27.1) + decidim-system (0.27.1) active_link_to (~> 1.0) - decidim-core (= 0.26.2) + decidim-core (= 0.27.1) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0) - decidim-templates (0.26.2) - decidim-core (= 0.26.2) - decidim-forms (= 0.26.2) - decidim-verifications (0.26.2) - decidim-core (= 0.26.2) + decidim-templates (0.27.1) + decidim-core (= 0.27.1) + decidim-forms (= 0.27.1) + decidim-verifications (0.27.1) + decidim-core (= 0.27.1) declarative-builder (0.1.0) declarative-option (< 0.2.0) declarative-option (0.1.0) @@ -341,7 +346,7 @@ GEM warden (~> 1.2.3) devise-i18n (1.10.2) devise (>= 4.8.0) - devise_invitable (2.0.6) + devise_invitable (2.0.7) actionmailer (>= 5.0) devise (>= 4.6) diff-lcs (1.5.0) @@ -350,11 +355,10 @@ GEM nokogiri (>= 1.13.2, < 1.14.0) rubyzip (~> 2.3.0) docile (1.4.0) - doorkeeper (5.5.4) + doorkeeper (5.6.2) railties (>= 5) doorkeeper-i18n (4.0.1) dumb_delegator (1.0.0) - equalizer (0.0.11) erb_lint (0.0.37) activesupport better_html (~> 1.0.7) @@ -365,22 +369,25 @@ GEM smart_properties erbse (0.1.4) temple - erubi (1.10.0) - excon (0.92.3) + erubi (1.12.0) + escape_utils (1.3.0) + excon (0.97.1) execjs (2.8.1) + extended-markdown-filter (0.7.0) + html-pipeline (~> 2.9) factory_bot (4.11.1) activesupport (>= 3.0.0) factory_bot_rails (4.11.1) factory_bot (~> 4.11.1) railties (>= 3.0.0) - faker (2.21.0) + faker (2.23.0) i18n (>= 1.8.11, < 2) - faraday (2.3.0) - faraday-net_http (~> 2.0) + faraday (2.7.2) + faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) - faraday-net_http (2.0.3) + faraday-net_http (3.0.2) ffi (1.15.5) - file_validators (2.3.0) + file_validators (3.0.0) activemodel (>= 3.2) mime-types (>= 1.0) fog-core (2.3.0) @@ -391,16 +398,29 @@ GEM fog-local (0.8.0) fog-core (>= 1.27, < 3.0) formatador (1.1.0) - geocoder (1.7.5) + gemoji (3.0.1) + geocoder (1.8.1) globalid (1.0.0) activesupport (>= 5.0) graphql (1.12.24) + graphql-docs (2.1.0) + commonmarker (~> 0.16) + escape_utils (~> 1.2) + extended-markdown-filter (~> 0.4) + gemoji (~> 3.0) + graphql (~> 1.12) + html-pipeline (~> 2.9) + sass (~> 3.4) hashdiff (1.0.1) hashie (5.0.0) - highline (2.0.3) + highline (2.1.0) + hkdf (0.3.0) + html-pipeline (2.14.3) + activesupport (>= 2) + nokogiri (>= 1.4) html_tokenizer (0.0.7) htmlentities (4.3.4) - i18n (1.10.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) i18n-tasks (0.9.37) activesupport (>= 4.0.2) @@ -412,7 +432,7 @@ GEM rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - icalendar (2.7.1) + icalendar (2.8.0) ice_cube (~> 0.16) ice_cube (0.16.4) ice_nine (0.11.2) @@ -421,8 +441,8 @@ GEM ruby-vips (>= 2.0.17, < 3) invisible_captcha (0.13.0) rails (>= 3.2.0) - json (2.6.2) - jwt (2.4.1) + json (2.6.3) + jwt (2.6.0) kaminari (1.2.2) activesupport (>= 4.1.0) kaminari-actionview (= 1.2.2) @@ -439,25 +459,28 @@ GEM rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - launchy (2.5.0) - addressable (~> 2.7) + launchy (2.5.2) + addressable (~> 2.8) letter_opener (1.8.1) launchy (>= 2.2, < 3) letter_opener_web (1.4.1) actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) - listen (3.7.1) + listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.3.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.1) + mail (2.8.0) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp marcel (1.0.2) matrix (0.4.2) - mdl (0.11.0) + mdl (0.12.0) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.1) mixlib-cli (~> 2.1, >= 2.1.1) @@ -467,49 +490,61 @@ GEM mime-types (3.4.1) mime-types-data (~> 3.2015) mime-types-data (3.2022.0105) - mini_magick (4.11.0) + mini_magick (4.12.0) mini_mime (1.1.2) - mini_portile2 (2.8.0) - minitest (5.16.2) + minitest (5.17.0) mixlib-cli (2.1.8) mixlib-config (3.0.27) tomlrb mixlib-shellout (3.2.7) chef-utils - msgpack (1.5.3) - multi_json (1.15.0) + msgpack (1.6.0) multi_xml (0.6.0) mustache (1.1.1) + net-imap (0.3.4) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.1) + timeout + net-smtp (0.3.3) + net-protocol nio4r (2.5.8) - nokogiri (1.13.6) - mini_portile2 (~> 2.8.0) + nokogiri (1.13.10-x86_64-darwin) racc (~> 1.4) - nokogiri (1.13.6-x86_64-linux) + nokogiri (1.13.10-x86_64-linux) racc (~> 1.4) - oauth (0.5.10) - oauth2 (1.4.10) + oauth (1.1.0) + oauth-tty (~> 1.0, >= 1.0.1) + snaky_hash (~> 2.0) + version_gem (~> 1.1) + oauth-tty (1.0.5) + version_gem (~> 1.1, >= 1.1.1) + oauth2 (2.0.9) faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) - multi_json (~> 1.3) multi_xml (~> 0.5) - rack (>= 1.2, < 3) + rack (>= 1.2, < 4) + snaky_hash (~> 2.0) + version_gem (~> 1.1) omniauth (2.1.0) hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (1.0.1) + omniauth-google-oauth2 (1.1.1) jwt (>= 2.0) - oauth2 (~> 1.1) + oauth2 (~> 2.0.6) omniauth (~> 2.0) - omniauth-oauth2 (~> 1.7.1) + omniauth-oauth2 (~> 1.8.0) omniauth-oauth (1.2.0) oauth omniauth (>= 1.0, < 3) - omniauth-oauth2 (1.7.3) + omniauth-oauth2 (1.8.0) oauth2 (>= 1.4, < 3) - omniauth (>= 1.9, < 3) + omniauth (~> 2.0) omniauth-rails_csrf_protection (1.0.1) actionpack (>= 4.2) omniauth (~> 2.0) @@ -521,48 +556,51 @@ GEM activerecord (>= 5.2) request_store (~> 1.1) parallel (1.22.1) - parser (3.1.2.0) + parallel_tests (3.13.0) + parallel + parser (3.2.0.0) ast (~> 2.4.1) pg (1.1.4) pg_search (2.3.6) activerecord (>= 5.2) activesupport (>= 5.2) - premailer (1.16.0) + premailer (1.18.0) addressable - css_parser (>= 1.6.0) + css_parser (>= 1.12.0) htmlentities (>= 4.0.0) - premailer-rails (1.11.1) + premailer-rails (1.12.0) actionmailer (>= 3) + net-smtp premailer (~> 1.7, >= 1.7.9) - public_suffix (4.0.7) - puma (5.6.4) + public_suffix (5.0.1) + puma (5.6.5) nio4r (~> 2.0) - racc (1.6.0) - rack (2.2.4) + racc (1.6.2) + rack (2.2.5) rack-attack (6.6.1) rack (>= 1.0, < 3) rack-cors (1.1.1) rack (>= 2.0.0) - rack-protection (2.2.0) + rack-protection (3.0.5) rack - rack-proxy (0.7.2) + rack-proxy (0.7.4) rack rack-test (2.0.2) rack (>= 1.3) - rails (6.0.5) - actioncable (= 6.0.5) - actionmailbox (= 6.0.5) - actionmailer (= 6.0.5) - actionpack (= 6.0.5) - actiontext (= 6.0.5) - actionview (= 6.0.5) - activejob (= 6.0.5) - activemodel (= 6.0.5) - activerecord (= 6.0.5) - activestorage (= 6.0.5) - activesupport (= 6.0.5) - bundler (>= 1.3.0) - railties (= 6.0.5) + rails (6.1.7) + actioncable (= 6.1.7) + actionmailbox (= 6.1.7) + actionmailer (= 6.1.7) + actionpack (= 6.1.7) + actiontext (= 6.1.7) + actionview (= 6.1.7) + activejob (= 6.1.7) + activemodel (= 6.1.7) + activerecord (= 6.1.7) + activestorage (= 6.1.7) + activesupport (= 6.1.7) + bundler (>= 1.15.0) + railties (= 6.1.7) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -576,54 +614,48 @@ GEM rails-i18n (6.0.0) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 7) - railties (6.0.5) - actionpack (= 6.0.5) - activesupport (= 6.0.5) + railties (6.1.7) + actionpack (= 6.1.7) + activesupport (= 6.1.7) method_source - rake (>= 0.8.7) - thor (>= 0.20.3, < 2.0) + rake (>= 12.2) + thor (~> 1.0) rainbow (3.1.1) rake (13.0.6) ransack (2.4.2) activerecord (>= 5.2.4) activesupport (>= 5.2.4) i18n - rb-fsevent (0.11.1) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - rectify (0.13.0) - activemodel (>= 4.1.0) - activerecord (>= 4.1.0) - activesupport (>= 4.1.0) - virtus (~> 1.0.5) - wisper (>= 1.6.1) redcarpet (3.5.1) - redis (4.7.1) - regexp_parser (2.5.0) + redis (4.8.0) + regexp_parser (2.6.1) request_store (1.5.1) rack (>= 1.4) responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) rexml (3.2.5) - rspec (3.11.0) - rspec-core (~> 3.11.0) - rspec-expectations (~> 3.11.0) - rspec-mocks (~> 3.11.0) - rspec-cells (0.3.7) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-cells (0.3.8) cells (>= 4.0.0, < 6.0.0) - rspec-rails (< 6.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rspec-rails (>= 3.0.0, < 6.1.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) + rspec-support (~> 3.12.0) rspec-html-matchers (0.9.4) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.11.1) + rspec-mocks (3.12.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) + rspec-support (~> 3.12.0) rspec-rails (4.1.2) actionpack (>= 4.2) activesupport (>= 4.2) @@ -634,29 +666,29 @@ GEM rspec-support (~> 3.10) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.11.0) + rspec-support (3.12.0) rspec_junit_formatter (0.3.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (0.92.0) + rubocop (1.28.2) parallel (~> 1.10) - parser (>= 2.7.1.5) + parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.7) + regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 0.5.0) + rubocop-ast (>= 1.17.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.18.0) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.24.1) parser (>= 3.1.1.0) rubocop-faker (1.1.0) faker (>= 2.12.0) rubocop (>= 0.82.0) - rubocop-rails (2.9.1) + rubocop-rails (2.15.2) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 0.90.0, < 2.0) - rubocop-rspec (1.43.2) - rubocop (~> 0.87) + rubocop (>= 1.7.0, < 2.0) + rubocop-rspec (2.11.1) + rubocop (~> 1.19) ruby-progressbar (1.11.0) ruby-vips (2.1.4) ffi (~> 1.12) @@ -665,54 +697,64 @@ GEM nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) - searchlight (4.1.0) - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + selenium-webdriver (4.1.0) + childprocess (>= 0.5, < 5.0) + rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2) semantic_range (3.0.0) seven_zip_ruby (1.3.0) - simplecov (0.19.1) + simplecov (0.21.2) docile (~> 1.1) simplecov-html (~> 0.11) - simplecov-cobertura (1.3.1) - simplecov (~> 0.8) + simplecov_json_formatter (~> 0.1) + simplecov-cobertura (2.1.0) + rexml + simplecov (~> 0.19) simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) smart_properties (1.17.0) + snaky_hash (2.0.1) + hashie + version_gem (~> 1.1, >= 1.1.1) social-share-button (1.2.4) coffee-rails spring (2.1.1) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - sprockets (4.1.1) + sprockets (4.2.0) concurrent-ruby (~> 1.0) - rack (> 1, < 3) + rack (>= 2.2.4, < 4) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - ssrf_filter (1.0.7) - system_test_html_screenshots (0.2.0) - actionpack (>= 5.2, < 6.1.a) - temple (0.8.2) + ssrf_filter (1.1.1) + temple (0.9.1) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) thor (1.2.1) thread_safe (0.3.6) - tilt (2.0.10) + tilt (2.0.11) + timeout (0.3.1) tomlrb (2.0.3) - tzinfo (1.2.9) - thread_safe (~> 0.1) + tzinfo (2.0.5) + concurrent-ruby (~> 1.0) uber (0.1.0) - unicode-display_width (1.8.0) + unicode-display_width (2.4.2) valid_email2 (2.3.1) activemodel (>= 3.2) mail (~> 2.5) - virtus (1.0.5) + version_gem (1.1.1) + virtus (2.0.0) axiom-types (~> 0.1) coercible (~> 1.0) descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) w3c_rspec_validators (0.3.0) rails rspec @@ -728,7 +770,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.14.0) + webmock (3.18.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -737,6 +779,9 @@ GEM rack-proxy (>= 0.6.1) railties (>= 5.2) semantic_range (>= 2.3.0) + webpush (1.1.0) + hkdf (~> 0.2) + jwt (~> 2.0) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -744,20 +789,20 @@ GEM activesupport wisper (2.0.1) wisper-rspec (1.1.0) - wkhtmltopdf-binary (0.12.6.5) + wkhtmltopdf-binary (0.12.6.6) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.0) + zeitwerk (2.6.6) PLATFORMS - ruby + x86_64-darwin-21 x86_64-linux DEPENDENCIES bootsnap (~> 1.4) byebug (~> 11.0) - decidim (~> 0.26) - decidim-dev (~> 0.26) + decidim (~> 0.27) + decidim-dev (~> 0.27) decidim-phone_authorization_handler! faker (~> 2.14) foundation_rails_helper! @@ -770,7 +815,7 @@ DEPENDENCIES web-console (= 4.0.4) RUBY VERSION - ruby 2.7.1p83 + ruby 3.0.1p64 BUNDLED WITH - 2.3.9 + 2.2.15 diff --git a/app/controllers/decidim/admin/exports_controller.rb b/app/controllers/decidim/admin/exports_controller.rb deleted file mode 100644 index 20f2e71..0000000 --- a/app/controllers/decidim/admin/exports_controller.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -module Decidim - module Admin - # This controller allows admins to manage proposals in a participatory process. - class ExportsController < Decidim::Admin::ApplicationController - include Decidim::ComponentPathHelper - - def create - enforce_permission_to :export, :component_data, component: component - name = params[:id] - - ExportJob.perform_later(current_user, component, name, params[:format] || default_format) - - flash[:notice] = t("decidim.admin.exports.notice") - - redirect_back(fallback_location: manage_component_path(component)) - end - - private - - def default_format - "json" - end - - def component - @component ||= current_participatory_space.components.find(params[:component_id]) - end - end - end -end diff --git a/app/views/decidim/authorization_modals/_content.html.erb b/app/views/decidim/authorization_modals/_content.html.erb deleted file mode 100644 index aaec0a6..0000000 --- a/app/views/decidim/authorization_modals/_content.html.erb +++ /dev/null @@ -1,45 +0,0 @@ -<% if current_user && !current_user.verifiable? %> -
-

<%= t ".unconfirmed.title" %>

-
-

<%= t ".unconfirmed.explanation_html", email: current_user.email %>

-

<%= t ".unconfirmed.confirmation_instructions" %>

-
-
- <%= link_to t(".unconfirmed.request_confirmation_instructions"), new_confirmation_path(Decidim::User), class: "button expanded" %> -
-
-<% else %> - <% base_code = authorizations.global_code || :missing %> -
-

<%= t ".#{base_code}.title" %>

-
- <% authorizations.statuses.each do |status| %> - <% next if status.ok? || authorizations.global_code && status.code != base_code %> -

<%= t ".#{status.code}.explanation", authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers") %>

- <% if status.data[:extra_explanation] %> -

<%= t status.data[:extra_explanation][:key], **status.data[:extra_explanation][:params] %>

- <% end %> - <% if status.data[:fields] %> - - <% end %> -
-
- <% if status.data[:action].present? %> - <%= link_to t(".#{status.code}.#{status.data[:action]}", authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers")), authorize_action_path(status.handler_name), class: "button expanded" %> - <% else %> - - <% end %> -
-
- <% if status.data[:cancel] %> -
- -
- <% end %> - <% end %> -<% end %> diff --git a/app/views/decidim/verifications/authorizations/new.html.erb b/app/views/decidim/verifications/authorizations/new.html.erb index 9552175..edca262 100644 --- a/app/views/decidim/verifications/authorizations/new.html.erb +++ b/app/views/decidim/verifications/authorizations/new.html.erb @@ -1,4 +1,4 @@ -
+
@@ -31,4 +31,4 @@
-
+ diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index c7afb09..a75f2c3 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -6,6 +6,10 @@ locales: [en] ignore_unused: - decidim.components.phone_authorization_handler.name - decidim.authorization_handlers.phone_authorization_handler.explanation + - decidim.authorization_handlers.phone_authorization_handler.name + - decidim.authorization_modals.content.missing.authorize + - decidim.authorization_modals.content.missing.explanation + - decidim.authorization_modals.content.missing.title ignore_missing: - decidim.participatory_processes.scopes.global diff --git a/decidim-phone_authorization_handler.gemspec b/decidim-phone_authorization_handler.gemspec index 9f56146..d610d2f 100644 --- a/decidim-phone_authorization_handler.gemspec +++ b/decidim-phone_authorization_handler.gemspec @@ -19,4 +19,5 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,lib}/**/*", "LICENSE-AGPLv3.txt", "Rakefile", "README.md"] s.add_dependency "decidim-core", Decidim::PhoneAuthorizationHandler.decidim_compatibility_version + s.metadata["rubygems_mfa_required"] = "true" end diff --git a/lib/decidim/phone_authorization_handler/version.rb b/lib/decidim/phone_authorization_handler/version.rb index 99cce68..68bbd63 100644 --- a/lib/decidim/phone_authorization_handler/version.rb +++ b/lib/decidim/phone_authorization_handler/version.rb @@ -8,7 +8,7 @@ def self.version end def self.decidim_compatibility_version - "~> 0.26" + "~> 0.27" end end end diff --git a/spec/lib/decidim/exporters/csv_spec.rb b/spec/lib/decidim/exporters/csv_spec.rb index 50c9f6c..667be9f 100644 --- a/spec/lib/decidim/exporters/csv_spec.rb +++ b/spec/lib/decidim/exporters/csv_spec.rb @@ -93,8 +93,8 @@ def serialize it "defines admin_processed_collection only" do subject.admin_export - expect(subject.instance_variable_get(:@processed_collection)).to eq(nil) - expect(subject.instance_variable_get(:@admin_processed_collection)).not_to eq(nil) + expect(subject.instance_variable_get(:@processed_collection)).to be_nil + expect(subject.instance_variable_get(:@admin_processed_collection)).not_to be_nil end end end diff --git a/spec/lib/decidim/exporters/excel_spec.rb b/spec/lib/decidim/exporters/excel_spec.rb index 2eb93e6..6b8b9c0 100644 --- a/spec/lib/decidim/exporters/excel_spec.rb +++ b/spec/lib/decidim/exporters/excel_spec.rb @@ -78,8 +78,8 @@ def serialize it "defines admin_processed_collection only" do subject.admin_export - expect(subject.instance_variable_get(:@processed_collection)).to eq(nil) - expect(subject.instance_variable_get(:@admin_processed_collection)).not_to eq(nil) + expect(subject.instance_variable_get(:@processed_collection)).to be_nil + expect(subject.instance_variable_get(:@admin_processed_collection)).not_to be_nil end end end diff --git a/spec/lib/decidim/phone_authorization_handler_spec.rb b/spec/lib/decidim/phone_authorization_handler_spec.rb index 67f5c97..398f66a 100644 --- a/spec/lib/decidim/phone_authorization_handler_spec.rb +++ b/spec/lib/decidim/phone_authorization_handler_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true describe Decidim::PhoneAuthorizationHandler do - let(:subject) { described_class } + subject { described_class } describe "#version" do it "returns module's version" do @@ -11,7 +11,7 @@ describe "#decidim_compatibility_version" do it "returns decidim compatibility version" do - expect(described_class.decidim_compatibility_version).to eq("~> 0.26") + expect(described_class.decidim_compatibility_version).to eq("~> 0.27") end end end diff --git a/spec/services/decidim/open_data_exporter_spec.rb b/spec/services/decidim/open_data_exporter_spec.rb index f5de306..34d0f0f 100644 --- a/spec/services/decidim/open_data_exporter_spec.rb +++ b/spec/services/decidim/open_data_exporter_spec.rb @@ -12,7 +12,7 @@ it "generates a zip file at the path" do subject.export - expect(File.exist?(path)).to eq(true) + expect(File.exist?(path)).to be(true) end describe "contents" do diff --git a/spec/services/decidim/phone_authorization_handler/phone_authorization_handler_spec.rb b/spec/services/decidim/phone_authorization_handler/phone_authorization_handler_spec.rb index 7a4b513..c7679a5 100644 --- a/spec/services/decidim/phone_authorization_handler/phone_authorization_handler_spec.rb +++ b/spec/services/decidim/phone_authorization_handler/phone_authorization_handler_spec.rb @@ -26,43 +26,43 @@ context "when no phone number" do let(:phone_number) { nil } - it { is_expected.to eq(false) } + it { is_expected.to be(false) } end context "when phone number is not valid format" do let(:phone_number) { "8888888888" } - it { is_expected.to eq(false) } + it { is_expected.to be(false) } end context "when phone number contains letters" do let(:phone_number) { "FGHGFDSD" } - it { is_expected.to eq(false) } + it { is_expected.to be(false) } end context "when phone number is a french phone number" do let(:phone_number) { "0666666666" } - it { is_expected.to eq(true) } + it { is_expected.to be(true) } end context "when phone number has internationalized format" do let(:phone_number) { "+33666666666" } - it { is_expected.to eq(true) } + it { is_expected.to be(true) } end context "when phone number is too short" do let(:phone_number) { "+33666" } - it { is_expected.to eq(false) } + it { is_expected.to be(false) } end context "when phone number is too long" do let(:phone_number) { "+3366666666666" } - it { is_expected.to eq(false) } + it { is_expected.to be(false) } end end end diff --git a/spec/services/decidim/proposals/proposal_serializer_spec.rb b/spec/services/decidim/proposals/proposal_serializer_spec.rb index a6c8a42..37be70a 100644 --- a/spec/services/decidim/proposals/proposal_serializer_spec.rb +++ b/spec/services/decidim/proposals/proposal_serializer_spec.rb @@ -31,7 +31,7 @@ module Proposals name: "phone_authorization_handler", user: proposal.creator_author, metadata: { - "phone_number": "0644444444" + phone_number: "0644444444" } ) end diff --git a/spec/system/manage_system_authorizations_spec.rb b/spec/system/manage_system_authorizations_spec.rb index 3b50c9c..5255385 100644 --- a/spec/system/manage_system_authorizations_spec.rb +++ b/spec/system/manage_system_authorizations_spec.rb @@ -21,7 +21,7 @@ it "can activate phone authorization handler" do within ".edit_organization" do find("input[value='phone_authorization_handler']").set(true) - expect(find("input[value='phone_authorization_handler']").checked?).to eq(true) + expect(find("input[value='phone_authorization_handler']").checked?).to be(true) click_button "Save" end