diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml
new file mode 100644
index 0000000..cc26634
--- /dev/null
+++ b/.github/workflows/ci_cd.yml
@@ -0,0 +1,89 @@
+name: "CI/CD"
+on: [push]
+
+env:
+ CI: "true"
+ CODECOV: "true"
+ RUBY_VERSION: 3.2.2
+ NODE_VERSION: 18.17.1
+ SHAKAPACKER_RUNTIME_COMPILE: "false"
+ RAILS_ENV: test
+ DISABLE_SPRING: "true"
+
+jobs:
+ lint:
+ name: Lint code
+ runs-on: ubuntu-latest
+ timeout-minutes: 15
+ steps:
+ - uses: rokroskar/workflow-run-cleanup-action@v0.3.0
+ if: "github.ref != 'refs/heads/develop'"
+ env:
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+ - uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+ - name: Run Rubocop
+ run: bundle exec rubocop -P
+ tests:
+ name: Tests
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ services:
+ postgres:
+ image: postgres:14
+ ports: [ "5432:5432" ]
+ options: >-
+ --health-cmd pg_isready
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 5
+ env:
+ POSTGRES_PASSWORD: postgres
+ env:
+ DATABASE_USERNAME: postgres
+ DATABASE_PASSWORD: postgres
+ DATABASE_HOST: localhost
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+ - uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+ - run: sudo apt install imagemagick
+ name: Install imagemagick
+ - uses: actions/setup-node@v3
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ - name: Get npm cache directory path
+ id: npm-cache-dir-path
+ run: echo "dir=$(npm get cache)-emitter" >> $GITHUB_OUTPUT
+ - uses: actions/cache@v3
+ id: npm-cache
+ with:
+ path: ${{ steps.npm-cache-dir-path.outputs.dir }}
+ key: npm-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ npm-
+ - run: bundle exec rake test_app
+ name: Create test app
+ - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots
+ name: Create the screenshots folder
+ - uses: nanasess/setup-chromedriver@v2
+ - run: RAILS_ENV=test bundle exec rails assets:precompile
+ name: Precompile assets
+ working-directory: ./spec/decidim_dummy_app/
+ - run: bundle exec rspec
+ name: RSpec
+ - uses: codecov/codecov-action@v3
+ - uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: screenshots
+ path: ./spec/decidim_dummy_app/tmp/screenshots
+ if-no-files-found: ignore
+
diff --git a/.rubocop_ruby.yml b/.rubocop_ruby.yml
index 892ef63..d427547 100644
--- a/.rubocop_ruby.yml
+++ b/.rubocop_ruby.yml
@@ -69,7 +69,7 @@ AllCops:
# If a value is specified for TargetRubyVersion then it is used.
# Else if .ruby-version exists and it contains an MRI version it is used.
# Otherwise we fallback to the oldest officially supported Ruby version (2.0).
- TargetRubyVersion: 3.0
+ TargetRubyVersion: 3.2
RSpec:
Patterns:
diff --git a/.ruby-version b/.ruby-version
index b502146..be94e6f 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-3.0.2
+3.2.2
diff --git a/Gemfile b/Gemfile
index 344bf04..0a35787 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,27 +4,26 @@ source "https://rubygems.org"
ruby RUBY_VERSION
-gem "decidim", "~> 0.27"
-gem "decidim-core"
-
-gem "graphql", "1.12.24"
-gem "graphql-docs", "2.1.0"
+gem "decidim", "~> 0.29.3"
+gem "decidim-core", "~> 0.29.3"
+gem "graphql", "~> 2.0"
+gem "graphql-docs", "~> 4.0"
gem "decidim-admin_multi_factor", path: "./"
gem "bootsnap", "~> 1.3"
group :development, :test do
- gem "decidim-dev"
+ gem "decidim-dev", "~> 0.29.3"
end
group :development do
- gem "letter_opener_web", "~> 1.4"
+ gem "letter_opener_web", "~> 2.0"
gem "listen", "~> 3.1"
- gem "spring", "~> 2.0"
+ gem "spring", "~> 4.0"
gem "spring-watcher-listen", "~> 2.0"
- gem "web-console", "~> 4.0"
+ gem "web-console", "~> 4.2"
end
group :test do
diff --git a/Gemfile.lock b/Gemfile.lock
index 79e36ab..077a434 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,47 +1,54 @@
PATH
remote: .
specs:
- decidim-admin_multi_factor (0.27.9)
+ decidim-admin_multi_factor (0.29.3)
countries (~> 5.1, >= 5.1.2)
- decidim-core (= 0.27.9)
+ decidim-core (~> 0.29.3)
GEM
remote: https://rubygems.org/
specs:
- actioncable (6.1.7.10)
- actionpack (= 6.1.7.10)
- activesupport (= 6.1.7.10)
+ actioncable (7.0.8.7)
+ actionpack (= 7.0.8.7)
+ activesupport (= 7.0.8.7)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
- actionmailbox (6.1.7.10)
- actionpack (= 6.1.7.10)
- activejob (= 6.1.7.10)
- activerecord (= 6.1.7.10)
- activestorage (= 6.1.7.10)
- activesupport (= 6.1.7.10)
+ actionmailbox (7.0.8.7)
+ actionpack (= 7.0.8.7)
+ activejob (= 7.0.8.7)
+ activerecord (= 7.0.8.7)
+ activestorage (= 7.0.8.7)
+ activesupport (= 7.0.8.7)
mail (>= 2.7.1)
- actionmailer (6.1.7.10)
- actionpack (= 6.1.7.10)
- actionview (= 6.1.7.10)
- activejob (= 6.1.7.10)
- activesupport (= 6.1.7.10)
+ net-imap
+ net-pop
+ net-smtp
+ actionmailer (7.0.8.7)
+ actionpack (= 7.0.8.7)
+ actionview (= 7.0.8.7)
+ activejob (= 7.0.8.7)
+ activesupport (= 7.0.8.7)
mail (~> 2.5, >= 2.5.4)
+ net-imap
+ net-pop
+ net-smtp
rails-dom-testing (~> 2.0)
- actionpack (6.1.7.10)
- actionview (= 6.1.7.10)
- activesupport (= 6.1.7.10)
- rack (~> 2.0, >= 2.0.9)
+ actionpack (7.0.8.7)
+ actionview (= 7.0.8.7)
+ activesupport (= 7.0.8.7)
+ rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actiontext (6.1.7.10)
- actionpack (= 6.1.7.10)
- activerecord (= 6.1.7.10)
- activestorage (= 6.1.7.10)
- activesupport (= 6.1.7.10)
+ actiontext (7.0.8.7)
+ actionpack (= 7.0.8.7)
+ activerecord (= 7.0.8.7)
+ activestorage (= 7.0.8.7)
+ activesupport (= 7.0.8.7)
+ globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
- actionview (6.1.7.10)
- activesupport (= 6.1.7.10)
+ actionview (7.0.8.7)
+ activesupport (= 7.0.8.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
@@ -49,61 +56,51 @@ GEM
active_link_to (1.0.5)
actionpack
addressable
- activejob (6.1.7.10)
- activesupport (= 6.1.7.10)
+ activejob (7.0.8.7)
+ activesupport (= 7.0.8.7)
globalid (>= 0.3.6)
- activemodel (6.1.7.10)
- activesupport (= 6.1.7.10)
- activerecord (6.1.7.10)
- activemodel (= 6.1.7.10)
- activesupport (= 6.1.7.10)
- activestorage (6.1.7.10)
- actionpack (= 6.1.7.10)
- activejob (= 6.1.7.10)
- activerecord (= 6.1.7.10)
- activesupport (= 6.1.7.10)
+ activemodel (7.0.8.7)
+ activesupport (= 7.0.8.7)
+ activerecord (7.0.8.7)
+ activemodel (= 7.0.8.7)
+ activesupport (= 7.0.8.7)
+ activestorage (7.0.8.7)
+ actionpack (= 7.0.8.7)
+ activejob (= 7.0.8.7)
+ activerecord (= 7.0.8.7)
+ activesupport (= 7.0.8.7)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
- activesupport (6.1.7.10)
+ activesupport (7.0.8.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
- zeitwerk (~> 2.3)
- acts_as_list (0.9.19)
- activerecord (>= 3.0)
+ acts_as_list (1.2.4)
+ activerecord (>= 6.1)
+ activesupport (>= 6.1)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
ast (2.4.2)
- axe-core-api (4.10.2)
- dumb_delegator
- ostruct
- virtus
- axe-core-rspec (4.1.0)
- axe-core-api
- dumb_delegator
- virtus
- axiom-types (0.1.1)
- descendants_tracker (~> 0.0.4)
- ice_nine (~> 0.11.0)
- thread_safe (~> 0.3, >= 0.3.1)
base64 (0.2.0)
batch-loader (1.5.0)
bcrypt (3.1.20)
- better_html (1.0.16)
- actionview (>= 4.0)
- activesupport (>= 4.0)
+ better_html (2.1.1)
+ actionview (>= 6.0)
+ activesupport (>= 6.0)
ast (~> 2.0)
erubi (~> 1.4)
- html_tokenizer (~> 0.0.6)
parser (>= 2.4)
smart_properties
- bigdecimal (3.1.8)
+ bigdecimal (3.2.2)
bindex (0.8.1)
bootsnap (1.18.4)
msgpack (~> 1.2)
browser (2.7.1)
builder (3.3.0)
+ bullet (7.1.6)
+ activesupport (>= 3.0.0)
+ uniform_notifier (~> 1.11)
byebug (11.1.3)
capybara (3.40.0)
addressable
@@ -114,14 +111,6 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
- carrierwave (2.2.6)
- activemodel (>= 5.0.0)
- activesupport (>= 5.0.0)
- addressable (~> 2.6)
- image_processing (~> 1.1)
- marcel (~> 1.0.0)
- mini_mime (>= 0.1.3)
- ssrf_filter (~> 1.0)
cells (4.1.8)
declarative-builder (~> 0.2.0)
declarative-option (< 0.2.0)
@@ -134,18 +123,8 @@ GEM
actionpack (>= 5.0)
cells (>= 4.1.6, < 5.0.0)
charlock_holmes (0.7.9)
- chef-utils (18.5.0)
- concurrent-ruby
- childprocess (4.1.0)
- coercible (1.0.0)
- descendants_tracker (~> 0.0.1)
- coffee-rails (5.0.0)
- coffee-script (>= 2.2.0)
- railties (>= 5.2.0)
- coffee-script (2.4.1)
- coffee-script-source
- execjs
- coffee-script-source (1.12.2)
+ childprocess (5.1.0)
+ logger (~> 1.5)
commonmarker (0.23.11)
concurrent-ruby (1.3.4)
countries (5.7.2)
@@ -154,235 +133,243 @@ GEM
bigdecimal
rexml
crass (1.0.6)
- css_parser (1.19.1)
+ css_parser (1.21.1)
addressable
- csv (3.3.0)
- date (3.4.0)
+ csv (3.3.5)
+ dartsass (1.49.8)
+ date (3.4.1)
date_validator (0.12.0)
activemodel (>= 3)
activesupport (>= 3)
- db-query-matchers (0.10.0)
- activesupport (>= 4.0, < 7)
- rspec (~> 3.0)
- decidim (0.27.9)
- decidim-accountability (= 0.27.9)
- decidim-admin (= 0.27.9)
- decidim-api (= 0.27.9)
- decidim-assemblies (= 0.27.9)
- decidim-blogs (= 0.27.9)
- decidim-budgets (= 0.27.9)
- decidim-comments (= 0.27.9)
- decidim-core (= 0.27.9)
- decidim-debates (= 0.27.9)
- decidim-forms (= 0.27.9)
- decidim-generators (= 0.27.9)
- decidim-meetings (= 0.27.9)
- decidim-pages (= 0.27.9)
- decidim-participatory_processes (= 0.27.9)
- decidim-proposals (= 0.27.9)
- decidim-sortitions (= 0.27.9)
- decidim-surveys (= 0.27.9)
- decidim-system (= 0.27.9)
- decidim-verifications (= 0.27.9)
- decidim-accountability (0.27.9)
- decidim-comments (= 0.27.9)
- decidim-core (= 0.27.9)
- decidim-admin (0.27.9)
+ decidim (0.29.4)
+ decidim-accountability (= 0.29.4)
+ decidim-admin (= 0.29.4)
+ decidim-api (= 0.29.4)
+ decidim-assemblies (= 0.29.4)
+ decidim-blogs (= 0.29.4)
+ decidim-budgets (= 0.29.4)
+ decidim-comments (= 0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-debates (= 0.29.4)
+ decidim-forms (= 0.29.4)
+ decidim-generators (= 0.29.4)
+ decidim-meetings (= 0.29.4)
+ decidim-pages (= 0.29.4)
+ decidim-participatory_processes (= 0.29.4)
+ decidim-proposals (= 0.29.4)
+ decidim-sortitions (= 0.29.4)
+ decidim-surveys (= 0.29.4)
+ decidim-system (= 0.29.4)
+ decidim-verifications (= 0.29.4)
+ decidim-accountability (0.29.4)
+ decidim-comments (= 0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-admin (0.29.4)
active_link_to (~> 1.0)
- decidim-core (= 0.27.9)
+ decidim-core (= 0.29.4)
devise (~> 4.7)
devise-i18n (~> 1.2)
devise_invitable (~> 2.0, >= 2.0.9)
- decidim-api (0.27.9)
- decidim-core (= 0.27.9)
- graphql (~> 1.12, < 1.13)
- graphql-docs (~> 2.1.0)
+ decidim-api (0.29.4)
+ decidim-core (= 0.29.4)
+ graphql (~> 2.2.6)
+ graphql-docs (~> 4.0)
rack-cors (~> 1.0)
- decidim-assemblies (0.27.9)
- decidim-core (= 0.27.9)
- decidim-blogs (0.27.9)
- decidim-admin (= 0.27.9)
- decidim-comments (= 0.27.9)
- decidim-core (= 0.27.9)
- decidim-budgets (0.27.9)
- decidim-comments (= 0.27.9)
- decidim-core (= 0.27.9)
- decidim-comments (0.27.9)
- decidim-core (= 0.27.9)
+ decidim-assemblies (0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-blogs (0.29.4)
+ decidim-admin (= 0.29.4)
+ decidim-comments (= 0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-budgets (0.29.4)
+ decidim-comments (= 0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-comments (0.29.4)
+ decidim-core (= 0.29.4)
redcarpet (~> 3.5, >= 3.5.1)
- decidim-core (0.27.9)
+ decidim-core (0.29.4)
active_link_to (~> 1.0)
- acts_as_list (~> 0.9)
+ acts_as_list (~> 1.0)
batch-loader (~> 1.2)
browser (~> 2.7)
- carrierwave (~> 2.2.5, >= 2.2.5)
cells-erb (~> 0.1.0)
cells-rails (~> 0.1.3)
charlock_holmes (~> 0.7)
+ concurrent-ruby (= 1.3.4)
date_validator (~> 0.12.0)
devise (~> 4.7)
- devise-i18n (~> 1.2)
+ devise-i18n (~> 1.2, < 1.11.1)
diffy (~> 3.3)
- doorkeeper (~> 5.1)
+ doorkeeper (~> 5.6, >= 5.6.6)
doorkeeper-i18n (~> 4.0)
file_validators (~> 3.0)
fog-local (~> 0.6)
foundation_rails_helper (~> 4.0)
geocoder (~> 1.8)
hashdiff (>= 0.4.0, < 2.0.0)
+ image_processing (~> 1.2)
invisible_captcha (~> 0.12)
kaminari (~> 1.2, >= 1.2.1)
- loofah (~> 2.19.0)
+ loofah (~> 2.19, >= 2.19.1)
mime-types (>= 1.16, < 4.0)
mini_magick (~> 4.9)
+ net-smtp (~> 0.3.1)
+ nokogiri (~> 1.16, >= 1.16.2)
omniauth (~> 2.0)
omniauth-facebook (~> 5.0)
omniauth-google-oauth2 (~> 1.0)
omniauth-rails_csrf_protection (~> 1.0)
omniauth-twitter (~> 1.4)
paper_trail (~> 12.0)
- pg (~> 1.1.4, < 2)
+ pg (~> 1.4.0, < 2)
pg_search (~> 2.2)
premailer-rails (~> 1.10)
- rack (~> 2.2, >= 2.2.3)
+ psych (~> 4.0)
+ rack (~> 2.2, >= 2.2.8.1)
rack-attack (~> 6.0)
- rails (~> 6.1.0)
- rails-i18n (~> 6.0)
- ransack (~> 2.4.1)
+ rails (~> 7.0.8)
+ rails-i18n (~> 7.0)
+ ransack (~> 3.2.1)
redis (~> 4.1)
request_store (~> 1.5.0)
rubyXL (~> 3.4)
rubyzip (~> 2.0)
- 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)
+ shakapacker (~> 7.1.0)
+ valid_email2 (~> 4.0)
+ web-push (~> 3.0)
wisper (~> 2.0)
- decidim-debates (0.27.9)
- decidim-comments (= 0.27.9)
- decidim-core (= 0.27.9)
- decidim-dev (0.27.9)
- axe-core-rspec (~> 4.1.0)
+ decidim-debates (0.29.4)
+ decidim-comments (= 0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-dev (0.29.4)
+ bullet (~> 7.1.6)
byebug (~> 11.0)
- capybara (~> 3.24)
- db-query-matchers (~> 0.10.0)
- decidim (= 0.27.9)
- erb_lint (~> 0.0.35)
- factory_bot_rails (~> 4.8)
- faker (= 2.19.0)
- i18n-tasks (~> 0.9.18)
- mdl (~> 0.5)
- nokogiri (~> 1.13)
- parallel_tests (~> 3.7)
- puma (~> 5.0)
+ capybara (~> 3.39)
+ decidim (= 0.29.4)
+ erb_lint (~> 0.4.0)
+ factory_bot_rails (~> 6.2)
+ faker (~> 3.2)
+ i18n-tasks (~> 1.0)
+ nokogiri (~> 1.16, >= 1.16.2)
+ parallel_tests (~> 4.2)
+ puma (~> 6.2, >= 6.3.1)
rails-controller-testing (~> 1.0)
+ rspec (~> 3.12)
rspec-cells (~> 0.3.7)
- rspec-expectations (= 3.13.1)
- rspec-html-matchers (~> 0.9.1)
- rspec-rails (~> 4.0)
+ rspec-html-matchers (~> 0.10)
+ rspec-rails (~> 6.0)
rspec-retry (~> 0.6.2)
- rspec_junit_formatter (~> 0.3.0)
- rubocop (~> 1.28.0)
- rubocop-rails (~> 2.14)
- rubocop-rspec (~> 2.10)
- selenium-webdriver (~> 4.1.0)
- simplecov (~> 0.21.0)
+ rspec_junit_formatter (~> 0.6.0)
+ rubocop (~> 1.65.0)
+ rubocop-capybara (~> 2.21)
+ rubocop-factory_bot (~> 2.26)
+ rubocop-faker (~> 1.1)
+ rubocop-performance (~> 1.21)
+ rubocop-rails (~> 2.25)
+ rubocop-rspec (~> 3.0)
+ rubocop-rspec_rails (~> 2.30)
+ rubocop-rubycw (~> 0.1)
+ selenium-webdriver (~> 4.9)
+ simplecov (~> 0.22.0)
simplecov-cobertura (~> 2.1.0)
+ spring (~> 4.0)
+ spring-watcher-listen (~> 2.0)
w3c_rspec_validators (~> 0.3.0)
- webmock (~> 3.6)
+ webmock (~> 3.18)
wisper-rspec (~> 1.0)
- decidim-forms (0.27.9)
- decidim-core (= 0.27.9)
+ decidim-forms (0.29.4)
+ decidim-core (= 0.29.4)
wicked_pdf (~> 2.1)
- wkhtmltopdf-binary (~> 0.12)
- decidim-generators (0.27.9)
- decidim-core (= 0.27.9)
- decidim-meetings (0.27.9)
- decidim-core (= 0.27.9)
- decidim-forms (= 0.27.9)
+ decidim-generators (0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-meetings (0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-forms (= 0.29.4)
icalendar (~> 2.5)
- decidim-pages (0.27.9)
- decidim-core (= 0.27.9)
- decidim-participatory_processes (0.27.9)
- decidim-core (= 0.27.9)
- decidim-proposals (0.27.9)
- decidim-comments (= 0.27.9)
- decidim-core (= 0.27.9)
- doc2text (~> 0.4.5)
+ decidim-pages (0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-participatory_processes (0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-proposals (0.29.4)
+ decidim-comments (= 0.29.4)
+ decidim-core (= 0.29.4)
+ doc2text (~> 0.4.7)
redcarpet (~> 3.5, >= 3.5.1)
- decidim-sortitions (0.27.9)
- decidim-admin (= 0.27.9)
- decidim-comments (= 0.27.9)
- decidim-core (= 0.27.9)
- decidim-proposals (= 0.27.9)
- decidim-surveys (0.27.9)
- decidim-core (= 0.27.9)
- decidim-forms (= 0.27.9)
- decidim-system (0.27.9)
+ decidim-sortitions (0.29.4)
+ decidim-admin (= 0.29.4)
+ decidim-comments (= 0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-proposals (= 0.29.4)
+ decidim-surveys (0.29.4)
+ decidim-core (= 0.29.4)
+ decidim-forms (= 0.29.4)
+ decidim-system (0.29.4)
active_link_to (~> 1.0)
- decidim-core (= 0.27.9)
+ decidim-core (= 0.29.4)
devise (~> 4.7)
devise-i18n (~> 1.2)
devise_invitable (~> 2.0, >= 2.0.9)
- decidim-verifications (0.27.9)
- decidim-core (= 0.27.9)
+ decidim-verifications (0.29.4)
+ decidim-core (= 0.29.4)
declarative-builder (0.2.0)
trailblazer-option (~> 0.1.0)
declarative-option (0.1.0)
- descendants_tracker (0.0.4)
- thread_safe (~> 0.3, >= 0.3.1)
devise (4.9.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
- devise-i18n (1.12.1)
+ devise-i18n (1.11.0)
devise (>= 4.9.0)
- devise_invitable (2.0.9)
+ devise_invitable (2.0.11)
actionmailer (>= 5.0)
devise (>= 4.6)
- diff-lcs (1.5.1)
- diffy (3.4.3)
- doc2text (0.4.7)
- nokogiri (>= 1.13.2, < 1.17.0)
+ diff-lcs (1.6.2)
+ diffy (3.4.4)
+ doc2text (0.4.8)
+ nokogiri (>= 1.18.2)
rubyzip (~> 2.3.0)
docile (1.4.1)
- doorkeeper (5.8.0)
+ doorkeeper (5.8.2)
railties (>= 5)
doorkeeper-i18n (4.0.1)
- dumb_delegator (1.0.0)
- erb_lint (0.0.37)
+ erb_lint (0.4.0)
activesupport
- better_html (~> 1.0.7)
- html_tokenizer
+ better_html (>= 2.0.1)
parser (>= 2.7.1.4)
rainbow
rubocop
smart_properties
erbse (0.1.4)
temple
- erubi (1.13.0)
+ erubi (1.13.1)
escape_utils (1.3.0)
- excon (1.2.1)
- execjs (2.10.0)
+ excon (1.2.7)
+ logger
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.19.0)
- i18n (>= 1.6, < 2)
- faraday (2.12.1)
+ factory_bot (6.5.4)
+ activesupport (>= 6.1.0)
+ factory_bot_rails (6.5.0)
+ factory_bot (~> 6.5)
+ railties (>= 6.1.0)
+ faker (3.5.1)
+ i18n (>= 1.8.11, < 2)
+ faraday (2.13.1)
faraday-net_http (>= 2.0, < 3.5)
json
logger
- faraday-net_http (3.4.0)
+ faraday-net_http (3.4.1)
net-http (>= 0.5.0)
- ffi (1.17.0)
+ ffi (1.17.1-aarch64-linux-gnu)
+ ffi (1.17.1-aarch64-linux-musl)
+ ffi (1.17.1-arm-linux-gnu)
+ ffi (1.17.1-arm-linux-musl)
+ ffi (1.17.1-arm64-darwin)
+ ffi (1.17.1-x86_64-darwin)
+ ffi (1.17.1-x86_64-linux-gnu)
+ ffi (1.17.1-x86_64-linux-musl)
file_validators (3.0.0)
activemodel (>= 3.2)
mime-types (>= 1.0)
@@ -391,7 +378,7 @@ GEM
excon (~> 1.0)
formatador (>= 0.2, < 2.0)
mime-types
- fog-local (0.8.0)
+ fog-local (0.9.0)
fog-core (>= 1.27, < 3.0)
formatador (1.1.0)
foundation_rails_helper (4.0.1)
@@ -400,55 +387,56 @@ GEM
activesupport (>= 4.1, < 7.1)
railties (>= 4.1, < 7.1)
gemoji (3.0.1)
- geocoder (1.8.3)
+ geocoder (1.8.5)
base64 (>= 0.1.0)
csv (>= 3.0.0)
globalid (1.2.1)
activesupport (>= 6.1)
- graphql (1.12.24)
- graphql-docs (2.1.0)
- commonmarker (~> 0.16)
+ graphql (2.2.16)
+ base64
+ graphql-docs (4.0.0)
+ commonmarker (~> 0.23, >= 0.23.6)
+ dartsass (~> 1.49)
escape_utils (~> 1.2)
extended-markdown-filter (~> 0.4)
gemoji (~> 3.0)
- graphql (~> 1.12)
- html-pipeline (~> 2.9)
- sass (~> 3.4)
- hashdiff (1.1.2)
+ graphql (~> 2.0)
+ html-pipeline (~> 2.14, >= 2.14.3)
+ hashdiff (1.2.0)
hashie (5.0.0)
- highline (3.1.1)
+ highline (3.1.2)
reline
- hkdf (0.3.0)
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
- html_tokenizer (0.0.8)
htmlentities (4.3.4)
- i18n (1.14.6)
+ i18n (1.14.7)
concurrent-ruby (~> 1.0)
- i18n-tasks (0.9.37)
+ i18n-tasks (1.0.15)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
erubi
highline (>= 2.0.0)
i18n
- parser (>= 2.2.3.0)
+ parser (>= 3.2.2.1)
rails-i18n
rainbow (>= 2.2.2, < 4.0)
+ ruby-progressbar (~> 1.8, >= 1.8.1)
terminal-table (>= 1.5.1)
- icalendar (2.10.3)
+ icalendar (2.11.1)
+ base64
ice_cube (~> 0.16)
+ logger
ostruct
ice_cube (0.17.0)
- ice_nine (0.11.2)
- image_processing (1.13.0)
- mini_magick (>= 4.9.5, < 5)
+ image_processing (1.14.0)
+ mini_magick (>= 4.9.5, < 6)
ruby-vips (>= 2.0.17, < 3)
invisible_captcha (0.13.0)
rails (>= 3.2.0)
- io-console (0.7.2)
- json (2.8.2)
- jwt (2.9.3)
+ io-console (0.8.0)
+ json (2.10.1)
+ jwt (2.10.1)
base64
kaminari (1.2.2)
activesupport (>= 4.1.0)
@@ -462,66 +450,70 @@ GEM
activerecord
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
- kramdown (2.5.1)
- rexml (>= 3.3.9)
- kramdown-parser-gfm (1.1.0)
- kramdown (~> 2.0)
- launchy (2.5.2)
+ language_server-protocol (3.17.0.4)
+ launchy (3.1.1)
addressable (~> 2.8)
+ childprocess (~> 5.0)
+ logger (~> 1.6)
letter_opener (1.10.0)
launchy (>= 2.2, < 4)
- letter_opener_web (1.4.1)
- actionmailer (>= 3.2)
- letter_opener (~> 1.0)
- railties (>= 3.2)
+ letter_opener_web (2.0.0)
+ actionmailer (>= 5.2)
+ letter_opener (~> 1.7)
+ railties (>= 5.2)
+ rexml
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
- logger (1.6.1)
- loofah (2.19.1)
+ logger (1.6.6)
+ loofah (2.24.0)
crass (~> 1.0.2)
- nokogiri (>= 1.5.9)
+ nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.4)
- matrix (0.4.2)
- mdl (0.13.0)
- kramdown (~> 2.3)
- kramdown-parser-gfm (~> 1.1)
- mixlib-cli (~> 2.1, >= 2.1.1)
- mixlib-config (>= 2.2.1, < 4)
- mixlib-shellout
+ matrix (0.4.3)
method_source (1.1.0)
- mime-types (3.6.0)
+ mime-types (3.7.0)
logger
- mime-types-data (~> 3.2015)
- mime-types-data (3.2024.1105)
+ mime-types-data (~> 3.2025, >= 3.2025.0507)
+ mime-types-data (3.2025.0617)
mini_magick (4.13.2)
mini_mime (1.1.5)
- minitest (5.25.2)
- mixlib-cli (2.1.8)
- mixlib-config (3.0.27)
- tomlrb
- mixlib-shellout (3.3.4)
- chef-utils
- msgpack (1.7.5)
- multi_xml (0.6.0)
- net-http (0.5.0)
+ minitest (5.25.4)
+ msgpack (1.8.0)
+ multi_xml (0.7.2)
+ bigdecimal (~> 3.1)
+ net-http (0.6.0)
uri
- net-imap (0.4.18)
+ net-imap (0.5.6)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
- net-smtp (0.5.0)
+ net-smtp (0.3.4)
net-protocol
nio4r (2.7.4)
- nokogiri (1.16.7-x86_64-linux)
+ nokogiri (1.18.3-aarch64-linux-gnu)
+ racc (~> 1.4)
+ nokogiri (1.18.3-aarch64-linux-musl)
+ racc (~> 1.4)
+ nokogiri (1.18.3-arm-linux-gnu)
+ racc (~> 1.4)
+ nokogiri (1.18.3-arm-linux-musl)
+ racc (~> 1.4)
+ nokogiri (1.18.3-arm64-darwin)
+ racc (~> 1.4)
+ nokogiri (1.18.3-x86_64-darwin)
+ racc (~> 1.4)
+ nokogiri (1.18.3-x86_64-linux-gnu)
+ racc (~> 1.4)
+ nokogiri (1.18.3-x86_64-linux-musl)
racc (~> 1.4)
oauth (1.1.0)
oauth-tty (~> 1.0, >= 1.0.1)
@@ -529,21 +521,22 @@ GEM
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)
+ oauth2 (2.0.12)
+ faraday (>= 0.17.3, < 4.0)
+ jwt (>= 1.0, < 4.0)
+ logger (~> 1.2)
multi_xml (~> 0.5)
rack (>= 1.2, < 4)
- snaky_hash (~> 2.0)
- version_gem (~> 1.1)
- omniauth (2.1.2)
+ snaky_hash (~> 2.0, >= 2.0.3)
+ version_gem (>= 1.1.8, < 3)
+ omniauth (2.1.3)
hashie (>= 3.4.6)
rack (>= 2.2.3)
rack-protection
omniauth-facebook (5.0.0)
omniauth-oauth2 (~> 1.2)
- omniauth-google-oauth2 (1.2.0)
- jwt (>= 2.9)
+ omniauth-google-oauth2 (1.2.1)
+ jwt (>= 2.9.2)
oauth2 (~> 2.0)
omniauth (~> 2.0)
omniauth-oauth2 (~> 1.8)
@@ -560,18 +553,19 @@ GEM
omniauth-twitter (1.4.0)
omniauth-oauth (~> 1.1)
rack
+ openssl (3.3.0)
orm_adapter (0.5.0)
- ostruct (0.6.1)
+ ostruct (0.6.2)
paper_trail (12.3.0)
activerecord (>= 5.2)
request_store (~> 1.1)
parallel (1.26.3)
- parallel_tests (3.13.0)
+ parallel_tests (4.10.1)
parallel
- parser (3.3.6.0)
+ parser (3.3.7.1)
ast (~> 2.4.1)
racc
- pg (1.1.4)
+ pg (1.4.6)
pg_search (2.3.7)
activerecord (>= 6.1)
activesupport (>= 6.1)
@@ -583,11 +577,13 @@ GEM
actionmailer (>= 3)
net-smtp
premailer (~> 1.7, >= 1.7.9)
+ psych (4.0.6)
+ stringio
public_suffix (6.0.1)
- puma (5.6.9)
+ puma (6.6.0)
nio4r (~> 2.0)
racc (1.8.1)
- rack (2.2.10)
+ rack (2.2.11)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
rack-cors (1.1.1)
@@ -597,23 +593,22 @@ GEM
rack (~> 2.2, >= 2.2.4)
rack-proxy (0.7.7)
rack
- rack-test (2.1.0)
+ rack-test (2.2.0)
rack (>= 1.3)
- rails (6.1.7.10)
- actioncable (= 6.1.7.10)
- actionmailbox (= 6.1.7.10)
- actionmailer (= 6.1.7.10)
- actionpack (= 6.1.7.10)
- actiontext (= 6.1.7.10)
- actionview (= 6.1.7.10)
- activejob (= 6.1.7.10)
- activemodel (= 6.1.7.10)
- activerecord (= 6.1.7.10)
- activestorage (= 6.1.7.10)
- activesupport (= 6.1.7.10)
+ rails (7.0.8.7)
+ actioncable (= 7.0.8.7)
+ actionmailbox (= 7.0.8.7)
+ actionmailer (= 7.0.8.7)
+ actionpack (= 7.0.8.7)
+ actiontext (= 7.0.8.7)
+ actionview (= 7.0.8.7)
+ activejob (= 7.0.8.7)
+ activemodel (= 7.0.8.7)
+ activerecord (= 7.0.8.7)
+ activestorage (= 7.0.8.7)
+ activesupport (= 7.0.8.7)
bundler (>= 1.15.0)
- railties (= 6.1.7.10)
- sprockets-rails (>= 2.0.0)
+ railties (= 7.0.8.7)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
@@ -622,108 +617,126 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
- rails-html-sanitizer (1.5.0)
- loofah (~> 2.19, >= 2.19.1)
- rails-i18n (6.0.0)
+ rails-html-sanitizer (1.6.2)
+ loofah (~> 2.21)
+ 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)
+ rails-i18n (7.0.10)
i18n (>= 0.7, < 2)
- railties (>= 6.0.0, < 7)
- railties (6.1.7.10)
- actionpack (= 6.1.7.10)
- activesupport (= 6.1.7.10)
+ railties (>= 6.0.0, < 8)
+ railties (7.0.8.7)
+ actionpack (= 7.0.8.7)
+ activesupport (= 7.0.8.7)
method_source
rake (>= 12.2)
thor (~> 1.0)
+ zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.2.1)
- ransack (2.4.2)
- activerecord (>= 5.2.4)
- activesupport (>= 5.2.4)
+ ransack (3.2.1)
+ activerecord (>= 6.1.5)
+ activesupport (>= 6.1.5)
i18n
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
- redcarpet (3.6.0)
+ redcarpet (3.6.1)
redis (4.8.1)
- regexp_parser (2.9.2)
- reline (0.5.11)
+ regexp_parser (2.10.0)
+ reline (0.6.1)
io-console (~> 0.5)
request_store (1.5.1)
rack (>= 1.4)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
- rexml (3.3.9)
- rspec (3.13.0)
+ rexml (3.4.1)
+ rspec (3.13.1)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-cells (0.3.10)
cells (>= 4.0.0, < 6.0.0)
rspec-rails (>= 3.0.0)
- rspec-core (3.13.2)
+ rspec-core (3.13.4)
rspec-support (~> 3.13.0)
- rspec-expectations (3.13.1)
+ rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
- rspec-html-matchers (0.9.4)
+ rspec-html-matchers (0.10.0)
nokogiri (~> 1)
- rspec (>= 3.0.0.a, < 4)
- rspec-mocks (3.13.2)
+ rspec (>= 3.0.0.a)
+ rspec-mocks (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
- rspec-rails (4.1.2)
- actionpack (>= 4.2)
- activesupport (>= 4.2)
- railties (>= 4.2)
- rspec-core (~> 3.10)
- rspec-expectations (~> 3.10)
- rspec-mocks (~> 3.10)
- rspec-support (~> 3.10)
+ rspec-rails (6.1.5)
+ actionpack (>= 6.1)
+ activesupport (>= 6.1)
+ railties (>= 6.1)
+ rspec-core (~> 3.13)
+ rspec-expectations (~> 3.13)
+ rspec-mocks (~> 3.13)
+ rspec-support (~> 3.13)
rspec-retry (0.6.2)
rspec-core (> 3.3)
- rspec-support (3.13.1)
- rspec_junit_formatter (0.3.0)
+ rspec-support (3.13.4)
+ rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
- rubocop (1.28.2)
+ rubocop (1.65.1)
+ json (~> 2.3)
+ language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
- parser (>= 3.1.0.0)
+ parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
- regexp_parser (>= 1.8, < 3.0)
- rexml
- rubocop-ast (>= 1.17.0, < 2.0)
+ regexp_parser (>= 2.4, < 3.0)
+ rexml (>= 3.2.5, < 4.0)
+ rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
- unicode-display_width (>= 1.4.0, < 3.0)
- rubocop-ast (1.36.1)
+ unicode-display_width (>= 2.4.0, < 3.0)
+ rubocop-ast (1.38.1)
parser (>= 3.3.1.0)
+ rubocop-capybara (2.21.0)
+ rubocop (~> 1.41)
+ rubocop-factory_bot (2.26.1)
+ rubocop (~> 1.61)
rubocop-faker (1.2.0)
faker (>= 2.12.0)
rubocop (>= 1.13.0)
- rubocop-rails (2.15.2)
+ rubocop-performance (1.23.1)
+ rubocop (>= 1.48.1, < 2.0)
+ rubocop-ast (>= 1.31.1, < 2.0)
+ rubocop-rails (2.29.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
- rubocop (>= 1.7.0, < 2.0)
- rubocop-rspec (2.11.1)
- rubocop (~> 1.19)
+ rubocop (>= 1.52.0, < 2.0)
+ rubocop-ast (>= 1.31.1, < 2.0)
+ rubocop-rspec (3.4.0)
+ rubocop (~> 1.61)
+ rubocop-rspec_rails (2.30.0)
+ rubocop (~> 1.61)
+ rubocop-rspec (~> 3, >= 3.0.1)
+ rubocop-rubycw (0.1.6)
+ rubocop (~> 1.0)
ruby-progressbar (1.13.0)
- ruby-vips (2.2.2)
+ ruby-vips (2.2.4)
ffi (~> 1.12)
logger
- rubyXL (3.4.27)
+ rubyXL (3.4.33)
nokogiri (>= 1.10.8)
rubyzip (>= 1.3.0)
rubyzip (2.3.2)
- 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)
+ selenium-webdriver (4.33.0)
+ base64 (~> 0.2)
+ logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
- rubyzip (>= 1.2.2)
+ rubyzip (>= 1.2.2, < 3.0)
+ websocket (~> 1.0)
semantic_range (3.1.0)
- seven_zip_ruby (1.3.0)
- simplecov (0.21.2)
+ shakapacker (7.1.0)
+ activesupport (>= 5.2)
+ rack-proxy (>= 0.6.1)
+ railties (>= 5.2)
+ semantic_range (>= 2.3.0)
+ simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
@@ -733,46 +746,32 @@ GEM
simplecov-html (0.13.1)
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)
+ snaky_hash (2.0.3)
+ hashie (>= 0.1.0, < 6)
+ version_gem (>= 1.1.8, < 3)
+ spring (4.2.1)
+ spring-watcher-listen (2.1.0)
listen (>= 2.7, < 4.0)
- spring (>= 1.2, < 3.0)
- sprockets (4.2.1)
- concurrent-ruby (~> 1.0)
- rack (>= 2.2.4, < 4)
- sprockets-rails (3.5.2)
- actionpack (>= 6.1)
- activesupport (>= 6.1)
- sprockets (>= 3.0.0)
- ssrf_filter (1.2.0)
+ spring (>= 4)
+ stringio (3.1.7)
temple (0.10.3)
- terminal-table (3.0.2)
- unicode-display_width (>= 1.1.1, < 3)
+ terminal-table (4.0.0)
+ unicode-display_width (>= 1.1.1, < 4)
thor (1.3.2)
- thread_safe (0.3.6)
- tilt (2.4.0)
- timeout (0.4.2)
- tomlrb (2.0.3)
+ tilt (2.6.0)
+ timeout (0.4.3)
trailblazer-option (0.1.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unaccent (0.4.0)
unicode-display_width (2.6.0)
- uri (1.0.2)
- valid_email2 (2.3.1)
+ uniform_notifier (1.17.0)
+ uri (1.0.3)
+ valid_email2 (4.0.6)
activemodel (>= 3.2)
mail (~> 2.5)
- version_gem (1.1.4)
- virtus (2.0.0)
- axiom-types (~> 0.1)
- coercible (~> 1.0)
- descendants_tracker (~> 0.0, >= 0.0.3)
+ version_gem (1.1.8)
w3c_rspec_validators (0.3.0)
rails
rspec
@@ -788,19 +787,16 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
- webmock (3.24.0)
+ web-push (3.0.1)
+ jwt (~> 2.0)
+ openssl (~> 3.0)
+ webmock (3.25.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
- webpacker (6.0.0.rc.5)
- activesupport (>= 5.2)
- 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.6)
+ websocket (1.2.11)
+ websocket-driver (0.8.0)
+ base64
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
wicked_pdf (2.8.2)
@@ -808,32 +804,38 @@ GEM
ostruct
wisper (2.0.1)
wisper-rspec (1.1.0)
- wkhtmltopdf-binary (0.12.6.8)
xpath (3.2.0)
nokogiri (~> 1.8)
- zeitwerk (2.6.18)
+ zeitwerk (2.7.2)
PLATFORMS
- x86_64-linux
+ aarch64-linux-gnu
+ aarch64-linux-musl
+ arm-linux-gnu
+ arm-linux-musl
+ arm64-darwin
+ x86_64-darwin
+ x86_64-linux-gnu
+ x86_64-linux-musl
DEPENDENCIES
bootsnap (~> 1.3)
- decidim (~> 0.27)
+ decidim (~> 0.29.3)
decidim-admin_multi_factor!
- decidim-core
- decidim-dev
- graphql (= 1.12.24)
- graphql-docs (= 2.1.0)
- letter_opener_web (~> 1.4)
+ decidim-core (~> 0.29.3)
+ decidim-dev (~> 0.29.3)
+ graphql (~> 2.0)
+ graphql-docs (~> 4.0)
+ letter_opener_web (~> 2.0)
listen (~> 3.1)
rubocop-faker
rubocop-rspec
- spring (~> 2.0)
+ spring (~> 4.0)
spring-watcher-listen (~> 2.0)
- web-console (~> 4.0)
+ web-console (~> 4.2)
RUBY VERSION
- ruby 3.0.2p107
+ ruby 3.2.2p53
BUNDLED WITH
- 2.3.20
+ 2.5.22
diff --git a/app/commands/decidim/admin_multi_factor/send_email_verification.rb b/app/commands/decidim/admin_multi_factor/send_email_verification.rb
index 2aeeab8..0ac3437 100644
--- a/app/commands/decidim/admin_multi_factor/send_email_verification.rb
+++ b/app/commands/decidim/admin_multi_factor/send_email_verification.rb
@@ -23,7 +23,7 @@ def send_email_verification!
email: user.email,
verification: verification_code,
organization: user.organization,
- expires_at: expires_at
+ expires_at:
).deliver_later
verification_code
diff --git a/app/commands/decidim/admin_multi_factor/send_sms_verification.rb b/app/commands/decidim/admin_multi_factor/send_sms_verification.rb
index d0877ea..769def1 100644
--- a/app/commands/decidim/admin_multi_factor/send_sms_verification.rb
+++ b/app/commands/decidim/admin_multi_factor/send_sms_verification.rb
@@ -44,7 +44,7 @@ def gateway
end
def phone_with_country_code(country_code, phone_number)
- PhoneNumberFormatter.new(phone_number: phone_number, iso_country_code: country_code).format
+ PhoneNumberFormatter.new(phone_number:, iso_country_code: country_code).format
end
def phone_number
diff --git a/app/controllers/decidim/admin_multi_factor/admin/email_strategy_controller.rb b/app/controllers/decidim/admin_multi_factor/admin/email_strategy_controller.rb
index b4aefb4..397b8fe 100644
--- a/app/controllers/decidim/admin_multi_factor/admin/email_strategy_controller.rb
+++ b/app/controllers/decidim/admin_multi_factor/admin/email_strategy_controller.rb
@@ -13,7 +13,7 @@ class EmailStrategyController < ::Decidim::ApplicationController
def email
SendEmailVerification.call(current_user) do
on(:ok) do |result, expires_at|
- init_sessions!({ code: result, expires_at: expires_at, email: current_user.email, strategy: :email })
+ init_sessions!({ code: result, expires_at:, email: current_user.email, strategy: :email })
flash[:notice] = I18n.t("success", scope: "decidim.admin_multi_factor.admin.admin_multi_factor.email", email: current_user.email)
redirect_to decidim_admin_multi_factor_admin.verify_email_strategy_path
end
@@ -29,6 +29,7 @@ def verify
return redirect_to decidim_admin_multi_factor_admin.elevate_path if auth_session.blank?
@form = form(::Decidim::AdminMultiFactor::VerificationCodeForm).instance
+ @info = current_user.email
end
protected
diff --git a/app/controllers/decidim/admin_multi_factor/admin/sms_strategy_controller.rb b/app/controllers/decidim/admin_multi_factor/admin/sms_strategy_controller.rb
index a9e71f8..dc789d5 100644
--- a/app/controllers/decidim/admin_multi_factor/admin/sms_strategy_controller.rb
+++ b/app/controllers/decidim/admin_multi_factor/admin/sms_strategy_controller.rb
@@ -21,8 +21,8 @@ def verify
SendSmsVerification.call(form, current_user) do
on(:ok) do |result, expires_at, phone_number|
- init_sessions!({ code: result, expires_at: expires_at, email: current_user.email, strategy: :sms })
- flash[:notice] = I18n.t("success", scope: "decidim.admin_multi_factor.admin.admin_multi_factor.sms", phone_number: phone_number)
+ init_sessions!({ code: result, expires_at:, email: current_user.email, strategy: :sms })
+ flash[:notice] = I18n.t("success", scope: "decidim.admin_multi_factor.admin.admin_multi_factor.sms", phone_number:)
redirect_to decidim_admin_multi_factor_admin.verify_sms_code_path
end
@@ -35,6 +35,7 @@ def verify
def verify_sms_code
@form = form(::Decidim::AdminMultiFactor::VerificationCodeForm).instance
+ @info = current_user.email
end
protected
diff --git a/app/mailers/decidim/admin_multi_factor/verification_code_mailer.rb b/app/mailers/decidim/admin_multi_factor/verification_code_mailer.rb
index 8e3c944..455b05b 100644
--- a/app/mailers/decidim/admin_multi_factor/verification_code_mailer.rb
+++ b/app/mailers/decidim/admin_multi_factor/verification_code_mailer.rb
@@ -10,15 +10,25 @@ class VerificationCodeMailer < ApplicationMailer
# locale - The locale that will be used for the email content (optional).
#
# Returns nothing.
+ helper_method :confirm_path_url
+
def verification_code(email:, verification:, organization:, expires_at:)
@verification = verification.strip
@organization = organization
@expires_at = expires_at
I18n.with_locale(locale || organization.default_locale) do
- mail(to: email, subject: I18n.t("subject", scope: "decidim.admin_multi_factor.admin_multi_factor.email", verification: verification))
+ mail(to: email, subject: I18n.t("subject", scope: "decidim.admin_multi_factor.admin_multi_factor.email", verification:))
end
end
+
+ def confirm_path_url
+ "#{root_url}#{decidim_admin_multi_factor_admin.verify_email_strategy_path}"
+ end
+
+ def root_url
+ @root_url ||= decidim.root_url(host: @organization.host)[0..-2]
+ end
end
end
end
diff --git a/app/packs/stylesheets/decidim/admin_multi_factor/admin_multi_factor.scss b/app/packs/stylesheets/decidim/admin_multi_factor/admin_multi_factor.scss
index da6165b..082b7e6 100644
--- a/app/packs/stylesheets/decidim/admin_multi_factor/admin_multi_factor.scss
+++ b/app/packs/stylesheets/decidim/admin_multi_factor/admin_multi_factor.scss
@@ -2,12 +2,12 @@
.ss-main.country-select{
.ss-single-selected{
- padding: $input-padding;
- font-size: $input-font-size;
- line-height: $input-line-height;
+ padding: 10px;
+ font-size: 16px;
+ line-height: 0.75rem;
height: 2.4375rem;
- border: $input-border;
- box-shadow: $input-shadow;
+ border: 1px solid black;
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.ss-single-selected,
@@ -28,10 +28,23 @@ form input[type='number']::-webkit-inner-spin-button{
}
/* css for decidim_admin_multi_factor */
-
+.sms-card {
+ margin-bottom: 30px;
+ background: rgb(243 244 247 / var(--tw-bg-opacity, 1));
+ border: 1px solid #e8e8e8;
+ border-radius: 4px;
+ overflow: visible;
+ overflow-wrap: break-word;
+ hyphens: auto;
+ padding: 1.5rem;
+ width: 100%;
+ margin: auto;
+}
.flex-digits{
display: flex;
justify-content: space-between;
+ width: 40%;
+ margin: auto;
.flex-digits-input{
display: flex;
@@ -50,13 +63,14 @@ form input[type='number']::-webkit-inner-spin-button{
input{
margin: 0 auto;
height: 2.5rem;
- width: 2.5rem;
+ width: 3rem;
text-align: center;
- @include breakpoint(smallmedium up){
- height: 3rem;
- width: 3rem;
- }
+
+ //@include breakpoint(smallmedium up){
+ // height: 3rem;
+ // width: 3rem;
+ //}
}
}
}
diff --git a/app/views/decidim/admin_multi_factor/admin/admin_multi_factor/elevate.html.erb b/app/views/decidim/admin_multi_factor/admin/admin_multi_factor/elevate.html.erb
index 621bebb..ebe93ac 100644
--- a/app/views/decidim/admin_multi_factor/admin/admin_multi_factor/elevate.html.erb
+++ b/app/views/decidim/admin_multi_factor/admin/admin_multi_factor/elevate.html.erb
@@ -1,58 +1,56 @@
-<% add_decidim_page_title(t(".elevate_access")) %>
-
-
-
-
-
-
<%= t(".elevate_access") %>
-
-
- <%= t(".elevate_access_description") %>
-
-
-
-
- <% if admin_auth_settings.email? %>
-
-
-
- <%= link_to select_elevation_strategy_path(strategy: :email) , class: "button button--social button-primary", method: :post do %>
+
+ <% add_decidim_page_title(t(".elevate_access")) %>
+
+ <%= t(".elevate_access") %>
+
+
+
+ <%= t(".elevate_access_description") %>
+
+
+
+ <% if admin_auth_settings.email? %>
+
+
+
+ <%= link_to select_elevation_strategy_path(strategy: :email) , class: "button button__sm md:button__lg button__secondary w-40", method: :post do %>
<%= t(".email") %>
- <% end %>
+ <% end %>
+
+
-
-
- <% end %>
+ <% end %>
- <% if admin_auth_settings.sms? %>
-
-
-
- <%= link_to select_elevation_strategy_path(strategy: :sms) , class: "button button--social button-primary", method: :post do %>
+ <% if admin_auth_settings.sms? %>
+
+
+
+ <%= link_to select_elevation_strategy_path(strategy: :sms) , class: "button button__sm md:button__lg button__secondary w-40", method: :post do %>
<%= t(".sms") %>
- <% end %>
+ <% end %>
+
+
-
-
- <% end %>
+ <% end %>
- <% if admin_auth_settings.webauthn? %>
-
-
-
- <%= link_to select_elevation_strategy_path(strategy: :webauthn), class: "button button--social button-primary", method: :post do %>
+ <% if admin_auth_settings.webauthn? %>
+
+
+
+ <%= link_to select_elevation_strategy_path(strategy: :webauthn), class: "button button__sm md:button__lg button__secondary w-40", method: :post do %>
<%= t(".webauthn") %>
- <% end %>
+ <% end %>
+
+
-
+ <% end %>
- <% end %>
-
-
+
+
diff --git a/app/views/decidim/admin_multi_factor/admin/admin_multi_logins/edit.html.erb b/app/views/decidim/admin_multi_factor/admin/admin_multi_logins/edit.html.erb
index 4bfc093..2da1a7b 100644
--- a/app/views/decidim/admin_multi_factor/admin/admin_multi_logins/edit.html.erb
+++ b/app/views/decidim/admin_multi_factor/admin/admin_multi_logins/edit.html.erb
@@ -1,28 +1,30 @@
-<%= decidim_form_for(@form, html: { class: "form edit_organization" }, url: admin_multi_login_path) do |f| %>
-
-
-
<%= t ".title" %>
-
-
-
-
-
- <%= f.check_box :enable_multifactor, help_text: t(".enable_admin_multifactor_help_html") %>
-
-
- <%= f.check_box :email, help_text: t(".email_help_html") %>
-
-
- <%= f.check_box :sms, help_text: t(".sms_help_html") %>
+
-
- <%= f.submit t(".update") %>
+ <% end %>
-<% end %>
+
diff --git a/app/views/decidim/admin_multi_factor/admin/email_strategy/verify.html.erb b/app/views/decidim/admin_multi_factor/admin/email_strategy/verify.html.erb
index 8d382cd..03d0796 100644
--- a/app/views/decidim/admin_multi_factor/admin/email_strategy/verify.html.erb
+++ b/app/views/decidim/admin_multi_factor/admin/email_strategy/verify.html.erb
@@ -1,43 +1,38 @@
-
-
-
-
-
<%= t(".welcome", organization: current_organization.name).html_safe %>
-
-
-
-
-
-
-
<%= t(".enter_code") %>
-
- <%= t(".instruction", contact_info: @info) %>
-
- <%= decidim_form_for(@form, url: verify_submitted_code_path, method: :post) do |form| %>
-
-
- <% Decidim::AdminMultiFactor.auth_code_length.times do |ind| %>
-
- " autocomplete="off" aria-label="<%= t(".inputs", count: ind + 1) %>">
-
- <% end %>
+
+
+ <%= t(".welcome", organization: translated_attribute(current_organization.name)).html_safe %>
+
+
+
+
+
+
<%= t(".enter_code") %>
+
+ <%= t(".instruction", contact_info: @info) %>
+
+ <%= decidim_form_for(@form, url: verify_submitted_code_path, method: :post, class: "form-defaults") do |form| %>
+
+
+
<%= t("decidim.forms.errors.error") %>
+ <%= form.hidden_field :verification %>
+
+ <%= form.submit t(".submit"), class:"button button__sm md:button__lg button__secondary w-40" %>
+
-
+ <% end %>
+
+ <%= t(".have_not_received") %>
+ <%= link_to t(".resend_code"), select_elevation_strategy_path(strategy: :email, resent: true), method: :post %>
+
-
+
-<%= javascript_pack_tag "decidim_admin_multi_factor" %>
+<%= append_javascript_pack_tag "decidim_admin_multi_factor" %>
diff --git a/app/views/decidim/admin_multi_factor/admin/sms_strategy/sms.html.erb b/app/views/decidim/admin_multi_factor/admin/sms_strategy/sms.html.erb
index 408966a..ee6217c 100644
--- a/app/views/decidim/admin_multi_factor/admin/sms_strategy/sms.html.erb
+++ b/app/views/decidim/admin_multi_factor/admin/sms_strategy/sms.html.erb
@@ -1,38 +1,32 @@
-
-
-
-
-
<%= t(".welcome", organization: current_organization.name).html_safe %>
-
-
-
-
-
- <%= decidim_form_for(@form, url: verify_sms_strategy_path, method: :post) do |form| %>
-
-
- <%= form.select :phone_country, phone_country_options(form.object.phone_country), { id: "omniauth_country", include_blank: true }, class: "country-select" %>
-
-
- <%= form.number_field :phone_number %>
-
-
-
-
- <%= form.submit t(".submit"), class:"button expanded" %>
-
-
- <% end %>
-
- <%= t(".have_not_received") %>
- <%= link_to t(".resend_code"), select_elevation_strategy_path(strategy: :sms, resent: true), method: :post %>
-
+
+
+ <%= t(".welcome", organization: translated_attribute(current_organization.name)).html_safe %>
+
+
+
+
+ <%= decidim_form_for(@form, url: verify_sms_strategy_path, method: :post, class: "block") do |form| %>
+
+
+ <%= form.select :phone_country, phone_country_options(form.object.phone_country), { id: "omniauth_country", include_blank: true }, class: "country-select" %>
+
+
+ <%= form.number_field :phone_number, class: "w-full" %>
+
+
+
+
+ <%= form.submit t(".submit"), class:"button button__sm md:button__lg button__secondary w-40" %>
+
-
-
+ <% end %>
+
+ <%= t(".have_not_received") %>
+ <%= link_to t(".resend_code"), select_elevation_strategy_path(strategy: :sms, resent: true), method: :post %>
+
-
+
-<%= javascript_pack_tag "decidim_admin_multi_factor" %>
-<%= javascript_pack_tag "decidim_select_country" %>
+<%= append_javascript_pack_tag "decidim_admin_multi_factor" %>
+<%= append_javascript_pack_tag "decidim_select_country" %>
diff --git a/app/views/decidim/admin_multi_factor/admin/sms_strategy/verify_sms_code.html.erb b/app/views/decidim/admin_multi_factor/admin/sms_strategy/verify_sms_code.html.erb
index 33131eb..2e84960 100644
--- a/app/views/decidim/admin_multi_factor/admin/sms_strategy/verify_sms_code.html.erb
+++ b/app/views/decidim/admin_multi_factor/admin/sms_strategy/verify_sms_code.html.erb
@@ -1,43 +1,38 @@
-
-
-
-
-
<%= t(".welcome", organization: current_organization.name).html_safe %>
-
-
-
-
-
-
-
<%= t(".enter_code") %>
-
- <%= t(".instruction", contact_info: @info) %>
-
- <%= decidim_form_for(@form, url: verify_submitted_code_path, method: :post) do |form| %>
-
-
- <% Decidim::AdminMultiFactor.auth_code_length.times do |ind| %>
-
- " autocomplete="off" aria-label="<%= t(".inputs", count: ind + 1) %>">
-
- <% end %>
+
+
+ <%= t(".welcome", organization: translated_attribute(current_organization.name)).html_safe %>
+
+
+
+
+
+
<%= t(".enter_code") %>
+
+ <%= t(".instruction", contact_info: @info) %>
+
+ <%= decidim_form_for(@form, url: verify_submitted_code_path, method: :post, class: "form-defaults") do |form| %>
+
+
+
<%= t("decidim.forms.errors.error") %>
+ <%= form.hidden_field :verification %>
+
+ <%= form.submit t(".submit"), class:"button button__sm md:button__lg button__secondary w-40" %>
+
-
+ <% end %>
+
+ <%= t(".have_not_received") %>
+ <%= link_to t(".resend_code"), select_elevation_strategy_path(strategy: :sms, resent: true), method: :post %>
+
-
+
-<%= javascript_pack_tag "decidim_admin_multi_factor" %>
+<%= append_javascript_pack_tag "decidim_admin_multi_factor" %>
diff --git a/app/views/decidim/admin_multi_factor/verification_code_mailer/verification_code.html.erb b/app/views/decidim/admin_multi_factor/verification_code_mailer/verification_code.html.erb
index 5c7cc1d..3816fe7 100644
--- a/app/views/decidim/admin_multi_factor/verification_code_mailer/verification_code.html.erb
+++ b/app/views/decidim/admin_multi_factor/verification_code_mailer/verification_code.html.erb
@@ -1,6 +1,6 @@
<%= t(".title") %>
-
<%= t(".subtitle_html", organization: link_to(@organization.name, confirm_path_url)) %>
+
<%= t(".subtitle_html", organization: link_to(translated_attribute(@organization.name), confirm_path_url)) %>
<%= t(".copy") %>
diff --git a/config/assets.rb b/config/assets.rb
index d4c3098..009462b 100644
--- a/config/assets.rb
+++ b/config/assets.rb
@@ -5,6 +5,6 @@
Decidim::Webpacker.register_path("#{base_path}/app/packs")
Decidim::Webpacker.register_entrypoints(
decidim_admin_multi_factor: "#{base_path}/app/packs/entrypoints/decidim_admin_multi_factor.js",
- decidim_select_country: "#{base_path}/app/packs/entrypoints/decidim_select_country.js",
+ decidim_select_country: "#{base_path}/app/packs/entrypoints/decidim_select_country.js"
)
Decidim::Webpacker.register_stylesheet_import("stylesheets/decidim/admin_multi_factor/admin_multi_factor")
diff --git a/config/locales/en.yml b/config/locales/en.yml
index f3b00ff..521999d 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -65,6 +65,19 @@ en:
resend_code: Resend code
submit: Submit
welcome: Welcome to the
%{organization} platform!
+ admin_multi_factor:
+ email:
+ subject: 'Your auth code is: %{verification}'
+ verification_code_mailer:
+ verification_code:
+ copy: 'Copy this code:'
+ expires_in: It will expire in %{time}.
+ ignore_html: If you didn't request this communication, please ignore this
+ email.
Your account won't be active until your account is fully confirmed.
+ subtitle_html: To finalize the authentication you just need to copy the
+ 4 digit code below, go back to the %{organization} verification page and
+ paste it!
+ title: Your 2Factor Authentication
components:
admin_multi_factor:
name: AdminMultiFactor
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 5a2e699..64aeac2 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -58,6 +58,16 @@ fr:
resend_code: Renvoyer le code
submit: Soumettre
welcome: Bienvenue sur la plateforme
%{organization} !
+ admin_multi_factor:
+ email:
+ subject: 'Votre code d''authentification est : %{verification}'
+ verification_code_mailer:
+ verification_code:
+ copy: 'Copiez ce code :'
+ expires_in: Il va expirer dans %{time}.
+ ignore_html: Si vous n'avez pas demandé à recevoir cette communication, veuillez ignorer cet email.
Votre compte ne sera pas actif tant que votre compte n'est pas confirmé.
+ subtitle_html: Pour finaliser l'authentification, il vous suffit de copier le code à 4 chiffres ci-dessous, retournez à la page de vérification %{organization} et collez-le.
+ title: Votre authentification à deux facteurs
components:
admin_multi_factor:
name: AdminMultiFactor
diff --git a/decidim-admin_multi_factor.gemspec b/decidim-admin_multi_factor.gemspec
index 895ae7a..e817f44 100644
--- a/decidim-admin_multi_factor.gemspec
+++ b/decidim-admin_multi_factor.gemspec
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
s.email = ["contact@alecslupu.ro"]
s.license = "AGPL-3.0"
s.homepage = "https://github.com/decidim/decidim-module-admin_multi_factor"
- s.required_ruby_version = "~> 3.0"
+ s.required_ruby_version = "~> 3.2"
s.name = "decidim-admin_multi_factor"
s.summary = "A decidim admin_multi_factor module"
@@ -22,7 +22,8 @@ Gem::Specification.new do |s|
f.start_with?(*%w(app/ config/ db/ lib/ LICENSE-AGPLv3.txt Rakefile README.md))
end
end
-
+
s.add_dependency "countries", "~> 5.1", ">= 5.1.2"
- s.add_dependency "decidim-core", Decidim::AdminMultiFactor.version
+ s.add_dependency "decidim-core", Decidim::AdminMultiFactor.decidim_version
+ s.metadata["rubygems_mfa_required"] = "true"
end
diff --git a/lib/decidim/admin_multi_factor/test/factories.rb b/lib/decidim/admin_multi_factor/test/factories.rb
index 5602045..36d54ed 100644
--- a/lib/decidim/admin_multi_factor/test/factories.rb
+++ b/lib/decidim/admin_multi_factor/test/factories.rb
@@ -5,7 +5,7 @@
FactoryBot.define do
factory :admin_multi_factor_component, parent: :component do
name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :admin_multi_factor).i18n_name }
- manifest_name :admin_multi_factor
+ manifest_name { :admin_multi_factor }
participatory_space { create(:participatory_process, :with_steps) }
end
diff --git a/lib/decidim/admin_multi_factor/version.rb b/lib/decidim/admin_multi_factor/version.rb
index 0aeccd1..4b1b604 100644
--- a/lib/decidim/admin_multi_factor/version.rb
+++ b/lib/decidim/admin_multi_factor/version.rb
@@ -4,7 +4,11 @@ module Decidim
# This holds the decidim-meetings version.
module AdminMultiFactor
def self.version
- "0.27.9"
+ "0.29.3"
+ end
+
+ def self.decidim_version
+ "~> 0.29.3"
end
end
end
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..31b2728
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,6 @@
+{
+ "name": "decidim-module-admin_multi_factor",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {}
+}
diff --git a/spec/i18n_spec.rb b/spec/i18n_spec.rb
index a7b2176..c74b8ce 100644
--- a/spec/i18n_spec.rb
+++ b/spec/i18n_spec.rb
@@ -23,8 +23,8 @@
unless ENV["SKIP_NORMALIZATION"]
it "is normalized" do
error_message = "The following files need to be normalized:\n" \
- "#{non_normalized_paths.map { |path| " #{path}" }.join("\n")}\n" \
- "Please run `bundle exec i18n-tasks normalize --locales #{locales}` to fix them"
+ "#{non_normalized_paths.map { |path| " #{path}" }.join("\n")}\n" \
+ "Please run `bundle exec i18n-tasks normalize --locales #{locales}` to fix them"
expect(non_normalized_paths).to be_empty, error_message
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index db3a51c..a30b234 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -4,6 +4,6 @@
ENV["ENGINE_ROOT"] = File.dirname(__dir__)
-Decidim::Dev.dummy_app_path = File.expand_path(File.join("..", "spec", "decidim_dummy_app"))
+Decidim::Dev.dummy_app_path = File.expand_path(File.join("spec", "decidim_dummy_app"))
require "decidim/dev/test/base_spec_helper"
diff --git a/spec/system/admin_double_authentication_spec.rb b/spec/system/admin_double_authentication_spec.rb
new file mode 100644
index 0000000..1124126
--- /dev/null
+++ b/spec/system/admin_double_authentication_spec.rb
@@ -0,0 +1,88 @@
+# frozen_string_literal: true
+
+require "spec_helper"
+
+describe "Admin double authentication", type: :system do
+ include Decidim::SanitizeHelper
+
+ let(:organization) { create :organization, default_locale: :en }
+ let(:admin) { create :user, :admin, :confirmed, organization: }
+ let!(:setting) { Decidim::AdminMultiFactor::Setting.create!(enable_multifactor: true, email: true, sms: true, organization:) }
+
+ before do
+ switch_to_host(organization.host)
+ end
+
+ describe "Access back office" do
+ before do
+ # access the elevate page
+ login_as admin, scope: :user
+ visit decidim.root_path
+ find("#trigger-dropdown-account").click
+ li = page.all("ul.main-bar__dropdown li")
+ li[4].click
+ # set the verification code
+ # rubocop:disable RSpec/AnyInstance
+ allow_any_instance_of(Decidim::AdminMultiFactor::BaseVerification).to receive(:generate_code).and_return("1234")
+ # rubocop:enable RSpec/AnyInstance
+ end
+
+ it "can access back office with email" do
+ expect(page).to have_content("Elevate access rights")
+ links = page.all("a.button.button__sm.button__secondary.w-40")
+ links[0].click # first link is Email
+ expect(page).to have_content("Please enter the code:")
+ fill_in "digit1", with: 1
+ fill_in "digit2", with: 2
+ fill_in "digit3", with: 3
+ fill_in "digit4", with: 4
+ click_link_or_button "Submit"
+ expect(page).to have_content("Dashboard #{translated_attribute(organization.name)}")
+ end
+
+ it "can access back office with sms" do
+ expect(page).to have_content("Elevate access rights")
+ links = page.all("a.button.button__sm.button__secondary.w-40")
+ links[1].click # second link is Sms
+ fill_in "sms_code[phone_number]", with: "0612345678"
+ click_link_or_button "Submit"
+ expect(page).to have_content("Please enter the code:")
+ fill_in "digit1", with: 1
+ fill_in "digit2", with: 2
+ fill_in "digit3", with: 3
+ fill_in "digit4", with: 4
+ click_link_or_button "Submit"
+ expect(page).to have_content("Dashboard #{translated_attribute(organization.name)}")
+ end
+
+ it "can't access back office with email if code is wrong" do
+ expect(page).to have_content("Elevate access rights")
+ links = page.all("a.button.button__sm.button__secondary.w-40")
+ links[0].click # first link is Email
+ expect(page).to have_content("Please enter the code:")
+ # enters a wrong code
+ fill_in "digit1", with: 5
+ fill_in "digit2", with: 6
+ fill_in "digit3", with: 7
+ fill_in "digit4", with: 8
+ click_link_or_button "Submit"
+ expect(page).to have_content("The code entered is not valid")
+ end
+
+ it "can't access back office with sms if code is wrong" do
+ expect(page).to have_content("Elevate access rights")
+ links = page.all("a.button.button__sm.button__secondary.w-40")
+ links[1].click # second link is Sms
+ fill_in "sms_code[phone_number]", with: "0612345678"
+ click_link_or_button "Submit"
+ expect(page).to have_content("Please enter the code:")
+ # enters a wrong code
+ fill_in "digit1", with: 5
+ fill_in "digit2", with: 6
+ fill_in "digit3", with: 7
+ fill_in "digit4", with: 8
+ click_link_or_button "Submit"
+ expect(page).to have_content("The code entered is not valid")
+ end
+ end
+end
diff --git a/yarn.lock b/yarn.lock
new file mode 100644
index 0000000..fb57ccd
--- /dev/null
+++ b/yarn.lock
@@ -0,0 +1,4 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+