From 8876e7858c944cf1111872c6f257b63292ea46c3 Mon Sep 17 00:00:00 2001 From: LauraJaimeC <75725233+LauraJaimeC@users.noreply.github.com> Date: Mon, 11 Jul 2022 14:10:37 +0200 Subject: [PATCH] Compatibility with Decidim v0.25 (#61) * Bump Decidim version to 0.25 * Remove old assets * Set new assets in packs with Webpacker * Use pack helpers for images and importations * Changes in card images * Rubocopify * Fix tests with image_pack_tag * Bump module version * Remove duplicated style importation * Rubocopify --- CHANGELOG.md | 3 + Gemfile | 5 +- Gemfile.lock | 742 ++++++++---------- .../config/decidim_challenges_manifest.css | 19 - .../config/decidim_challenges_manifest.js | 3 - .../config/decidim_problems_manifest.css | 19 - .../config/decidim_problems_manifest.js | 1 - app/assets/config/decidim_sdgs_manifest.css | 18 - app/assets/config/decidim_sdgs_manifest.js | 0 .../config/decidim_solutions_manifest.css | 19 - .../config/decidim_solutions_manifest.js | 1 - .../decidim/challenges/challenges.scss | 3 - .../challenges/challenges/_challenge.scss | 125 --- .../decidim/problems/problems.scss | 2 - .../decidim/problems/problems/_problem.scss | 130 --- .../decidim/solutions/solutions.css | 0 .../decidim/challenges/challenge_m/show.erb | 2 +- .../decidim/challenges/challenge_m_cell.rb | 4 +- app/cells/decidim/problems/problem_m/show.erb | 2 +- .../decidim/solutions/solution_m/show.erb | 2 +- .../challenges/admin/challenges_form.rb | 9 +- app/models/decidim/challenges/challenge.rb | 6 +- app/packs/entrypoints/decidim_challenges.js | 4 + app/packs/entrypoints/decidim_challenges.scss | 1 + app/packs/entrypoints/decidim_problems.js | 1 + app/packs/entrypoints/decidim_problems.scss | 1 + app/packs/entrypoints/decidim_sdgs.js | 4 + app/packs/entrypoints/decidim_sdgs.scss | 1 + app/packs/entrypoints/decidim_solutions.js | 4 + app/packs/entrypoints/decidim_solutions.scss | 1 + app/{assets => packs}/fonts/Oswald-Medium.ttf | Bin .../images/decidim/challenges/icon.svg | 0 .../images/decidim/sdgs/ods-01.svg | 0 .../images/decidim/sdgs/ods-02.svg | 0 .../images/decidim/sdgs/ods-03.svg | 0 .../images/decidim/sdgs/ods-04.svg | 0 .../images/decidim/sdgs/ods-05.svg | 0 .../images/decidim/sdgs/ods-06.svg | 0 .../images/decidim/sdgs/ods-07.svg | 0 .../images/decidim/sdgs/ods-08.svg | 0 .../images/decidim/sdgs/ods-09.svg | 0 .../images/decidim/sdgs/ods-10.svg | 0 .../images/decidim/sdgs/ods-11.svg | 0 .../images/decidim/sdgs/ods-12.svg | 0 .../images/decidim/sdgs/ods-13.svg | 0 .../images/decidim/sdgs/ods-14.svg | 0 .../images/decidim/sdgs/ods-15.svg | 0 .../images/decidim/sdgs/ods-16.svg | 0 .../images/decidim/sdgs/ods-17.svg | 0 .../images/decidim/sdgs/sdg-wheel.png | Bin .../images/decidim/sdgs/un_emblem_square.png | Bin .../src/decidim/challenges/add_challenge.js} | 0 .../challenges/admin/challenges_form.js} | 0 .../decidim/challenges/challenges.scss | 129 +++ .../decidim/problems/problems.scss | 134 ++++ .../stylesheets/decidim/sdgs/ods.scss | 7 +- .../decidim/sdgs/sdgs_filter/button.scss | 0 .../decidim/sdgs/sdgs_filter/modal.scss | 0 .../decidim/solutions/solutions.scss | 7 +- .../solutions/solutions/_solution.scss | 0 .../decidim/challenges/challenge_presenter.rb | 2 +- .../challenges/challenges/_filters.html.erb | 1 - .../challenges/challenges/index.html.erb | 6 +- .../challenges/challenges/show.html.erb | 7 +- .../problems/problems/_filters.html.erb | 1 - .../decidim/problems/problems/index.html.erb | 6 +- .../decidim/problems/problems/show.html.erb | 8 +- app/views/decidim/sdgs/sdgs/index.html.erb | 40 +- .../decidim/sdgs/sdgs_filter/_modal.html.erb | 3 +- .../solutions/solutions/_filters.html.erb | 1 - .../solutions/solutions/index.html.erb | 6 +- .../decidim/solutions/solutions/show.html.erb | 10 +- config/assets.rb | 26 + lib/decidim/challenges/engine.rb | 8 +- lib/decidim/challenges/version.rb | 4 +- lib/decidim/problems/engine.rb | 8 +- lib/decidim/sdgs/engine.rb | 7 +- lib/decidim/solutions/engine.rb | 8 +- .../challenges/admin/challenges_form_spec.rb | 5 +- .../challenges/challenge_search_spec.rb | 64 +- .../decidim/problems/problem_search_spec.rb | 70 +- .../decidim/solutions/solution_search_spec.rb | 64 +- .../decidim/problems/filter_problems_spec.rb | 6 +- 83 files changed, 840 insertions(+), 930 deletions(-) delete mode 100644 app/assets/config/decidim_challenges_manifest.css delete mode 100644 app/assets/config/decidim_challenges_manifest.js delete mode 100644 app/assets/config/decidim_problems_manifest.css delete mode 100644 app/assets/config/decidim_problems_manifest.js delete mode 100644 app/assets/config/decidim_sdgs_manifest.css delete mode 100644 app/assets/config/decidim_sdgs_manifest.js delete mode 100644 app/assets/config/decidim_solutions_manifest.css delete mode 100644 app/assets/config/decidim_solutions_manifest.js delete mode 100644 app/assets/stylesheets/decidim/challenges/challenges.scss delete mode 100644 app/assets/stylesheets/decidim/challenges/challenges/_challenge.scss delete mode 100644 app/assets/stylesheets/decidim/problems/problems.scss delete mode 100644 app/assets/stylesheets/decidim/problems/problems/_problem.scss delete mode 100644 app/assets/stylesheets/decidim/solutions/solutions.css create mode 100644 app/packs/entrypoints/decidim_challenges.js create mode 100644 app/packs/entrypoints/decidim_challenges.scss create mode 100644 app/packs/entrypoints/decidim_problems.js create mode 100644 app/packs/entrypoints/decidim_problems.scss create mode 100644 app/packs/entrypoints/decidim_sdgs.js create mode 100644 app/packs/entrypoints/decidim_sdgs.scss create mode 100644 app/packs/entrypoints/decidim_solutions.js create mode 100644 app/packs/entrypoints/decidim_solutions.scss rename app/{assets => packs}/fonts/Oswald-Medium.ttf (100%) rename app/{assets => packs}/images/decidim/challenges/icon.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-01.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-02.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-03.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-04.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-05.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-06.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-07.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-08.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-09.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-10.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-11.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-12.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-13.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-14.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-15.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-16.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/ods-17.svg (100%) rename app/{assets => packs}/images/decidim/sdgs/sdg-wheel.png (100%) rename app/{assets => packs}/images/decidim/sdgs/un_emblem_square.png (100%) rename app/{assets/javascripts/decidim/challenges/add_challenge.js.es6 => packs/src/decidim/challenges/add_challenge.js} (100%) rename app/{assets/javascripts/decidim/challenges/admin/challenges_form.js.es6 => packs/src/decidim/challenges/admin/challenges_form.js} (100%) create mode 100644 app/packs/stylesheets/decidim/challenges/challenges.scss create mode 100644 app/packs/stylesheets/decidim/problems/problems.scss rename app/{assets => packs}/stylesheets/decidim/sdgs/ods.scss (92%) rename app/{assets => packs}/stylesheets/decidim/sdgs/sdgs_filter/button.scss (100%) rename app/{assets => packs}/stylesheets/decidim/sdgs/sdgs_filter/modal.scss (100%) rename app/{assets => packs}/stylesheets/decidim/solutions/solutions.scss (77%) rename app/{assets => packs}/stylesheets/decidim/solutions/solutions/_solution.scss (100%) create mode 100644 config/assets.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ca92b14..516d87de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ Following Semantic Versioning 2. ## next version: +## Version 0.1.0 (MINOR) +- Increase minimum Decidim version to 0.25.2 + ## Version 0.0.15 (PATCH) - Check if the file has any errors in format in the Challenges surveys. diff --git a/Gemfile b/Gemfile index 0e068244..42b068c5 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source "https://rubygems.org" ruby RUBY_VERSION -DECIDIM_VERSION = { git: "https://github.com/decidim/decidim", branch: "release/0.24-stable" }.freeze +DECIDIM_VERSION = { git: "https://github.com/decidim/decidim", branch: "release/0.25-stable" }.freeze gem "decidim", DECIDIM_VERSION gem "decidim-challenges", path: "." @@ -12,6 +12,9 @@ gem "decidim-challenges", path: "." gem "bootsnap", "~> 1.4" gem "puma", ">= 4.3" gem "uglifier", "~> 4.1" +# Remove this nokogiri forces version at any time but make sure that no __truncato_root__ text appears in the cards in general. +# More exactly in comments in the homepage and in processes cards in the processes listing +gem "nokogiri", "1.13.3" group :development, :test do gem "byebug", ">= 11.1.3" diff --git a/Gemfile.lock b/Gemfile.lock index 0f02523d..ee6d73b0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,78 +1,66 @@ GIT remote: https://github.com/decidim/decidim - revision: e8b392a4b1f09d80622e731fddfe3e0229ef47ef - branch: release/0.24-stable + revision: 5455ffe38454a22a8feccbafda7ecf1e1ace652b + branch: release/0.25-stable specs: - decidim (0.24.2) - decidim-accountability (= 0.24.2) - decidim-admin (= 0.24.2) - decidim-api (= 0.24.2) - decidim-assemblies (= 0.24.2) - decidim-blogs (= 0.24.2) - decidim-budgets (= 0.24.2) - decidim-comments (= 0.24.2) - decidim-core (= 0.24.2) - decidim-debates (= 0.24.2) - decidim-forms (= 0.24.2) - decidim-generators (= 0.24.2) - decidim-meetings (= 0.24.2) - decidim-pages (= 0.24.2) - decidim-participatory_processes (= 0.24.2) - decidim-proposals (= 0.24.2) - decidim-sortitions (= 0.24.2) - decidim-surveys (= 0.24.2) - decidim-system (= 0.24.2) - decidim-templates (= 0.24.2) - decidim-verifications (= 0.24.2) - decidim-accountability (0.24.2) - decidim-comments (= 0.24.2) - decidim-core (= 0.24.2) - kaminari (~> 1.2, >= 1.2.1) - searchlight (~> 4.1) - decidim-admin (0.24.2) + decidim (0.25.2) + decidim-accountability (= 0.25.2) + decidim-admin (= 0.25.2) + decidim-api (= 0.25.2) + decidim-assemblies (= 0.25.2) + decidim-blogs (= 0.25.2) + decidim-budgets (= 0.25.2) + decidim-comments (= 0.25.2) + decidim-core (= 0.25.2) + decidim-debates (= 0.25.2) + decidim-forms (= 0.25.2) + decidim-generators (= 0.25.2) + decidim-meetings (= 0.25.2) + decidim-pages (= 0.25.2) + decidim-participatory_processes (= 0.25.2) + decidim-proposals (= 0.25.2) + decidim-sortitions (= 0.25.2) + decidim-surveys (= 0.25.2) + decidim-system (= 0.25.2) + decidim-templates (= 0.25.2) + decidim-verifications (= 0.25.2) + decidim-accountability (0.25.2) + decidim-comments (= 0.25.2) + decidim-core (= 0.25.2) + decidim-admin (0.25.2) active_link_to (~> 1.0) - decidim-core (= 0.24.2) + decidim-core (= 0.25.2) devise (~> 4.7) devise-i18n (~> 1.2) - devise_invitable (~> 1.7) - jquery-rails (~> 4.4) - sassc (~> 2.4.0) - sassc-rails (~> 2.1.2) - decidim-api (0.24.2) - graphiql-rails (~> 1.4, < 1.5) + devise_invitable (~> 2.0) + decidim-api (0.25.2) graphql (~> 1.12, >= 1.12.3) rack-cors (~> 1.0) redcarpet (~> 3.5, >= 3.5.1) - sprockets-es6 (~> 0.9.2) - decidim-assemblies (0.24.2) - decidim-core (= 0.24.2) - decidim-blogs (0.24.2) - decidim-admin (= 0.24.2) - decidim-comments (= 0.24.2) - decidim-core (= 0.24.2) - jquery-tmpl-rails (~> 1.1) - kaminari (~> 1.2, >= 1.2.1) - decidim-budgets (0.24.2) - decidim-comments (= 0.24.2) - decidim-core (= 0.24.2) - kaminari (~> 1.2, >= 1.2.1) - searchlight (~> 4.1) - decidim-comments (0.24.2) - decidim-core (= 0.24.2) - jquery-rails (~> 4.4) + decidim-assemblies (0.25.2) + decidim-core (= 0.25.2) + decidim-blogs (0.25.2) + decidim-admin (= 0.25.2) + decidim-comments (= 0.25.2) + decidim-core (= 0.25.2) + decidim-budgets (0.25.2) + decidim-comments (= 0.25.2) + decidim-core (= 0.25.2) + decidim-comments (0.25.2) + decidim-core (= 0.25.2) redcarpet (~> 3.5, >= 3.5.1) - decidim-core (0.24.2) + decidim-core (0.25.2) active_link_to (~> 1.0) + acts_as_list (~> 0.9) anchored (~> 1.1) - autoprefixer-rails (~> 8.0) batch-loader (~> 1.2) browser (~> 2.7) carrierwave (~> 2.2.1) cells-erb (~> 0.1.0) - cells-rails (~> 0.0.9) + cells-rails (~> 0.1.3) charlock_holmes (~> 0.7) date_validator (~> 0.9.0) - decidim-api (= 0.24.2) + decidim-api (= 0.25.2) devise (~> 4.7) devise-i18n (~> 1.2) diffy (~> 3.3) @@ -81,21 +69,19 @@ GIT etherpad-lite (~> 0.3) file_validators (~> 2.1) fog-local (~> 0.6) - foundation-rails (~> 6.6, < 6.7) - foundation_rails_helper (~> 3.0) + foundation_rails_helper geocoder (~> 1.5) hashdiff (>= 0.4.0, < 2.0.0) invisible_captcha (~> 0.12) - jquery-rails (~> 4.4) kaminari (~> 1.2, >= 1.2.1) loofah (~> 2.3.1) mini_magick (~> 4.9) mustache (~> 1.1.0) nobspw (~> 0.6.0) - omniauth (~> 1.9) + omniauth (~> 2.0) omniauth-facebook (~> 5.0) - omniauth-google-oauth2 (~> 0.7) - omniauth-rails_csrf_protection (~> 0.1) + omniauth-google-oauth2 (~> 1.0) + omniauth-rails_csrf_protection (~> 1.0) omniauth-twitter (~> 1.4) paper_trail (~> 10.3) pg (~> 1.1.4, < 2) @@ -103,181 +89,178 @@ GIT premailer-rails (~> 1.10) rack (~> 2.2, >= 2.2.3) rack-attack (~> 6.0) - rails (~> 5.2.6) - rails-i18n (~> 5.0) + rails (~> 6.0.4) + 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) - sassc (~> 2.4.0) - sassc-rails (~> 2.1.2) + searchlight (~> 4.1) seven_zip_ruby (~> 1.3) social-share-button (~> 1.2, >= 1.2.1) - spreadsheet (~> 1.2) - sprockets (~> 3.7, < 4) - sprockets-es6 (~> 0.9.2) truncato (~> 0.7) - uglifier (~> 4.1) valid_email2 (~> 2.1) + webpacker (= 6.0.0.rc.5) wisper (~> 2.0) - decidim-debates (0.24.2) - decidim-comments (= 0.24.2) - decidim-core (= 0.24.2) - kaminari (~> 1.2, >= 1.2.1) - searchlight (~> 4.1) - decidim-dev (0.24.2) + decidim-debates (0.25.2) + decidim-comments (= 0.25.2) + decidim-core (= 0.25.2) + decidim-dev (0.25.2) + axe-core-rspec (~> 4.1.0) byebug (~> 11.0) capybara (~> 3.24) - db-query-matchers (~> 0.9.0) - decidim (= 0.24.2) - erb_lint (~> 0.0.28) + db-query-matchers (~> 0.10.0) + decidim (= 0.25.2) + erb_lint (~> 0.0.35) factory_bot_rails (~> 4.8) i18n-tasks (~> 0.9.18) mdl (~> 0.5) - nokogiri (~> 1.11, >= 1.11.1) - puffing-billy (~> 2.4.0) + nokogiri (~> 1.11, >= 1.11.4) puma (~> 5.0) rails-controller-testing (~> 1.0) rspec-cells (~> 0.3.4) rspec-html-matchers (~> 0.9.1) - rspec-rails (~> 3.7) + rspec-rails (~> 4.0) rspec-retry (~> 0.6.2) rspec_junit_formatter (~> 0.3.0) rubocop (~> 0.92.0) - rubocop-rails (~> 2.0) - rubocop-rspec (~> 1.21) + 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.1.1) - vcr (~> 6.0) + system_test_html_screenshots (~> 0.2) + w3c_rspec_validators (~> 0.3.0) webmock (~> 3.6) wisper-rspec (~> 1.0) - decidim-forms (0.24.2) - decidim-core (= 0.24.2) - wicked_pdf (~> 1.4) + decidim-forms (0.25.2) + decidim-core (= 0.25.2) + wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.24.2) - decidim-core (= 0.24.2) - decidim-meetings (0.24.2) - cells-erb (~> 0.1.0) - cells-rails (~> 0.0.9) - decidim-core (= 0.24.2) - decidim-forms (= 0.24.2) + decidim-generators (0.25.2) + decidim-core (= 0.25.2) + decidim-meetings (0.25.2) + decidim-core (= 0.25.2) + decidim-forms (= 0.25.2) icalendar (~> 2.5) - jquery-tmpl-rails (~> 1.1) - kaminari (~> 1.2, >= 1.2.1) - searchlight (~> 4.1) - decidim-pages (0.24.2) - decidim-core (= 0.24.2) - decidim-participatory_processes (0.24.2) - decidim-core (= 0.24.2) - decidim-proposals (0.24.2) - acts_as_list (~> 0.9) - cells-erb (~> 0.1.0) - cells-rails (~> 0.0.9) - decidim-comments (= 0.24.2) - decidim-core (= 0.24.2) + decidim-pages (0.25.2) + decidim-core (= 0.25.2) + decidim-participatory_processes (0.25.2) + decidim-core (= 0.25.2) + decidim-proposals (0.25.2) + decidim-comments (= 0.25.2) + decidim-core (= 0.25.2) doc2text (~> 0.4.3) - kaminari (~> 1.2, >= 1.2.1) - ransack (~> 2.1.1) redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.24.2) - decidim-admin (= 0.24.2) - decidim-comments (= 0.24.2) - decidim-core (= 0.24.2) - decidim-proposals (= 0.24.2) - decidim-surveys (0.24.2) - decidim-core (= 0.24.2) - decidim-forms (= 0.24.2) - decidim-templates (= 0.24.2) - decidim-system (0.24.2) + decidim-sortitions (0.25.2) + decidim-admin (= 0.25.2) + decidim-comments (= 0.25.2) + decidim-core (= 0.25.2) + decidim-proposals (= 0.25.2) + decidim-surveys (0.25.2) + decidim-core (= 0.25.2) + decidim-forms (= 0.25.2) + decidim-templates (= 0.25.2) + decidim-system (0.25.2) active_link_to (~> 1.0) - decidim-core (= 0.24.2) + decidim-core (= 0.25.2) devise (~> 4.7) devise-i18n (~> 1.2) - devise_invitable (~> 1.7) - jquery-rails (~> 4.4) - sassc (~> 2.4.0) - sassc-rails (~> 2.1.2) - decidim-templates (0.24.2) - decidim-core (= 0.24.2) - decidim-forms (= 0.24.2) - decidim-verifications (0.24.2) - decidim-core (= 0.24.2) + devise_invitable (~> 2.0) + decidim-templates (0.25.2) + decidim-core (= 0.25.2) + decidim-forms (= 0.25.2) + decidim-verifications (0.25.2) + decidim-core (= 0.25.2) PATH remote: . specs: - decidim-challenges (0.0.14) - decidim-core (~> 0.24.2) + decidim-challenges (0.1.0) + decidim-core (~> 0.25.2) GEM remote: https://rubygems.org/ specs: - actioncable (5.2.6) - actionpack (= 5.2.6) + actioncable (6.0.5) + actionpack (= 6.0.5) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) + actionmailbox (6.0.5) + actionpack (= 6.0.5) + activejob (= 6.0.5) + activerecord (= 6.0.5) + activestorage (= 6.0.5) + activesupport (= 6.0.5) + mail (>= 2.7.1) + actionmailer (6.0.5) + actionpack (= 6.0.5) + actionview (= 6.0.5) + activejob (= 6.0.5) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.6) - actionview (= 5.2.6) - activesupport (= 5.2.6) + actionpack (6.0.5) + actionview (= 6.0.5) + activesupport (= 6.0.5) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.6) - activesupport (= 5.2.6) + 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) + nokogiri (>= 1.8.5) + actionview (6.0.5) + activesupport (= 6.0.5) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) + rails-html-sanitizer (~> 1.1, >= 1.2.0) active_link_to (1.0.5) actionpack addressable - activejob (5.2.6) - activesupport (= 5.2.6) + activejob (6.0.5) + activesupport (= 6.0.5) globalid (>= 0.3.6) - activemodel (5.2.6) - activesupport (= 5.2.6) - activerecord (5.2.6) - activemodel (= 5.2.6) - activesupport (= 5.2.6) - arel (>= 9.0) - activestorage (5.2.6) - actionpack (= 5.2.6) - activerecord (= 5.2.6) - marcel (~> 1.0.0) - activesupport (5.2.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) + marcel (~> 1.0) + activesupport (6.0.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) + zeitwerk (~> 2.2, >= 2.2.2) acts_as_list (0.9.19) activerecord (>= 3.0) - addressable (2.7.0) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) anchored (1.1.0) - arel (9.0.0) ast (2.4.2) - autoprefixer-rails (8.6.5) - execjs + axe-core-api (4.4.0) + dumb_delegator + 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) - babel-source (5.8.35) - babel-transpiler (0.7.0) - babel-source (>= 4.0, < 6) - execjs (~> 2.0) batch-loader (1.5.0) - bcrypt (3.1.16) + bcrypt (3.1.18) better_html (1.0.16) actionview (>= 4.0) activesupport (>= 4.0) @@ -287,20 +270,21 @@ GEM parser (>= 2.4) smart_properties bindex (0.8.1) - bootsnap (1.7.5) - msgpack (~> 1.0) + bootsnap (1.11.1) + msgpack (~> 1.2) browser (2.7.1) builder (3.2.4) byebug (11.1.3) - capybara (3.35.3) + capybara (3.37.1) addressable + matrix mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (2.2.1) + carrierwave (2.2.2) activemodel (>= 5.0.0) activesupport (>= 5.0.0) addressable (~> 2.6) @@ -316,11 +300,11 @@ GEM cells-erb (0.1.0) cells (~> 4.0) erbse (>= 0.1.1) - cells-rails (0.0.9) - actionpack (>= 3.0) + cells-rails (0.1.5) + actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) charlock_holmes (0.7.7) - chef-utils (17.1.35) + chef-utils (17.10.0) concurrent-ruby childprocess (3.0.0) coercible (1.0.0) @@ -332,56 +316,46 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.8) - cookiejar (0.3.3) + concurrent-ruby (1.1.10) crack (0.4.5) rexml crass (1.0.6) - css_parser (1.9.0) + css_parser (1.11.0) addressable date_validator (0.9.0) activemodel activesupport - db-query-matchers (0.9.0) - activesupport (>= 4.0, <= 6.0) + db-query-matchers (0.10.0) + activesupport (>= 4.0, < 7) rspec (~> 3.0) declarative-builder (0.1.0) declarative-option (< 0.2.0) declarative-option (0.1.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.8.0) + devise (4.8.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-i18n (1.9.4) - devise (>= 4.7.1) - devise_invitable (1.7.5) - actionmailer (>= 4.1.0) - devise (>= 4.0.0) - diff-lcs (1.4.4) + devise-i18n (1.10.2) + devise (>= 4.8.0) + devise_invitable (2.0.6) + actionmailer (>= 5.0) + devise (>= 4.6) + diff-lcs (1.5.0) diffy (3.4.0) - doc2text (0.4.3) - nokogiri (~> 1.11.1) + doc2text (0.4.5) + nokogiri (>= 1.13.2, < 1.14.0) rubyzip (~> 2.3.0) docile (1.4.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - doorkeeper (5.5.1) + doorkeeper (5.5.4) railties (>= 5) doorkeeper-i18n (4.0.1) - em-http-request (1.1.7) - addressable (>= 2.3.4) - cookiejar (!= 0.3.1) - em-socksify (>= 0.3) - eventmachine (>= 1.0.3) - http_parser.rb (>= 0.6.0) - em-socksify (0.3.2) - eventmachine (>= 1.0.0.beta.4) - em-synchrony (1.0.6) - eventmachine (>= 1.0.0.beta.1) + dumb_delegator (1.0.0) equalizer (0.0.11) erb_lint (0.0.37) activesupport @@ -394,69 +368,53 @@ GEM erbse (0.1.4) temple erubi (1.10.0) - etherpad-lite (0.3.0) + etherpad-lite (0.3.1) rest-client (>= 1.6) - eventmachine (1.2.7) - eventmachine_httpserver (0.2.1) - excon (0.81.0) + excon (0.92.3) execjs (2.8.1) 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.18.0) - i18n (>= 1.6, < 2) - faraday (1.4.1) - faraday-excon (~> 1.1) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.1) - multipart-post (>= 1.2, < 3) + faker (2.21.0) + i18n (>= 1.8.11, < 2) + faraday (2.3.0) + faraday-net_http (~> 2.0) ruby2_keywords (>= 0.0.4) - faraday-excon (1.1.0) - faraday-net_http (1.0.1) - faraday-net_http_persistent (1.1.0) - ffi (1.15.0) + faraday-net_http (2.0.3) + ffi (1.15.5) file_validators (2.3.0) activemodel (>= 3.2) mime-types (>= 1.0) - fog-core (2.2.4) + fog-core (2.3.0) builder excon (~> 0.71) - formatador (~> 0.2) + formatador (>= 0.2, < 2.0) mime-types - fog-local (0.6.0) + fog-local (0.8.0) fog-core (>= 1.27, < 3.0) - formatador (0.2.5) - foundation-rails (6.6.2.0) - railties (>= 3.1.0) - sass (>= 3.3.0) - sprockets-es6 (>= 0.9.0) - foundation_rails_helper (3.0.0) - actionpack (>= 4.1, < 6.0) - activemodel (>= 4.1, < 6.0) - activesupport (>= 4.1, < 6.0) - railties (>= 4.1, < 6.0) - tzinfo (~> 1.2, >= 1.2.2) - geocoder (1.6.7) - globalid (0.4.2) - activesupport (>= 4.2.0) - graphiql-rails (1.4.11) - railties - sprockets-rails - graphql (1.12.9) + formatador (1.1.0) + foundation_rails_helper (4.0.1) + actionpack (>= 4.1, < 7.1) + activemodel (>= 4.1, < 7.1) + activesupport (>= 4.1, < 7.1) + railties (>= 4.1, < 7.1) + geocoder (1.8.0) + globalid (1.0.0) + activesupport (>= 5.0) + graphql (1.13.12) hashdiff (1.0.1) - hashie (4.1.0) + hashie (5.0.0) highline (2.0.3) html_tokenizer (0.0.7) htmlentities (4.3.4) http-accept (1.7.0) - http-cookie (1.0.3) + http-cookie (1.0.4) domain_name (~> 0.5) - http_parser.rb (0.6.0) - i18n (1.8.10) + i18n (1.10.0) concurrent-ruby (~> 1.0) - i18n-tasks (0.9.34) + i18n-tasks (0.9.37) activesupport (>= 4.0.2) ast (>= 2.1.0) erubi @@ -468,45 +426,40 @@ GEM terminal-table (>= 1.5.1) icalendar (2.7.1) ice_cube (~> 0.16) - ice_cube (0.16.3) + ice_cube (0.16.4) ice_nine (0.11.2) - image_processing (1.12.1) + image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) invisible_captcha (0.13.0) rails (>= 3.2.0) - jquery-rails (4.4.0) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - jquery-tmpl-rails (1.1.0) - rails (>= 3.1.0) - jwt (2.2.3) - kaminari (1.2.1) + json (2.6.2) + jwt (2.3.0) + kaminari (1.2.2) activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.1) - kaminari-activerecord (= 1.2.1) - kaminari-core (= 1.2.1) - kaminari-actionview (1.2.1) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) actionview - kaminari-core (= 1.2.1) - kaminari-activerecord (1.2.1) + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) activerecord - kaminari-core (= 1.2.1) - kaminari-core (1.2.1) - kramdown (2.3.1) + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) + kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) launchy (2.5.0) addressable (~> 2.7) - letter_opener (1.7.0) - launchy (~> 2.2) - letter_opener_web (1.4.0) + 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.5.1) + listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.3.1) @@ -514,7 +467,8 @@ GEM nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (1.0.1) + marcel (1.0.2) + matrix (0.4.2) mdl (0.11.0) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.1) @@ -522,57 +476,57 @@ GEM mixlib-config (>= 2.2.1, < 4) mixlib-shellout method_source (1.0.0) - mime-types (3.3.1) + mime-types (3.4.1) mime-types-data (~> 3.2015) - mime-types-data (3.2021.0225) + mime-types-data (3.2022.0105) mini_magick (4.11.0) - mini_mime (1.1.0) - mini_portile2 (2.5.3) - minitest (5.14.4) + mini_mime (1.1.2) + mini_portile2 (2.8.0) + minitest (5.15.0) mixlib-cli (2.1.8) mixlib-config (3.0.9) tomlrb - mixlib-shellout (3.2.5) + mixlib-shellout (3.2.7) chef-utils - msgpack (1.4.2) + msgpack (1.5.1) multi_json (1.15.0) multi_xml (0.6.0) - multipart-post (2.1.1) mustache (1.1.1) netrc (0.11.0) - nio4r (2.5.7) + nio4r (2.5.8) nobspw (0.6.2) - nokogiri (1.11.4) - mini_portile2 (~> 2.5.0) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.11.4-x86_64-linux) + nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) - oauth (0.5.6) - oauth2 (1.4.7) - faraday (>= 0.8, < 2.0) + oauth (0.5.10) + oauth2 (1.4.9) + faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - omniauth (1.9.1) + omniauth (2.1.0) hashie (>= 3.4.6) - rack (>= 1.6.2, < 3) + rack (>= 2.2.3) + rack-protection omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (0.8.2) + omniauth-google-oauth2 (1.0.1) jwt (>= 2.0) oauth2 (~> 1.1) - omniauth (~> 1.1) - omniauth-oauth2 (>= 1.6) + omniauth (~> 2.0) + omniauth-oauth2 (~> 1.7.1) omniauth-oauth (1.2.0) oauth omniauth (>= 1.0, < 3) - omniauth-oauth2 (1.7.1) + omniauth-oauth2 (1.7.2) oauth2 (~> 1.4) omniauth (>= 1.9, < 3) - omniauth-rails_csrf_protection (0.1.2) + omniauth-rails_csrf_protection (1.0.1) actionpack (>= 4.2) - omniauth (>= 1.3.1) + omniauth (~> 2.0) omniauth-twitter (1.4.0) omniauth-oauth (~> 1.1) rack @@ -580,51 +534,49 @@ GEM paper_trail (10.3.1) activerecord (>= 4.2) request_store (~> 1.1) - parallel (1.20.1) - parser (3.0.1.1) + parallel (1.22.1) + parser (3.1.2.0) ast (~> 2.4.1) pg (1.1.4) - pg_search (2.3.5) + pg_search (2.3.6) activerecord (>= 5.2) activesupport (>= 5.2) - premailer (1.15.0) + premailer (1.16.0) addressable css_parser (>= 1.6.0) htmlentities (>= 4.0.0) premailer-rails (1.11.1) actionmailer (>= 3) premailer (~> 1.7, >= 1.7.9) - public_suffix (4.0.6) - puffing-billy (2.4.1) - addressable (~> 2.5) - em-http-request (~> 1.1, >= 1.1.0) - em-synchrony - eventmachine (~> 1.2) - eventmachine_httpserver - http_parser.rb (~> 0.6.0) - multi_json - puma (5.3.1) + public_suffix (4.0.7) + puma (5.6.4) nio4r (~> 2.0) - racc (1.5.2) + racc (1.6.0) rack (2.2.3) - rack-attack (6.5.0) + rack-attack (6.6.1) rack (>= 1.0, < 3) rack-cors (1.1.1) rack (>= 2.0.0) + rack-protection (2.2.0) + rack + rack-proxy (0.7.2) + rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.6) - actioncable (= 5.2.6) - actionmailer (= 5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) - activemodel (= 5.2.6) - activerecord (= 5.2.6) - activestorage (= 5.2.6) - activesupport (= 5.2.6) + 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 (= 5.2.6) + railties (= 6.0.5) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -633,25 +585,24 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) + rails-html-sanitizer (1.4.2) loofah (~> 2.3) - rails-i18n (5.1.3) + rails-i18n (6.0.0) i18n (>= 0.7, < 2) - railties (>= 5.0, < 6) - railties (5.2.6) - actionpack (= 5.2.6) - activesupport (= 5.2.6) + railties (>= 6.0.0, < 7) + railties (6.0.5) + actionpack (= 6.0.5) + activesupport (= 6.0.5) method_source rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) - rainbow (3.0.0) - rake (13.0.3) - ransack (2.1.1) - actionpack (>= 5.0) - activerecord (>= 5.0) - activesupport (>= 5.0) + thor (>= 0.20.3, < 2.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.0) + rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) rectify (0.13.0) @@ -661,9 +612,9 @@ GEM virtus (~> 1.0.5) wisper (>= 1.6.1) redcarpet (3.5.1) - redis (4.2.5) - regexp_parser (2.1.1) - request_store (1.5.0) + redis (4.6.0) + regexp_parser (2.4.0) + request_store (1.5.1) rack (>= 1.4) responders (3.0.1) actionpack (>= 5.0) @@ -674,35 +625,35 @@ GEM mime-types (>= 1.16, < 4.0) netrc (~> 0.8) rexml (3.2.5) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-cells (0.3.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) cells (>= 4.0.0, < 6.0.0) - rspec-rails (< 5.0) - rspec-core (3.9.3) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.4) + rspec-rails (< 6.0) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) + rspec-support (~> 3.11.0) rspec-html-matchers (0.9.4) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.9.1) + rspec-mocks (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-rails (3.9.1) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-support (~> 3.9.0) + rspec-support (~> 3.11.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-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.9.4) + rspec-support (3.11.0) rspec_junit_formatter (0.3.0) rspec-core (>= 2, < 4, != 2.12.0) rubocop (0.92.0) @@ -714,38 +665,27 @@ GEM rubocop-ast (>= 0.5.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.5.0) - parser (>= 3.0.1.1) + rubocop-ast (1.18.0) + parser (>= 3.1.1.0) rubocop-rails (2.9.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 0.90.0, < 2.0) - rubocop-rspec (1.44.1) + rubocop-rspec (1.43.2) rubocop (~> 0.87) - rubocop-ast (>= 0.7.1) - ruby-ole (1.2.12.2) ruby-progressbar (1.11.0) - ruby-vips (2.1.2) + ruby-vips (2.1.4) ffi (~> 1.12) - ruby2_keywords (0.0.4) - rubyzip (2.3.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) - sassc (2.4.0) - ffi (~> 1.9) - sassc-rails (2.1.2) - railties (>= 4.0.0) - sassc (>= 2.0) - sprockets (> 3.0) - sprockets-rails - tilt + ruby2_keywords (0.0.5) + rubyXL (3.4.24) + 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) rubyzip (>= 1.2.2) + semantic_range (3.0.0) seven_zip_ruby (1.3.0) simplecov (0.19.1) docile (~> 1.1) @@ -753,33 +693,27 @@ GEM simplecov-cobertura (1.3.1) simplecov (~> 0.8) simplecov-html (0.12.3) - smart_properties (1.15.0) + smart_properties (1.17.0) social-share-button (1.2.4) coffee-rails - spreadsheet (1.2.8) - ruby-ole spring (2.1.1) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - sprockets (3.7.2) + sprockets (4.0.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-es6 (0.9.2) - babel-source (>= 5.8.11) - babel-transpiler - sprockets (>= 3.0.0) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + 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.1.2) - actionpack (>= 5.2, < 6.0.a) + system_test_html_screenshots (0.2.0) + actionpack (>= 5.2, < 6.1.a) temple (0.8.2) - terminal-table (3.0.1) + terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - thor (1.1.0) + thor (1.2.1) thread_safe (0.3.6) tilt (2.0.10) tomlrb (2.0.1) @@ -793,17 +727,24 @@ GEM execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext - unf_ext (0.0.7.7) - unicode-display_width (1.7.0) + unf_ext (0.0.8.1) + unicode-display_width (1.8.0) valid_email2 (2.3.1) activemodel (>= 3.2) mail (~> 2.5) - vcr (6.0.0) virtus (1.0.5) 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 + w3c_validators + w3c_validators (1.3.7) + json (>= 1.8) + nokogiri (~> 1.6) + rexml (~> 3.2) warden (1.2.9) rack (>= 2.0.9) web-console (3.7.0) @@ -811,20 +752,26 @@ GEM activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) - webmock (3.13.0) - addressable (>= 2.3.6) + webmock (3.14.0) + addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.7.3) + webpacker (6.0.0.rc.5) + activesupport (>= 5.2) + rack-proxy (>= 0.6.1) + railties (>= 5.2) + semantic_range (>= 2.3.0) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - wicked_pdf (1.4.0) + wicked_pdf (2.6.2) activesupport wisper (2.0.1) wisper-rspec (1.1.0) wkhtmltopdf-binary (0.12.6.5) xpath (3.2.0) nokogiri (~> 1.8) + zeitwerk (2.5.4) PLATFORMS ruby @@ -839,6 +786,7 @@ DEPENDENCIES faker letter_opener_web (~> 1.3) listen (~> 3.1) + nokogiri (= 1.13.3) puma (>= 4.3) rubocop rubocop-rails diff --git a/app/assets/config/decidim_challenges_manifest.css b/app/assets/config/decidim_challenges_manifest.css deleted file mode 100644 index 75ed50bb..00000000 --- a/app/assets/config/decidim_challenges_manifest.css +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - *= link decidim/sdgs/ods.scss - *= link decidim/challenges/challenges.css - *= link decidim/sdgs/sdgs_filter/button.css - *= link decidim/sdgs/sdgs_filter/modal.css - */ diff --git a/app/assets/config/decidim_challenges_manifest.js b/app/assets/config/decidim_challenges_manifest.js deleted file mode 100644 index 43104f00..00000000 --- a/app/assets/config/decidim_challenges_manifest.js +++ /dev/null @@ -1,3 +0,0 @@ -//= link decidim/challenges/add_challenge.js -//= link decidim/challenges/admin/challenges_form.js -//= link_directory ../stylesheets/decidim/challenges .css diff --git a/app/assets/config/decidim_problems_manifest.css b/app/assets/config/decidim_problems_manifest.css deleted file mode 100644 index 282ab8db..00000000 --- a/app/assets/config/decidim_problems_manifest.css +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - *= link decidim/sdgs/ods.scss - *= link decidim/problems/problems.css - *= link decidim/sdgs/sdgs_filter/button.css - *= link decidim/sdgs/sdgs_filter/modal.css - */ diff --git a/app/assets/config/decidim_problems_manifest.js b/app/assets/config/decidim_problems_manifest.js deleted file mode 100644 index adecf018..00000000 --- a/app/assets/config/decidim_problems_manifest.js +++ /dev/null @@ -1 +0,0 @@ -//= link_directory ../stylesheets/decidim/problems .css diff --git a/app/assets/config/decidim_sdgs_manifest.css b/app/assets/config/decidim_sdgs_manifest.css deleted file mode 100644 index 6d74e0be..00000000 --- a/app/assets/config/decidim_sdgs_manifest.css +++ /dev/null @@ -1,18 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - *= link decidim/sdgs/ods.scss - *= link decidim/sdgs/sdgs_filter/button.css - *= link decidim/sdgs/sdgs_filter/modal.css - */ diff --git a/app/assets/config/decidim_sdgs_manifest.js b/app/assets/config/decidim_sdgs_manifest.js deleted file mode 100644 index e69de29b..00000000 diff --git a/app/assets/config/decidim_solutions_manifest.css b/app/assets/config/decidim_solutions_manifest.css deleted file mode 100644 index e4ca34cb..00000000 --- a/app/assets/config/decidim_solutions_manifest.css +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - *= link decidim/sdgs/ods.scss - *= link decidim/solutions/solutions.css - *= link decidim/sdgs/sdgs_filter/button.css - *= link decidim/sdgs/sdgs_filter/modal.css - */ diff --git a/app/assets/config/decidim_solutions_manifest.js b/app/assets/config/decidim_solutions_manifest.js deleted file mode 100644 index 8c86ab96..00000000 --- a/app/assets/config/decidim_solutions_manifest.js +++ /dev/null @@ -1 +0,0 @@ -//= link_directory ../stylesheets/decidim/solutions .css diff --git a/app/assets/stylesheets/decidim/challenges/challenges.scss b/app/assets/stylesheets/decidim/challenges/challenges.scss deleted file mode 100644 index 0902b799..00000000 --- a/app/assets/stylesheets/decidim/challenges/challenges.scss +++ /dev/null @@ -1,3 +0,0 @@ -//= require_self - -@import 'challenges/*' diff --git a/app/assets/stylesheets/decidim/challenges/challenges/_challenge.scss b/app/assets/stylesheets/decidim/challenges/challenges/_challenge.scss deleted file mode 100644 index 575cafde..00000000 --- a/app/assets/stylesheets/decidim/challenges/challenges/_challenge.scss +++ /dev/null @@ -1,125 +0,0 @@ -.card--challenge { - - border-color: rgb(254, 174, 2); - border-top-color: rgb(254, 174, 2); - - .card__text--paragraph--status { - color: rgb(254, 174, 2); - } -} - -.card--challenge.proposal { - - border-color: rgb(254, 174, 2); - border-top-color: rgb(254, 174, 2); - - .card__text--paragraph--status { - color: rgb(254, 174, 2); - } -} - -.card--challenge { - .card__title { - margin-bottom: 5px; - } - - .card_text--sdg--image { - display: inline-block; - width: 20%; - - img { - vertical-align: bottom; - } - } - - .card__sdg { - display: inline-flex; - } - - .card_text--sdg--text { - display: inline-block; - width: 75%; - padding-left: 5px; - } - - .card__text--paragraph--status { - font-weight: bold; - display: inline; - text-transform: uppercase; - padding-right: 5px; - } - - .card__text--paragraph p:first-of-type { - display: inline; - } -} - -.card--challenge.executing { - border-color: rgb(0, 163, 144); - border-top-color: rgb(0, 163, 144); - - .card__text--paragraph--status { - color: rgb(0, 163, 144); - } -} - -.card--challenge.finished { - border-color: rgb(0, 188, 255); - border-top-color: rgb(0, 188, 255); - - .card__text--paragraph--status { - color: rgb(0, 188, 255); - } -} - -.definition-data__image { - padding-top: 0.1em; -} - -.status{ - text-transform: uppercase; -} - -.section p.tags{ - color: #D04040; - font-weight: 600; -} - -.ods.challenges { - cursor: default; - &:hover { - -webkit-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); - -moz-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); - box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); - transition: all 0.0s ease; - } - - .text-container { - top: 0.3rem; - left: 1.3rem; - width: 60px; - } - .text-container.show { - top: 0.6rem; - left: 6.5rem; - width: 60px; - text-align: start; - } - - p { - font-size: 6pt; - } - - img.challenge--view { - width: 100%; - max-width: 100px; - } -} - -.card-associated-problem { - padding: 5px 10px; -} - -.card-proposed-solution { - padding: 5px 10px; -} diff --git a/app/assets/stylesheets/decidim/problems/problems.scss b/app/assets/stylesheets/decidim/problems/problems.scss deleted file mode 100644 index 1d44bc4e..00000000 --- a/app/assets/stylesheets/decidim/problems/problems.scss +++ /dev/null @@ -1,2 +0,0 @@ -//= require_self -@import 'problems/*' diff --git a/app/assets/stylesheets/decidim/problems/problems/_problem.scss b/app/assets/stylesheets/decidim/problems/problems/_problem.scss deleted file mode 100644 index f0ae3f73..00000000 --- a/app/assets/stylesheets/decidim/problems/problems/_problem.scss +++ /dev/null @@ -1,130 +0,0 @@ -.card--problem { - - border-color: rgb(254, 174, 2); - border-top-color: rgb(254, 174, 2); - - .card__text--paragraph--status { - color: rgb(254, 174, 2); - } -} - -.card--problem.proposal { - - border-color: rgb(254, 174, 2); - border-top-color: rgb(254, 174, 2); - - .card__text--paragraph--status { - color: rgb(254, 174, 2); - } -} - -.card--problem { - .card__title { - margin-bottom: 5px; - } - - .card_text--sdg--image { - display: inline-block; - width: 20%; - - img { - vertical-align: bottom; - } - } - - .card_text--sdg--text { - display: inline-block; - width: 75%; - padding-left: 5px; - } - - .card__text--paragraph--status { - font-weight: bold; - display: inline; - text-transform: uppercase; - padding-right: 5px; - } - - .card__text--paragraph p:first-of-type { - display: inline; - } - - .card__text--paragraph--challenge { - font-weight: bold; - display: inline-block; - } - - .card__text--paragraph--challenge--title { - display: inline-block; - } -} - -.card--problem.executing { - border-color: rgb(0, 163, 144); - border-top-color: rgb(0, 163, 144); - - .card__text--paragraph--status { - color: rgb(0, 163, 144); - } -} - -.card--problem.finished { - border-color: rgb(0, 188, 255); - border-top-color: rgb(0, 188, 255); - - .card__text--paragraph--status { - color: rgb(0, 188, 255); - } -} - -.definition-data__image { - padding-top: 0.1em; -} - -.definition-data__title { - font-weight: bold; -} - -.status{ - text-transform: uppercase; -} - -.section p.tags{ - color: #D04040; - font-weight: 600; -} - -.ods.problems { - cursor: default; - &:hover { - -webkit-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); - -moz-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); - box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); - transition: all 0.0s ease; - } - - .text-container { - top: 0.3rem; - left: 1.3rem; - width: 60px; - } - .text-container.show { - top: 0.6rem; - left: 6.5rem; - width: 60px; - text-align: start; - } - - p { - font-size: 6pt; - } - - img.problem--view { - width: 100%; - max-width: 100px; - } -} - -.card-proposed-solution { - padding: 5px 10px; -} \ No newline at end of file diff --git a/app/assets/stylesheets/decidim/solutions/solutions.css b/app/assets/stylesheets/decidim/solutions/solutions.css deleted file mode 100644 index e69de29b..00000000 diff --git a/app/cells/decidim/challenges/challenge_m/show.erb b/app/cells/decidim/challenges/challenge_m/show.erb index ab1f3d48..7cba314a 100644 --- a/app/cells/decidim/challenges/challenge_m/show.erb +++ b/app/cells/decidim/challenges/challenge_m/show.erb @@ -27,7 +27,7 @@ <% end %> <% if resource_sdg_index %> - Logo SDG <%= resource_sdg_index%> + <%= image_pack_tag "media/images/ods-#{resource_sdg_index}.svg", alt: "Logo SDG #{resource_sdg_index}", class: "challenge--view" %> <% end %> diff --git a/app/cells/decidim/challenges/challenge_m_cell.rb b/app/cells/decidim/challenges/challenge_m_cell.rb index 324bc653..ce09ee9e 100644 --- a/app/cells/decidim/challenges/challenge_m_cell.rb +++ b/app/cells/decidim/challenges/challenge_m_cell.rb @@ -53,11 +53,11 @@ def current_organization end def has_image? - @has_image ||= model.component.settings.allow_card_image && model.card_image.present? + @has_image ||= model.component.settings.allow_card_image && model.card_image.attached? end def resource_image_path - @resource_image_path ||= has_image? ? model.card_image.url : nil + @resource_image_path ||= has_image? ? model.attached_uploader(:card_image).path : nil end end end diff --git a/app/cells/decidim/problems/problem_m/show.erb b/app/cells/decidim/problems/problem_m/show.erb index 65d149c9..a54091e3 100644 --- a/app/cells/decidim/problems/problem_m/show.erb +++ b/app/cells/decidim/problems/problem_m/show.erb @@ -31,7 +31,7 @@ <% end %> <% if resource_sdg_index %> - Logo SDG <%= resource_sdg_index%> + <%= image_pack_tag "media/images/ods-#{resource_sdg_index}.svg", alt: "Logo SDG #{resource_sdg_index}", class: "problem--view" %> <% end %> diff --git a/app/cells/decidim/solutions/solution_m/show.erb b/app/cells/decidim/solutions/solution_m/show.erb index f363dd1f..1074ba18 100644 --- a/app/cells/decidim/solutions/solution_m/show.erb +++ b/app/cells/decidim/solutions/solution_m/show.erb @@ -39,7 +39,7 @@

<%= t(resource_sdg + ".logo.line2", scope: "decidim.components.sdgs") %>

<% if resource_sdg_index %> - Logo SDG <%= resource_sdg_index%> + <%= image_pack_tag "media/images/ods-#{resource_sdg_index}.svg", alt: "Logo ODS #{resource_sdg_index}", class: "solution--view" %> <% end %> diff --git a/app/forms/decidim/challenges/admin/challenges_form.rb b/app/forms/decidim/challenges/admin/challenges_form.rb index cb51ba56..b7ab1584 100644 --- a/app/forms/decidim/challenges/admin/challenges_form.rb +++ b/app/forms/decidim/challenges/admin/challenges_form.rb @@ -29,7 +29,7 @@ class ChallengesForm < Decidim::Form attribute :collaborating_entities, String attribute :card_image - attribute :remove_card_image + attribute :remove_card_image, Boolean, default: false validates :title, :local_description, :global_description, translatable_presence: true validates :scope, presence: true, if: ->(form) { form.decidim_scope_id.present? } @@ -38,7 +38,12 @@ class ChallengesForm < Decidim::Form validates :start_date, presence: true, date: { before_or_equal_to: :end_date } validates :end_date, presence: true, date: { after_or_equal_to: :start_date } - validates :card_image, passthru: { to: Decidim::Challenges::Challenge } + validates :card_image, + presence: false, + passthru: { to: Decidim::Challenges::Challenge, + with: lambda { |form| + { component: form.current_component } + } } alias organization current_organization diff --git a/app/models/decidim/challenges/challenge.rb b/app/models/decidim/challenges/challenge.rb index 86474625..5cdfa7cd 100644 --- a/app/models/decidim/challenges/challenge.rb +++ b/app/models/decidim/challenges/challenge.rb @@ -34,8 +34,8 @@ class Challenge < Decidim::ApplicationRecord component_manifest_name "challenges" - validates_upload :card_image - mount_uploader :card_image, Decidim::ImageUploader + has_one_attached :card_image + validates_upload :card_image, uploader: Decidim::ImageUploader scope :published, -> { where.not(published_at: nil) } scope :in_proposal, -> { where(state: VALID_STATES.index(:proposal)) } @@ -57,6 +57,8 @@ class Challenge < Decidim::ApplicationRecord def published? published_at.present? end + + def remove_card_image; end end end end diff --git a/app/packs/entrypoints/decidim_challenges.js b/app/packs/entrypoints/decidim_challenges.js new file mode 100644 index 00000000..4a927d28 --- /dev/null +++ b/app/packs/entrypoints/decidim_challenges.js @@ -0,0 +1,4 @@ +// Images +require.context("../images", true) + +import "entrypoints/decidim_challenges.scss"; diff --git a/app/packs/entrypoints/decidim_challenges.scss b/app/packs/entrypoints/decidim_challenges.scss new file mode 100644 index 00000000..f4475ac8 --- /dev/null +++ b/app/packs/entrypoints/decidim_challenges.scss @@ -0,0 +1 @@ +@import "stylesheets/decidim/challenges/challenges"; diff --git a/app/packs/entrypoints/decidim_problems.js b/app/packs/entrypoints/decidim_problems.js new file mode 100644 index 00000000..13c650b8 --- /dev/null +++ b/app/packs/entrypoints/decidim_problems.js @@ -0,0 +1 @@ +import "entrypoints/decidim_problems.scss"; diff --git a/app/packs/entrypoints/decidim_problems.scss b/app/packs/entrypoints/decidim_problems.scss new file mode 100644 index 00000000..4a973bf5 --- /dev/null +++ b/app/packs/entrypoints/decidim_problems.scss @@ -0,0 +1 @@ +@import "stylesheets/decidim/problems/problems"; diff --git a/app/packs/entrypoints/decidim_sdgs.js b/app/packs/entrypoints/decidim_sdgs.js new file mode 100644 index 00000000..b49b57d5 --- /dev/null +++ b/app/packs/entrypoints/decidim_sdgs.js @@ -0,0 +1,4 @@ +// Images +require.context("../images", true) + +import "entrypoints/decidim_sdgs.scss"; diff --git a/app/packs/entrypoints/decidim_sdgs.scss b/app/packs/entrypoints/decidim_sdgs.scss new file mode 100644 index 00000000..10787c8f --- /dev/null +++ b/app/packs/entrypoints/decidim_sdgs.scss @@ -0,0 +1 @@ +@import "stylesheets/decidim/sdgs/ods.scss"; diff --git a/app/packs/entrypoints/decidim_solutions.js b/app/packs/entrypoints/decidim_solutions.js new file mode 100644 index 00000000..d63b1272 --- /dev/null +++ b/app/packs/entrypoints/decidim_solutions.js @@ -0,0 +1,4 @@ +// Images +require.context("../images", true) + +import "entrypoints/decidim_solutions.scss"; diff --git a/app/packs/entrypoints/decidim_solutions.scss b/app/packs/entrypoints/decidim_solutions.scss new file mode 100644 index 00000000..cb85335b --- /dev/null +++ b/app/packs/entrypoints/decidim_solutions.scss @@ -0,0 +1 @@ +@import "stylesheets/decidim/solutions/solutions"; diff --git a/app/assets/fonts/Oswald-Medium.ttf b/app/packs/fonts/Oswald-Medium.ttf similarity index 100% rename from app/assets/fonts/Oswald-Medium.ttf rename to app/packs/fonts/Oswald-Medium.ttf diff --git a/app/assets/images/decidim/challenges/icon.svg b/app/packs/images/decidim/challenges/icon.svg similarity index 100% rename from app/assets/images/decidim/challenges/icon.svg rename to app/packs/images/decidim/challenges/icon.svg diff --git a/app/assets/images/decidim/sdgs/ods-01.svg b/app/packs/images/decidim/sdgs/ods-01.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-01.svg rename to app/packs/images/decidim/sdgs/ods-01.svg diff --git a/app/assets/images/decidim/sdgs/ods-02.svg b/app/packs/images/decidim/sdgs/ods-02.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-02.svg rename to app/packs/images/decidim/sdgs/ods-02.svg diff --git a/app/assets/images/decidim/sdgs/ods-03.svg b/app/packs/images/decidim/sdgs/ods-03.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-03.svg rename to app/packs/images/decidim/sdgs/ods-03.svg diff --git a/app/assets/images/decidim/sdgs/ods-04.svg b/app/packs/images/decidim/sdgs/ods-04.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-04.svg rename to app/packs/images/decidim/sdgs/ods-04.svg diff --git a/app/assets/images/decidim/sdgs/ods-05.svg b/app/packs/images/decidim/sdgs/ods-05.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-05.svg rename to app/packs/images/decidim/sdgs/ods-05.svg diff --git a/app/assets/images/decidim/sdgs/ods-06.svg b/app/packs/images/decidim/sdgs/ods-06.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-06.svg rename to app/packs/images/decidim/sdgs/ods-06.svg diff --git a/app/assets/images/decidim/sdgs/ods-07.svg b/app/packs/images/decidim/sdgs/ods-07.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-07.svg rename to app/packs/images/decidim/sdgs/ods-07.svg diff --git a/app/assets/images/decidim/sdgs/ods-08.svg b/app/packs/images/decidim/sdgs/ods-08.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-08.svg rename to app/packs/images/decidim/sdgs/ods-08.svg diff --git a/app/assets/images/decidim/sdgs/ods-09.svg b/app/packs/images/decidim/sdgs/ods-09.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-09.svg rename to app/packs/images/decidim/sdgs/ods-09.svg diff --git a/app/assets/images/decidim/sdgs/ods-10.svg b/app/packs/images/decidim/sdgs/ods-10.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-10.svg rename to app/packs/images/decidim/sdgs/ods-10.svg diff --git a/app/assets/images/decidim/sdgs/ods-11.svg b/app/packs/images/decidim/sdgs/ods-11.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-11.svg rename to app/packs/images/decidim/sdgs/ods-11.svg diff --git a/app/assets/images/decidim/sdgs/ods-12.svg b/app/packs/images/decidim/sdgs/ods-12.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-12.svg rename to app/packs/images/decidim/sdgs/ods-12.svg diff --git a/app/assets/images/decidim/sdgs/ods-13.svg b/app/packs/images/decidim/sdgs/ods-13.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-13.svg rename to app/packs/images/decidim/sdgs/ods-13.svg diff --git a/app/assets/images/decidim/sdgs/ods-14.svg b/app/packs/images/decidim/sdgs/ods-14.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-14.svg rename to app/packs/images/decidim/sdgs/ods-14.svg diff --git a/app/assets/images/decidim/sdgs/ods-15.svg b/app/packs/images/decidim/sdgs/ods-15.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-15.svg rename to app/packs/images/decidim/sdgs/ods-15.svg diff --git a/app/assets/images/decidim/sdgs/ods-16.svg b/app/packs/images/decidim/sdgs/ods-16.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-16.svg rename to app/packs/images/decidim/sdgs/ods-16.svg diff --git a/app/assets/images/decidim/sdgs/ods-17.svg b/app/packs/images/decidim/sdgs/ods-17.svg similarity index 100% rename from app/assets/images/decidim/sdgs/ods-17.svg rename to app/packs/images/decidim/sdgs/ods-17.svg diff --git a/app/assets/images/decidim/sdgs/sdg-wheel.png b/app/packs/images/decidim/sdgs/sdg-wheel.png similarity index 100% rename from app/assets/images/decidim/sdgs/sdg-wheel.png rename to app/packs/images/decidim/sdgs/sdg-wheel.png diff --git a/app/assets/images/decidim/sdgs/un_emblem_square.png b/app/packs/images/decidim/sdgs/un_emblem_square.png similarity index 100% rename from app/assets/images/decidim/sdgs/un_emblem_square.png rename to app/packs/images/decidim/sdgs/un_emblem_square.png diff --git a/app/assets/javascripts/decidim/challenges/add_challenge.js.es6 b/app/packs/src/decidim/challenges/add_challenge.js similarity index 100% rename from app/assets/javascripts/decidim/challenges/add_challenge.js.es6 rename to app/packs/src/decidim/challenges/add_challenge.js diff --git a/app/assets/javascripts/decidim/challenges/admin/challenges_form.js.es6 b/app/packs/src/decidim/challenges/admin/challenges_form.js similarity index 100% rename from app/assets/javascripts/decidim/challenges/admin/challenges_form.js.es6 rename to app/packs/src/decidim/challenges/admin/challenges_form.js diff --git a/app/packs/stylesheets/decidim/challenges/challenges.scss b/app/packs/stylesheets/decidim/challenges/challenges.scss new file mode 100644 index 00000000..c1ab6e16 --- /dev/null +++ b/app/packs/stylesheets/decidim/challenges/challenges.scss @@ -0,0 +1,129 @@ +@import "stylesheets/decidim/sdgs/ods.scss"; +@import "stylesheets/decidim/sdgs/sdgs_filter/button.scss"; +@import "stylesheets/decidim/sdgs/sdgs_filter/modal.scss"; + +.card--challenge { + + border-color: rgb(254, 174, 2); + border-top-color: rgb(254, 174, 2); + + .card__text--paragraph--status { + color: rgb(254, 174, 2); + } +} + +.card--challenge.proposal { + + border-color: rgb(254, 174, 2); + border-top-color: rgb(254, 174, 2); + + .card__text--paragraph--status { + color: rgb(254, 174, 2); + } +} + +.card--challenge { + .card__title { + margin-bottom: 5px; + } + + .card_text--sdg--image { + display: inline-block; + width: 20%; + + img { + vertical-align: bottom; + } + } + + .card__sdg { + display: inline-flex; + } + + .card_text--sdg--text { + display: inline-block; + width: 75%; + padding-left: 5px; + } + + .card__text--paragraph--status { + font-weight: bold; + display: inline; + text-transform: uppercase; + padding-right: 5px; + } + + .card__text--paragraph p:first-of-type { + display: inline; + } +} + +.card--challenge.executing { + border-color: rgb(0, 163, 144); + border-top-color: rgb(0, 163, 144); + + .card__text--paragraph--status { + color: rgb(0, 163, 144); + } +} + +.card--challenge.finished { + border-color: rgb(0, 188, 255); + border-top-color: rgb(0, 188, 255); + + .card__text--paragraph--status { + color: rgb(0, 188, 255); + } +} + +.definition-data__image { + padding-top: 0.1em; +} + +.status{ + text-transform: uppercase; +} + +.section p.tags{ + color: #D04040; + font-weight: 600; +} + +.ods.challenges { + cursor: default; + &:hover { + -webkit-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); + -moz-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); + box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); + transition: all 0.0s ease; + } + + .text-container { + top: 0.3rem; + left: 1.3rem; + width: 60px; + } + .text-container.show { + top: 0.6rem; + left: 6.5rem; + width: 60px; + text-align: start; + } + + p { + font-size: 6pt; + } + + img.challenge--view { + width: 100%; + max-width: 100px; + } +} + +.card-associated-problem { + padding: 5px 10px; +} + +.card-proposed-solution { + padding: 5px 10px; +} diff --git a/app/packs/stylesheets/decidim/problems/problems.scss b/app/packs/stylesheets/decidim/problems/problems.scss new file mode 100644 index 00000000..eee39e0e --- /dev/null +++ b/app/packs/stylesheets/decidim/problems/problems.scss @@ -0,0 +1,134 @@ +@import "stylesheets/decidim/sdgs/ods.scss"; +@import "stylesheets/decidim/sdgs/sdgs_filter/button.scss"; +@import "stylesheets/decidim/sdgs/sdgs_filter/modal.scss"; + +.card--problem { + + border-color: rgb(254, 174, 2); + border-top-color: rgb(254, 174, 2); + + .card__text--paragraph--status { + color: rgb(254, 174, 2); + } +} + +.card--problem.proposal { + + border-color: rgb(254, 174, 2); + border-top-color: rgb(254, 174, 2); + + .card__text--paragraph--status { + color: rgb(254, 174, 2); + } +} + +.card--problem { + .card__title { + margin-bottom: 5px; + } + + .card_text--sdg--image { + display: inline-block; + width: 20%; + + img { + vertical-align: bottom; + } + } + + .card_text--sdg--text { + display: inline-block; + width: 75%; + padding-left: 5px; + } + + .card__text--paragraph--status { + font-weight: bold; + display: inline; + text-transform: uppercase; + padding-right: 5px; + } + + .card__text--paragraph p:first-of-type { + display: inline; + } + + .card__text--paragraph--challenge { + font-weight: bold; + display: inline-block; + } + + .card__text--paragraph--challenge--title { + display: inline-block; + } +} + +.card--problem.executing { + border-color: rgb(0, 163, 144); + border-top-color: rgb(0, 163, 144); + + .card__text--paragraph--status { + color: rgb(0, 163, 144); + } +} + +.card--problem.finished { + border-color: rgb(0, 188, 255); + border-top-color: rgb(0, 188, 255); + + .card__text--paragraph--status { + color: rgb(0, 188, 255); + } +} + +.definition-data__image { + padding-top: 0.1em; +} + +.definition-data__title { + font-weight: bold; +} + +.status{ + text-transform: uppercase; +} + +.section p.tags{ + color: #D04040; + font-weight: 600; +} + +.ods.problems { + cursor: default; + &:hover { + -webkit-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); + -moz-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); + box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); + transition: all 0.0s ease; + } + + .text-container { + top: 0.3rem; + left: 1.3rem; + width: 60px; + } + .text-container.show { + top: 0.6rem; + left: 6.5rem; + width: 60px; + text-align: start; + } + + p { + font-size: 6pt; + } + + img.problem--view { + width: 100%; + max-width: 100px; + } +} + +.card-proposed-solution { + padding: 5px 10px; +} diff --git a/app/assets/stylesheets/decidim/sdgs/ods.scss b/app/packs/stylesheets/decidim/sdgs/ods.scss similarity index 92% rename from app/assets/stylesheets/decidim/sdgs/ods.scss rename to app/packs/stylesheets/decidim/sdgs/ods.scss index 6da15b82..d36d78a0 100644 --- a/app/assets/stylesheets/decidim/sdgs/ods.scss +++ b/app/packs/stylesheets/decidim/sdgs/ods.scss @@ -1,8 +1,9 @@ -//= require_self +@import "stylesheets/decidim/sdgs/sdgs_filter/button.scss"; +@import "stylesheets/decidim/sdgs/sdgs_filter/modal.scss"; @font-face { font-family: Oswald-Medium; - src: asset-url("Oswald-Medium.ttf"); + src: url('../fonts/Oswald-Medium.ttf') } @@ -154,4 +155,4 @@ .ods p { font-size: 7pt; } -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/decidim/sdgs/sdgs_filter/button.scss b/app/packs/stylesheets/decidim/sdgs/sdgs_filter/button.scss similarity index 100% rename from app/assets/stylesheets/decidim/sdgs/sdgs_filter/button.scss rename to app/packs/stylesheets/decidim/sdgs/sdgs_filter/button.scss diff --git a/app/assets/stylesheets/decidim/sdgs/sdgs_filter/modal.scss b/app/packs/stylesheets/decidim/sdgs/sdgs_filter/modal.scss similarity index 100% rename from app/assets/stylesheets/decidim/sdgs/sdgs_filter/modal.scss rename to app/packs/stylesheets/decidim/sdgs/sdgs_filter/modal.scss diff --git a/app/assets/stylesheets/decidim/solutions/solutions.scss b/app/packs/stylesheets/decidim/solutions/solutions.scss similarity index 77% rename from app/assets/stylesheets/decidim/solutions/solutions.scss rename to app/packs/stylesheets/decidim/solutions/solutions.scss index dcbbdaef..03e54522 100644 --- a/app/assets/stylesheets/decidim/solutions/solutions.scss +++ b/app/packs/stylesheets/decidim/solutions/solutions.scss @@ -1,4 +1,7 @@ -//= require_self +@import "stylesheets/decidim/sdgs/ods.scss"; +@import "stylesheets/decidim/solutions/solutions/solution.scss"; +@import "stylesheets/decidim/sdgs/sdgs_filter/button.scss"; +@import "stylesheets/decidim/sdgs/sdgs_filter/modal.scss"; h3.parents{ line-height: 1; @@ -52,5 +55,3 @@ h3.parents span.title{ max-width: 100px; } } - -@import 'solutions/*' diff --git a/app/assets/stylesheets/decidim/solutions/solutions/_solution.scss b/app/packs/stylesheets/decidim/solutions/solutions/_solution.scss similarity index 100% rename from app/assets/stylesheets/decidim/solutions/solutions/_solution.scss rename to app/packs/stylesheets/decidim/solutions/solutions/_solution.scss diff --git a/app/presenters/decidim/challenges/challenge_presenter.rb b/app/presenters/decidim/challenges/challenge_presenter.rb index 6136d9ff..c34748ad 100644 --- a/app/presenters/decidim/challenges/challenge_presenter.rb +++ b/app/presenters/decidim/challenges/challenge_presenter.rb @@ -82,7 +82,7 @@ def global_description(links: false, extras: true, strip_tags: false) def card_image_url return if challenge.card_image.blank? - URI.join(decidim.root_url(host: challenge.organization.host), challenge.card_image_url).to_s + challenge.attached_uploader(:card_image).url(host: challenge.organization.host) end delegate :count, to: :versions, prefix: true diff --git a/app/views/decidim/challenges/challenges/_filters.html.erb b/app/views/decidim/challenges/challenges/_filters.html.erb index 4e7da361..e632e95d 100644 --- a/app/views/decidim/challenges/challenges/_filters.html.erb +++ b/app/views/decidim/challenges/challenges/_filters.html.erb @@ -1,4 +1,3 @@ -<%= stylesheet_link_tag "decidim/sdgs/sdgs_filter/button" %> <%= filter_form_for filter do |form| %>
<% end %> diff --git a/app/views/decidim/problems/problems/_filters.html.erb b/app/views/decidim/problems/problems/_filters.html.erb index 6f5a610d..5e13b8fe 100644 --- a/app/views/decidim/problems/problems/_filters.html.erb +++ b/app/views/decidim/problems/problems/_filters.html.erb @@ -1,4 +1,3 @@ -<%= stylesheet_link_tag "decidim/sdgs/sdgs_filter/button" %> <%= filter_form_for filter do |form| %>
diff --git a/app/views/decidim/sdgs/sdgs/index.html.erb b/app/views/decidim/sdgs/sdgs/index.html.erb index 7bdcc741..025e3f90 100644 --- a/app/views/decidim/sdgs/sdgs/index.html.erb +++ b/app/views/decidim/sdgs/sdgs/index.html.erb @@ -1,4 +1,4 @@ -<%= stylesheet_link_tag "decidim/sdgs/ods" %> +<%= stylesheet_pack_tag "decidim_sdgs" %>
@@ -10,7 +10,7 @@
- + <%= image_pack_tag "media/images/sdg-wheel.png" %>

<%= t("ods_logo.title", scope: "decidim.components.sdgs") %>

<%= t("ods_logo.subtitle", scope: "decidim.components.sdgs") %>

@@ -30,7 +30,7 @@

<%= t("no_poverty.logo.line1", scope: "decidim.components.sdgs") %>

<%= t("no_poverty.logo.line2", scope: "decidim.components.sdgs") %>

- Logo ODS 01 + <%= image_pack_tag "media/images/ods-01.svg", alt: "Logo ODS 01" %>
@@ -39,7 +39,7 @@

<%= t("zero_hunger.logo.line1", scope: "decidim.components.sdgs") %>

<%= t("zero_hunger.logo.line2", scope: "decidim.components.sdgs") %>

- Logo ODS 02 + <%= image_pack_tag "media/images/ods-02.svg", alt: "Logo ODS 02" %>
@@ -48,7 +48,7 @@

<%= t("good_health.logo.line1", scope: "decidim.components.sdgs") %>

<%= t("good_health.logo.line2", scope: "decidim.components.sdgs") %>

- Logo ODS 03 + <%= image_pack_tag "media/images/ods-03.svg", alt: "Logo ODS 03" %>
@@ -57,7 +57,7 @@

<%= t("quality_education.logo.line1", scope: "decidim.components.sdgs") %>

<%= t("quality_education.logo.line2", scope: "decidim.components.sdgs") %>

- Logo ODS 04 + <%= image_pack_tag "media/images/ods-04.svg", alt: "Logo ODS 04" %>
@@ -66,7 +66,7 @@

<%= t("gender_equality.logo.line1", scope: "decidim.components.sdgs") %>

<%= t("gender_equality.logo.line2", scope: "decidim.components.sdgs") %>

- Logo ODS 05 + <%= image_pack_tag "media/images/ods-05.svg", alt: "Logo ODS 05" %>
@@ -75,7 +75,7 @@

<%= t("clean_water.logo.line1", scope: "decidim.components.sdgs") %>

<%= t("clean_water.logo.line2", scope: "decidim.components.sdgs") %>

- Logo ODS 06 + <%= image_pack_tag "media/images/ods-06.svg", alt: "Logo ODS 06" %>
@@ -84,7 +84,7 @@

<%= t("clean_energy.logo.line1", scope: "decidim.components.sdgs") %>

<%= t("clean_energy.logo.line2", scope: "decidim.components.sdgs") %>

- Logo ODS 07 + <%= image_pack_tag "media/images/ods-07.svg", alt: "Logo ODS 07" %>
@@ -94,7 +94,7 @@

<%= t("decent_work.logo.line2", scope: "decidim.components.sdgs") %>

<%= t("decent_work.logo.line3", scope: "decidim.components.sdgs") %>

- Logo ODS 08 + <%= image_pack_tag "media/images/ods-08.svg", alt: "Logo ODS 08" %>
@@ -104,7 +104,7 @@

<%= t("iiai.logo.line2", scope: "decidim.components.sdgs") %>

<%= t("iiai.logo.line3", scope: "decidim.components.sdgs") %>

- Logo ODS 09 + <%= image_pack_tag "media/images/ods-09.svg", alt: "Logo ODS 09" %>
@@ -113,7 +113,7 @@

<%= t("reduced_inequalities.logo.line1", scope: "decidim.components.sdgs") %>

<%= t("reduced_inequalities.logo.line2", scope: "decidim.components.sdgs") %>

- Logo ODS 10 + <%= image_pack_tag "media/images/ods-10.svg", alt: "Logo ODS 10" %>
@@ -123,7 +123,7 @@

<%= t("sustainable_cities.logo.line2", scope: "decidim.components.sdgs") %>

<%= t("sustainable_cities.logo.line3", scope: "decidim.components.sdgs") %>

- Logo ODS 11 + <%= image_pack_tag "media/images/ods-11.svg", alt: "Logo ODS 11" %>
@@ -133,7 +133,7 @@

<%= t("responsible_consumption.logo.line2", scope: "decidim.components.sdgs") %>

<%= t("responsible_consumption.logo.line3", scope: "decidim.components.sdgs") %>

- Logo ODS 12 + <%= image_pack_tag "media/images/ods-12.svg", alt: "Logo ODS 12" %>
@@ -142,7 +142,7 @@

<%= t("climate_action.logo.line1", scope: "decidim.components.sdgs") %>

<%= t("climate_action.logo.line2", scope: "decidim.components.sdgs") %>

- Logo ODS 13 + <%= image_pack_tag "media/images/ods-13.svg", alt: "Logo ODS 13" %>
@@ -151,7 +151,7 @@

<%= t("life_below_water.logo.line1", scope: "decidim.components.sdgs") %>

<%= t("life_below_water.logo.line2", scope: "decidim.components.sdgs") %>

- Logo ODS 14 + <%= image_pack_tag "media/images/ods-14.svg", alt: "Logo ODS 14" %>
@@ -161,7 +161,7 @@

<%= t("life_on_land.logo.line2", scope: "decidim.components.sdgs") %>

<%= t("life_on_land.logo.line3", scope: "decidim.components.sdgs") %>

- Logo ODS 15 + <%= image_pack_tag "media/images/ods-15.svg", alt: "Logo ODS 15" %>
@@ -171,7 +171,7 @@

<%= t("pjsi.logo.line2", scope: "decidim.components.sdgs") %>

<%= t("pjsi.logo.line3", scope: "decidim.components.sdgs") %>

- Logo ODS 16 + <%= image_pack_tag "media/images/ods-16.svg", alt: "Logo ODS 16" %>
@@ -181,12 +181,12 @@

<%= t("partnership.logo.line2", scope: "decidim.components.sdgs") %>

<%= t("partnership.logo.line3", scope: "decidim.components.sdgs") %>

- Logo ODS 17 + <%= image_pack_tag "media/images/ods-17.svg", alt: "Logo ODS 17" %>
- Logo United Nations + <%= image_pack_tag "media/images/un_emblem_square.png", alt: "Logo United Nations" %>
diff --git a/app/views/decidim/sdgs/sdgs_filter/_modal.html.erb b/app/views/decidim/sdgs/sdgs_filter/_modal.html.erb index 1f68b222..ac12ec95 100644 --- a/app/views/decidim/sdgs/sdgs_filter/_modal.html.erb +++ b/app/views/decidim/sdgs/sdgs_filter/_modal.html.erb @@ -1,4 +1,3 @@ -<%= stylesheet_link_tag "decidim/sdgs/sdgs_filter/modal" %>

<%= t(".title") %>

@@ -13,7 +12,7 @@ idx+= 1 idx_str= idx.to_s.rjust(2, "0") %>
- Logo SDG <%= idx_str %>"> + <%= image_pack_tag "media/images/ods-#{idx_str}.svg", alt: "Logo SDG #{idx_str}"%>

<%= "#{idx_str}. #{t_sdg(sdg_code)}" %>

diff --git a/app/views/decidim/solutions/solutions/_filters.html.erb b/app/views/decidim/solutions/solutions/_filters.html.erb index 79758878..ab700ceb 100644 --- a/app/views/decidim/solutions/solutions/_filters.html.erb +++ b/app/views/decidim/solutions/solutions/_filters.html.erb @@ -1,4 +1,3 @@ -<%= stylesheet_link_tag "decidim/sdgs/sdgs_filter/button" %> <%= filter_form_for filter do |form| %>
<% end %> @@ -102,7 +102,7 @@

<%= t(@solution.challenge.sdg_code + ".logo.line1", scope: "decidim.components.sdgs") %>

<%= t(@solution.challenge.sdg_code + ".logo.line2", scope: "decidim.components.sdgs") %>

- t('sdg_logo', scope: 'decidim.solutions.show') <%= @sdg_index %> + <%= image_pack_tag "media/images/ods-#{@sdg_index}.svg", alt: "#{t('sdg_logo', scope: 'decidim.solutions.show')} #{@sdg_index}", class: "challenge--view" %>
<% end %> @@ -167,4 +167,4 @@
- \ No newline at end of file + diff --git a/config/assets.rb b/config/assets.rb new file mode 100644 index 00000000..cd93f21c --- /dev/null +++ b/config/assets.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# This file is located at `config/assets.rb` of your module. + +# Define the base path of your module. Please note that `Rails.root` may not be +# used because we are not inside the Rails environment when this file is loaded. +base_path = File.expand_path("..", __dir__) + +# Register an additional load path for webpack. All the assets within these +# directories will be available for inclusion within the Decidim assets. For +# example, if you have `app/packs/src/decidim/foo.js`, you can include that file +# in your JavaScript entrypoints (or other JavaScript files within Decidim) +# using `import "src/decidim/foo"` after you have registered the additional path +# as follows. +Decidim::Webpacker.register_path("#{base_path}/app/packs") + +# Register the entrypoints for your module. These entrypoints can be included +# within your application using `javascript_pack_tag` and if you include any +# SCSS files within the entrypoints, they become available for inclusion using +# `stylesheet_pack_tag`. +Decidim::Webpacker.register_entrypoints( + decidim_challenges: "#{base_path}/app/packs/entrypoints/decidim_challenges.js", + decidim_problems: "#{base_path}/app/packs/entrypoints/decidim_problems.js", + decidim_solutions: "#{base_path}/app/packs/entrypoints/decidim_solutions.js", + decidim_sdgs: "#{base_path}/app/packs/entrypoints/decidim_sdgs.js", +) diff --git a/lib/decidim/challenges/engine.rb b/lib/decidim/challenges/engine.rb index c2bf8262..b8149fef 100644 --- a/lib/decidim/challenges/engine.rb +++ b/lib/decidim/challenges/engine.rb @@ -26,14 +26,14 @@ class Engine < ::Rails::Engine end end - initializer "decidim_challenges.assets" do |app| - app.config.assets.precompile += %w(decidim_challenges_manifest.js decidim_challenges_manifest.css) - end - initializer "decidim_challenges.add_cells_view_paths" do Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Challenges::Engine.root}/app/cells") Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Challenges::Engine.root}/app/views") # for partials end + + initializer "decidim_challenges.webpacker.assets_path" do + Decidim.register_assets_path File.expand_path("app/packs", root) + end end end end diff --git a/lib/decidim/challenges/version.rb b/lib/decidim/challenges/version.rb index 3c7bc3f7..4079b9a7 100644 --- a/lib/decidim/challenges/version.rb +++ b/lib/decidim/challenges/version.rb @@ -4,11 +4,11 @@ module Decidim # This holds the decidim-meetings version. module Challenges def self.version - "0.0.15" + "0.1.0" end def self.decidim_version - "~> 0.24.2" + "~> 0.25.2" end end end diff --git a/lib/decidim/problems/engine.rb b/lib/decidim/problems/engine.rb index 59c9b25f..d73b3cbf 100644 --- a/lib/decidim/problems/engine.rb +++ b/lib/decidim/problems/engine.rb @@ -18,14 +18,14 @@ class Engine < ::Rails::Engine resources :problems, only: [:index, :show] end - initializer "decidim_problems.assets" do |app| - app.config.assets.precompile += %w(decidim_problems_manifest.js decidim_problems_manifest.css) - end - initializer "decidim_problems.add_cells_view_paths" do Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Problems::Engine.root}/app/cells") Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Problems::Engine.root}/app/views") # for partials end + + initializer "decidim_problems.webpacker.assets_path" do + Decidim.register_assets_path File.expand_path("app/packs", root) + end end end end diff --git a/lib/decidim/sdgs/engine.rb b/lib/decidim/sdgs/engine.rb index f6a96fbf..37d2a0e1 100644 --- a/lib/decidim/sdgs/engine.rb +++ b/lib/decidim/sdgs/engine.rb @@ -15,11 +15,8 @@ class Engine < ::Rails::Engine root to: "sdgs#index" end - initializer "decidim_challenges.assets" do |app| - app.config.assets.precompile += %w(decidim_sdgs_manifest.js decidim_sdgs_manifest.css) - (1..17).each do |idx| - app.config.assets.precompile += ["decidim/sdgs/ods-#{idx.to_s.rjust(2, "0")}.svg"] - end + initializer "decidim_sdgs.webpacker.assets_path" do + Decidim.register_assets_path File.expand_path("app/packs", root) end end end diff --git a/lib/decidim/solutions/engine.rb b/lib/decidim/solutions/engine.rb index 8366971a..11215bf4 100644 --- a/lib/decidim/solutions/engine.rb +++ b/lib/decidim/solutions/engine.rb @@ -18,14 +18,14 @@ class Engine < ::Rails::Engine resources :challenges, only: [:index, :show] end - initializer "decidim_solutions.assets" do |app| - app.config.assets.precompile += %w(decidim_solutions_manifest.js decidim_solutions_manifest.css) - end - initializer "decidim_challenges.add_cells_view_paths" do Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Challenges::Engine.root}/app/cells") Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Challenges::Engine.root}/app/views") # for partials end + + initializer "decidim_solutions.webpacker.assets_path" do + Decidim.register_assets_path File.expand_path("app/packs", root) + end end end end diff --git a/spec/forms/decidim/challenges/admin/challenges_form_spec.rb b/spec/forms/decidim/challenges/admin/challenges_form_spec.rb index bdc9e71c..6acca5f0 100644 --- a/spec/forms/decidim/challenges/admin/challenges_form_spec.rb +++ b/spec/forms/decidim/challenges/admin/challenges_form_spec.rb @@ -6,9 +6,10 @@ module Decidim module Challenges module Admin describe ChallengesForm do - subject { described_class.from_params(attributes).with_context(current_organization: organization) } + subject { described_class.from_params(attributes).with_context(current_organization: organization, current_component: component) } - let(:organization) { create :organization } + let(:component) { create :challenges_component } + let(:organization) { component.organization } let(:scope) { create :scope, organization: organization } let(:title) do { diff --git a/spec/services/decidim/challenges/challenge_search_spec.rb b/spec/services/decidim/challenges/challenge_search_spec.rb index caed18de..aad39093 100644 --- a/spec/services/decidim/challenges/challenge_search_spec.rb +++ b/spec/services/decidim/challenges/challenge_search_spec.rb @@ -125,39 +125,37 @@ module Challenges end end - describe "related_to filter" do - context "when filtering by related to problems" do - # let(:related_to) { 'Decidim::Meetings::Meeting'.underscore } - # let(:problems_component) { create(:component, manifest_name: 'problems', participatory_space: participatory_process) } - # let(:problem) { create :problem, component: problems_component } - - it "returns only challenges related to problems" - # related_challenge = create(:challenge, :accepted, component: component) - # related_challenge_2 = create(:challenge, :accepted, component: component) - # create_list(:challenge, 3, component: component) - # problem.link_resources([related_challenge], 'challenges_from_problem') - # related_challenge_2.link_resources([problem], 'challenges_from_problem') - - # expect(subject).to match_array([related_challenge, related_challenge_2]) - # end - end - - context "when filtering by related to resources" do - # let(:related_to) { 'Decidim::DummyResources::DummyResource'.underscore } - # let(:dummy_component) { create(:component, manifest_name: 'dummy', participatory_space: participatory_process) } - # let(:dummy_resource) { create :dummy_resource, component: dummy_component } - - it "returns only challenges related to results" - # related_challenge = create(:challenge, :accepted, component: component) - # related_challenge_2 = create(:challenge, :accepted, component: component) - # create_list(:challenge, 3, component: component) - # dummy_resource.link_resources([related_challenge], 'included_challenges') - # related_challenge_2.link_resources([dummy_resource], 'included_challenges') - - # expect(subject).to match_array([related_challenge, related_challenge_2]) - # end - end - end + # describe "related_to filter" do + pending "when filtering by related to problems" + # let(:related_to) { 'Decidim::Meetings::Meeting'.underscore } + # let(:problems_component) { create(:component, manifest_name: 'problems', participatory_space: participatory_process) } + # let(:problem) { create :problem, component: problems_component } + + # it "returns only challenges related to problems" + # related_challenge = create(:challenge, :accepted, component: component) + # related_challenge_2 = create(:challenge, :accepted, component: component) + # create_list(:challenge, 3, component: component) + # problem.link_resources([related_challenge], 'challenges_from_problem') + # related_challenge_2.link_resources([problem], 'challenges_from_problem') + + # expect(subject).to match_array([related_challenge, related_challenge_2]) + # end + + pending "when filtering by related to resources" + # let(:related_to) { 'Decidim::DummyResources::DummyResource'.underscore } + # let(:dummy_component) { create(:component, manifest_name: 'dummy', participatory_space: participatory_process) } + # let(:dummy_resource) { create :dummy_resource, component: dummy_component } + + # it "returns only challenges related to results" + # related_challenge = create(:challenge, :accepted, component: component) + # related_challenge_2 = create(:challenge, :accepted, component: component) + # create_list(:challenge, 3, component: component) + # dummy_resource.link_resources([related_challenge], 'included_challenges') + # related_challenge_2.link_resources([dummy_resource], 'included_challenges') + + # expect(subject).to match_array([related_challenge, related_challenge_2]) + # end + # end end end end diff --git a/spec/services/decidim/problems/problem_search_spec.rb b/spec/services/decidim/problems/problem_search_spec.rb index 5b83f5ff..3611554a 100644 --- a/spec/services/decidim/problems/problem_search_spec.rb +++ b/spec/services/decidim/problems/problem_search_spec.rb @@ -53,9 +53,9 @@ module Problems end end - describe "when filtering problems by challenge" do - it "finds the problems associated with the given challenge" - end + # describe "when filtering problems by challenge" do + pending "finds the problems associated with the given challenge" + # end describe "problem scopes" do include_context "with example scopes" @@ -159,39 +159,37 @@ module Problems end end - describe "related_to filter" do - context "when filtering by related to problems" do - # let(:related_to) { 'Decidim::Meetings::Meeting'.underscore } - # let(:problems_component) { create(:component, manifest_name: 'problems', participatory_space: participatory_process) } - # let(:problem) { create :problem, component: problems_component } - - it "returns only problems related to problems" - # related_problem = create(:problem, :accepted, component: component) - # related_problem_2 = create(:problem, :accepted, component: component) - # create_list(:problem, 3, component: component) - # problem.link_resources([related_problem], 'problems_from_problem') - # related_problem_2.link_resources([problem], 'problems_from_problem') - - # expect(subject).to match_array([related_problem, related_problem_2]) - # end - end - - context "when filtering by related to resources" do - # let(:related_to) { 'Decidim::DummyResources::DummyResource'.underscore } - # let(:dummy_component) { create(:component, manifest_name: 'dummy', participatory_space: participatory_process) } - # let(:dummy_resource) { create :dummy_resource, component: dummy_component } - - it "returns only problems related to results" - # related_problem = create(:problem, :accepted, component: component) - # related_problem_2 = create(:problem, :accepted, component: component) - # create_list(:problem, 3, component: component) - # dummy_resource.link_resources([related_problem], 'included_problems') - # related_problem_2.link_resources([dummy_resource], 'included_problems') - - # expect(subject).to match_array([related_problem, related_problem_2]) - # end - end - end + # describe "related_to filter" do + pending "when filtering by related to problems" + # let(:related_to) { 'Decidim::Meetings::Meeting'.underscore } + # let(:problems_component) { create(:component, manifest_name: 'problems', participatory_space: participatory_process) } + # let(:problem) { create :problem, component: problems_component } + + # it "returns only problems related to problems" + # related_problem = create(:problem, :accepted, component: component) + # related_problem_2 = create(:problem, :accepted, component: component) + # create_list(:problem, 3, component: component) + # problem.link_resources([related_problem], 'problems_from_problem') + # related_problem_2.link_resources([problem], 'problems_from_problem') + + # expect(subject).to match_array([related_problem, related_problem_2]) + # end + + pending "when filtering by related to resources" + # let(:related_to) { 'Decidim::DummyResources::DummyResource'.underscore } + # let(:dummy_component) { create(:component, manifest_name: 'dummy', participatory_space: participatory_process) } + # let(:dummy_resource) { create :dummy_resource, component: dummy_component } + + # it "returns only problems related to results" + # related_problem = create(:problem, :accepted, component: component) + # related_problem_2 = create(:problem, :accepted, component: component) + # create_list(:problem, 3, component: component) + # dummy_resource.link_resources([related_problem], 'included_problems') + # related_problem_2.link_resources([dummy_resource], 'included_problems') + + # expect(subject).to match_array([related_problem, related_problem_2]) + # end + # end end end end diff --git a/spec/services/decidim/solutions/solution_search_spec.rb b/spec/services/decidim/solutions/solution_search_spec.rb index 3c0a9213..e797df0f 100644 --- a/spec/services/decidim/solutions/solution_search_spec.rb +++ b/spec/services/decidim/solutions/solution_search_spec.rb @@ -96,39 +96,37 @@ module Solutions end end - describe "related_to filter" do - context "when filtering by related to solutions" do - # let(:related_to) { 'Decidim::Meetings::Meeting'.underscore } - # let(:solutions_component) { create(:component, manifest_name: 'solutions', participatory_space: participatory_process) } - # let(:solution) { create :solution, component: solutions_component } - - it "returns only solutions related to solutions" - # related_solution = create(:solution, :accepted, component: component) - # related_solution_2 = create(:solution, :accepted, component: component) - # create_list(:solution, 3, component: component) - # solution.link_resources([related_solution], 'solutions_from_solution') - # related_solution_2.link_resources([solution], 'solutions_from_solution') - - # expect(subject).to match_array([related_solution, related_solution_2]) - # end - end - - context "when filtering by related to resources" do - # let(:related_to) { 'Decidim::DummyResources::DummyResource'.underscore } - # let(:dummy_component) { create(:component, manifest_name: 'dummy', participatory_space: participatory_process) } - # let(:dummy_resource) { create :dummy_resource, component: dummy_component } - - it "returns only solutions related to results" - # related_solution = create(:solution, :accepted, component: component) - # related_solution_2 = create(:solution, :accepted, component: component) - # create_list(:solution, 3, component: component) - # dummy_resource.link_resources([related_solution], 'included_solutions') - # related_solution_2.link_resources([dummy_resource], 'included_solutions') - - # expect(subject).to match_array([related_solution, related_solution_2]) - # end - end - end + # describe "related_to filter" do + pending "when filtering by related to solutions" + # let(:related_to) { 'Decidim::Meetings::Meeting'.underscore } + # let(:solutions_component) { create(:component, manifest_name: 'solutions', participatory_space: participatory_process) } + # let(:solution) { create :solution, component: solutions_component } + + # it "returns only solutions related to solutions" + # related_solution = create(:solution, :accepted, component: component) + # related_solution_2 = create(:solution, :accepted, component: component) + # create_list(:solution, 3, component: component) + # solution.link_resources([related_solution], 'solutions_from_solution') + # related_solution_2.link_resources([solution], 'solutions_from_solution') + + # expect(subject).to match_array([related_solution, related_solution_2]) + # end + + pending "when filtering by related to resources" + # let(:related_to) { 'Decidim::DummyResources::DummyResource'.underscore } + # let(:dummy_component) { create(:component, manifest_name: 'dummy', participatory_space: participatory_process) } + # let(:dummy_resource) { create :dummy_resource, component: dummy_component } + + # it "returns only solutions related to results" + # related_solution = create(:solution, :accepted, component: component) + # related_solution_2 = create(:solution, :accepted, component: component) + # create_list(:solution, 3, component: component) + # dummy_resource.link_resources([related_solution], 'included_solutions') + # related_solution_2.link_resources([dummy_resource], 'included_solutions') + + # expect(subject).to match_array([related_solution, related_solution_2]) + # end + # end end end end diff --git a/spec/system/decidim/problems/filter_problems_spec.rb b/spec/system/decidim/problems/filter_problems_spec.rb index ad2ae92b..9f839dfa 100644 --- a/spec/system/decidim/problems/filter_problems_spec.rb +++ b/spec/system/decidim/problems/filter_problems_spec.rb @@ -12,9 +12,9 @@ let!(:user) { create :user, :confirmed, organization: organization } let(:scoped_participatory_process) { create(:participatory_process, :with_steps, organization: organization, scope: scope) } - describe "when filtering problems by challenge" do - it "finds the problems associated with the given challenge" - end + # describe "when filtering problems by challenge" do + pending "finds the problems associated with the given challenge" + # end describe "when filtering problems by sectorial and technological scopes" do before do