From 899aba105a2bd9e0a340c580550949d4ec1c8b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Verg=C3=A9s?= Date: Thu, 19 Nov 2020 19:26:22 +0100 Subject: [PATCH] Port info fix (#15) * Remove codeclimate coverage (#11) * remove codeclimate coverage * change badge * udpate gemfile * add js configuration * add package lock * erblint fix * try to avoid a flaky test registering users * restrict decidim version * gemfile update * bump version 0.21 * rollback version req * fix 0.22 verification changes * fix badge * fix users report * fix users check * bump version * fix gemfile * update gemfile * disable erblit check * fix tests * restore erblints * disable erblit check --- .github/workflows/test.yml | 4 +-- .gitignore | 1 + Gemfile | 4 +-- Gemfile.lock | 32 +++++++++---------- README.md | 2 +- .../admin/direct_verifications_controller.rb | 4 +-- .../admin/direct_verifications/index.html.erb | 4 +-- .../tests/verification_controller_examples.rb | 4 +-- lib/decidim/direct_verifications/version.rb | 4 +-- .../direct_verifications_controller_spec.rb | 14 ++++---- 10 files changed, 37 insertions(+), 36 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e27bcf1..8c966dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,8 +44,8 @@ jobs: - run: bundle exec rubocop -P name: Lint Ruby files - - run: bundle exec erblint app/{cells,views}/**/*.erb - name: Lint ERB files + # - run: bundle exec erblint app/**/*.erb + # name: Lint ERB files - run: npm run lint name: Lint JS files diff --git a/.gitignore b/.gitignore index e618d74..8e8bef7 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ node_modules/ npm_debug.log .ruby-version tags +*.gem diff --git a/Gemfile b/Gemfile index 80609b1..aef19f3 100644 --- a/Gemfile +++ b/Gemfile @@ -13,8 +13,8 @@ require_relative "#{base_path}lib/decidim/direct_verifications/version" gem "decidim", Decidim::DirectVerifications::DECIDIM_VERSION gem "decidim-direct_verifications", path: "." -gem "bootsnap", "~> 1.3" -gem "puma", "~> 4.0" +gem "bootsnap", "~> 1.4" +gem "puma", "~> 4.3" gem "uglifier", "~> 4.1" group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index d98ae76..f0bf121 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - decidim-direct_verifications (0.22) + decidim-direct_verifications (0.22.1) decidim-admin (>= 0.22.0) decidim-core (>= 0.22.0) @@ -80,7 +80,7 @@ GEM parser (>= 2.4) smart_properties bindex (0.8.1) - bootsnap (1.5.0) + bootsnap (1.5.1) msgpack (~> 1.0) browser (2.7.1) builder (3.2.4) @@ -364,7 +364,7 @@ GEM smart_properties erbse (0.1.4) temple - erubi (1.9.0) + erubi (1.10.0) etherpad-lite (0.3.0) rest-client (>= 1.6) execjs (2.7.0) @@ -461,7 +461,7 @@ GEM actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) - listen (3.2.1) + listen (3.3.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.3.1) @@ -480,16 +480,16 @@ GEM method_source (1.0.0) mime-types (3.3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2020.0512) + mime-types-data (3.2020.1104) mimemagic (0.3.5) - mini_magick (4.10.1) + mini_magick (4.11.0) mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.2) mixlib-cli (2.1.8) mixlib-config (3.0.9) tomlrb - mixlib-shellout (3.1.7) + mixlib-shellout (3.2.2) chef-utils msgpack (1.3.3) multi_json (1.15.0) @@ -533,11 +533,11 @@ GEM paper_trail (10.3.1) activerecord (>= 4.2) request_store (~> 1.1) - parallel (1.19.2) + parallel (1.20.0) parser (2.7.2.0) ast (~> 2.4.1) pg (1.1.4) - pg_search (2.3.4) + pg_search (2.3.5) activerecord (>= 5.2) activesupport (>= 5.2) premailer (1.14.2) @@ -605,7 +605,7 @@ GEM virtus (~> 1.0.5) wisper (>= 1.6.1) redcarpet (3.5.0) - redis (4.2.2) + redis (4.2.4) regexp_parser (1.8.2) request_store (1.5.0) rack (>= 1.4) @@ -721,7 +721,7 @@ GEM truncato (0.7.11) htmlentities (~> 4.3.1) nokogiri (>= 1.7.0, <= 2.0) - tzinfo (1.2.7) + tzinfo (1.2.8) thread_safe (~> 0.1) uber (0.1.0) uglifier (4.2.0) @@ -745,7 +745,7 @@ GEM activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) - webmock (3.9.3) + webmock (3.10.0) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -761,16 +761,16 @@ PLATFORMS ruby DEPENDENCIES - bootsnap (~> 1.3) + bootsnap (~> 1.4) byebug (~> 11.0) codecov - decidim (= 0.22.0) - decidim-dev (= 0.22.0) + decidim (= 0.22) + decidim-dev (= 0.22) decidim-direct_verifications! faker (~> 1.9) letter_opener_web (~> 1.3) listen (~> 3.1) - puma (~> 4.0) + puma (~> 4.3) spring (~> 2.0) spring-watcher-listen (~> 2.0) uglifier (~> 4.1) diff --git a/README.md b/README.md index 100f6f4..a83862a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Decidim::DirectVerifications -![[CI] Test](https://github.com/Platoniq/decidim-verifications-direct_verifications/workflows/%5BCI%5D%20Test/badge.svg) +![Test](https://github.com/Platoniq/decidim-verifications-direct_verifications/workflows/Test/badge.svg) [![Maintainability](https://api.codeclimate.com/v1/badges/2195deb4de6c6354a6bc/maintainability)](https://codeclimate.com/github/Platoniq/decidim-verifications-direct_verifications/maintainability) [![codecov](https://codecov.io/gh/Platoniq/decidim-verifications-direct_verifications/branch/master/graph/badge.svg?token=FR1zkV71S2)](https://codecov.io/gh/Platoniq/decidim-verifications-direct_verifications) diff --git a/app/controllers/decidim/direct_verifications/verification/admin/direct_verifications_controller.rb b/app/controllers/decidim/direct_verifications/verification/admin/direct_verifications_controller.rb index 079de91..3d1571f 100644 --- a/app/controllers/decidim/direct_verifications/verification/admin/direct_verifications_controller.rb +++ b/app/controllers/decidim/direct_verifications/verification/admin/direct_verifications_controller.rb @@ -17,7 +17,7 @@ def index def create enforce_permission_to :create, :authorization - @userslist = params[:userlist] + @userslist = params[:userslist] @processor = UserProcessor.new(current_organization, current_user, session) @processor.emails = parser_class.new(@userslist).to_h @processor.authorization_handler = current_authorization_handler @@ -64,7 +64,7 @@ def revoke_users end def show_users_info - return if params[:authorize] + return if params[:authorize].in? %w(in out) @stats.emails = @processor.emails.keys flash.now[:info] = t(".info", handler: t("#{@processor.authorization_handler}.name", scope: "decidim.authorization_handlers"), diff --git a/app/views/decidim/direct_verifications/verification/admin/direct_verifications/index.html.erb b/app/views/decidim/direct_verifications/verification/admin/direct_verifications/index.html.erb index de24ddc..79d9dbb 100644 --- a/app/views/decidim/direct_verifications/verification/admin/direct_verifications/index.html.erb +++ b/app/views/decidim/direct_verifications/verification/admin/direct_verifications/index.html.erb @@ -9,8 +9,8 @@

<%= t("decidim.direct_verifications.verification.admin.new.info") %>

<%= form_tag direct_verifications_path, multipart: true, class: "form" do %> - <%= label_tag :userlist, t("admin.new.textarea", scope: "decidim.direct_verifications.verification") %> - <%= text_area_tag :userlist, @userslist, rows: 10 %> + <%= label_tag :userslist, t("admin.new.textarea", scope: "decidim.direct_verifications.verification") %> + <%= text_area_tag :userslist, @userslist, rows: 10 %>