Skip to content

Commit

Permalink
Credit renewal flow (#77)
Browse files Browse the repository at this point in the history
* add census type radio buttons

* fix lint

* fix transformLocales

* createion elections with cencus permissions

* add batch queue

* add verification methods for voting

* remove whenever, add info to readme

* update the vocdoni census after delete authorization

* add internal_census field

* change readme

* change views vote

* add helper method

* add modal window, add internal census logic to voting

* add loginModal

* fix login modal, fix wallet generation

* create election without verification_types

* create election without voters

* fix erb linter

* refactoring, add system tests for internsl census

* change titles in census form

* fix preview, fix tests

* fix missink keys

* fix use doublequote  quotes

* add spec for job

* fic create internal command, add tests

* add spec for cell

* add spec for form

* add spec for controller

* add spec for AuthorizationsData model

* add spec for AuthorizationExtensions

* add system test for vote online

* fix lint

* add spec for voter model

* remove the unnecessary method

* fix new-vote.js

* fix CensusPermissionsForm

* update ruby

* add wrapper for node

* Use a Sdk service for running sdk actions

* clean js

* add election to sdk runner

* fix create wallet test

* update create census test

* create an election from the backend

* Create the election using node

* normalize locales

* fix wizard test

* make tests deterministic

* fix factories

* start elections

* use values for results

* remove unused test

* fix erb file

* fix unit tests

* fix syntac error

* fix more tests

* fix tests

* fix tests

* fix tests

* fix wrong method for translated

* avoid external library

* better management of the case auto_start

* fix test

* debug sdk

* prevent comunitaction with api

* add the test log to artifacts

* use expect to wait for ajax

* handle & update results

* message acording election start mode

* linting

* Merge node-wrapper branch

* remove js

* fix npm lint

* fix rubocop

* fix census controller

* fix test

* change census view

* change voter_verified?

* change voter_verified?

* fix  voter_verified? for empty required_authorizations

* update sdk

* Refactor deterministicWallet method to align with JS implementation and enhance security

* fix tests

* fix test

* fix updating of voting statistics

* change logic: creating technical_voter when no one is authorized for selected authorization types; add spec

* fix test

* Update README.md

Co-authored-by: Ivan Vergés <[email protected]>

* Update README.md

Co-authored-by: Ivan Vergés <[email protected]>

* fix translata of authorizations handler_name

* Save the census wallet for later use. Allow to send updated census

* test script for census change

* fix test using mjs for node wrapper

* fix script

* script working

* update census job, add information on the need to update the census

* add census traking

* fix non_voters method, fix job

* fix job

* refactor the job, add new services

* fix rubocop, locale

* npm update, fix BigInt

* fix erblint

* refactor steps controller, add flash, permissions

* change chrome version for test

* change chrome version for test

* change chrome version for test

* change chrome version for test

* change chromedriver version for test

* change chromedriver version 121 for test

* change chromedriver version 121 for test

* fix tests

* add tests

* fix locale keys

* update chromedriver config

* add ajax for update census info

* Add text to the voting page when the voter is not yet listed in the census

* fix translate missing

* fix tests

* delete test

* fix erb lint

* remove the code

* fix ajax

* add tests

* improve census view

* fix tests

* fix tests

* change massage in the setup form for internal census

* improve the census update view

* replace flash message to ajax

* change texts for check census

* add helpers

* add helper methods

* remove code

* remove code

* remove migration, remove AuthorizationsData

* delete override

* destroy tech voter after census update

* fix test

* fix ajax: update census

* fix erb linter

* ensure user is redirected to where the action started

* change the users context for the internal census form

Co-authored-by: Ivan Vergés <[email protected]>

* refactoring VotesController

* change text for update census result

* remove cron task

* Update README.md

Co-authored-by: Ivan Vergés <[email protected]>

* add DECIDIM_COMPAT_VERSION

Co-authored-by: Ivan Vergés <[email protected]>

* update gemspec

* refactoring: dynamic_census attribute is not used

* add custom version number, add info to readme

* bundle

* add credit renewal flow, add tests

* add comments

* fix erb linter, fix test

* add test

* remove migrations

* remove api_endpoint_env method

* remove btn for propd env

* update instructions and provider

* fix specs

* rubocop

---------

Co-authored-by: Ivan Vergés <[email protected]>
  • Loading branch information
antopalidi and microstudi authored May 13, 2024
1 parent 6a02d0f commit 7b49435
Show file tree
Hide file tree
Showing 19 changed files with 281 additions and 372 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source "https://rubygems.org"

ruby RUBY_VERSION

DECIDIM_VERSION = "0.27.5"
DECIDIM_VERSION = "0.27.6"

gem "decidim", DECIDIM_VERSION
gem "decidim-vocdoni", path: "."
Expand Down
185 changes: 91 additions & 94 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ GEM
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
axe-core-api (4.8.1)
axe-core-api (4.9.0)
dumb_delegator
virtus
axe-core-rspec (4.1.0)
Expand All @@ -97,7 +97,7 @@ GEM
html_tokenizer (~> 0.0.6)
parser (>= 2.4)
smart_properties
bigdecimal (3.1.6)
bigdecimal (3.1.8)
bindex (0.8.1)
bootsnap (1.18.3)
msgpack (~> 1.2)
Expand Down Expand Up @@ -133,7 +133,7 @@ GEM
actionpack (>= 5.0)
cells (>= 4.1.6, < 5.0.0)
charlock_holmes (0.7.7)
chef-utils (18.4.2)
chef-utils (18.4.12)
concurrent-ruby
childprocess (4.1.0)
codecov (0.6.0)
Expand All @@ -149,7 +149,7 @@ GEM
coffee-script-source (1.12.2)
commonmarker (0.23.10)
concurrent-ruby (1.2.3)
crack (0.4.6)
crack (1.0.0)
bigdecimal
rexml
crass (1.0.6)
Expand All @@ -162,63 +162,63 @@ GEM
db-query-matchers (0.10.0)
activesupport (>= 4.0, < 7)
rspec (~> 3.0)
decidim (0.27.5)
decidim-accountability (= 0.27.5)
decidim-admin (= 0.27.5)
decidim-api (= 0.27.5)
decidim-assemblies (= 0.27.5)
decidim-blogs (= 0.27.5)
decidim-budgets (= 0.27.5)
decidim-comments (= 0.27.5)
decidim-core (= 0.27.5)
decidim-debates (= 0.27.5)
decidim-forms (= 0.27.5)
decidim-generators (= 0.27.5)
decidim-meetings (= 0.27.5)
decidim-pages (= 0.27.5)
decidim-participatory_processes (= 0.27.5)
decidim-proposals (= 0.27.5)
decidim-sortitions (= 0.27.5)
decidim-surveys (= 0.27.5)
decidim-system (= 0.27.5)
decidim-templates (= 0.27.5)
decidim-verifications (= 0.27.5)
decidim-accountability (0.27.5)
decidim-comments (= 0.27.5)
decidim-core (= 0.27.5)
decidim-admin (0.27.5)
decidim (0.27.6)
decidim-accountability (= 0.27.6)
decidim-admin (= 0.27.6)
decidim-api (= 0.27.6)
decidim-assemblies (= 0.27.6)
decidim-blogs (= 0.27.6)
decidim-budgets (= 0.27.6)
decidim-comments (= 0.27.6)
decidim-core (= 0.27.6)
decidim-debates (= 0.27.6)
decidim-forms (= 0.27.6)
decidim-generators (= 0.27.6)
decidim-meetings (= 0.27.6)
decidim-pages (= 0.27.6)
decidim-participatory_processes (= 0.27.6)
decidim-proposals (= 0.27.6)
decidim-sortitions (= 0.27.6)
decidim-surveys (= 0.27.6)
decidim-system (= 0.27.6)
decidim-templates (= 0.27.6)
decidim-verifications (= 0.27.6)
decidim-accountability (0.27.6)
decidim-comments (= 0.27.6)
decidim-core (= 0.27.6)
decidim-admin (0.27.6)
active_link_to (~> 1.0)
decidim-core (= 0.27.5)
decidim-core (= 0.27.6)
devise (~> 4.7)
devise-i18n (~> 1.2)
devise_invitable (~> 2.0, >= 2.0.9)
decidim-api (0.27.5)
decidim-api (0.27.6)
decidim-core (= 0.27.6)
graphql (~> 1.12, < 1.13)
graphql-docs (~> 2.1.0)
rack-cors (~> 1.0)
decidim-assemblies (0.27.5)
decidim-core (= 0.27.5)
decidim-blogs (0.27.5)
decidim-admin (= 0.27.5)
decidim-comments (= 0.27.5)
decidim-core (= 0.27.5)
decidim-budgets (0.27.5)
decidim-comments (= 0.27.5)
decidim-core (= 0.27.5)
decidim-comments (0.27.5)
decidim-core (= 0.27.5)
decidim-assemblies (0.27.6)
decidim-core (= 0.27.6)
decidim-blogs (0.27.6)
decidim-admin (= 0.27.6)
decidim-comments (= 0.27.6)
decidim-core (= 0.27.6)
decidim-budgets (0.27.6)
decidim-comments (= 0.27.6)
decidim-core (= 0.27.6)
decidim-comments (0.27.6)
decidim-core (= 0.27.6)
redcarpet (~> 3.5, >= 3.5.1)
decidim-core (0.27.5)
decidim-core (0.27.6)
active_link_to (~> 1.0)
acts_as_list (~> 0.9)
batch-loader (~> 1.2)
browser (~> 2.7)
carrierwave (~> 2.2.1)
carrierwave (~> 2.2.5, >= 2.2.5)
cells-erb (~> 0.1.0)
cells-rails (~> 0.1.3)
charlock_holmes (~> 0.7)
date_validator (~> 0.12.0)
decidim-api (= 0.27.5)
devise (~> 4.7)
devise-i18n (~> 1.2)
diffy (~> 3.3)
Expand All @@ -234,7 +234,6 @@ GEM
loofah (~> 2.19.0)
mime-types (>= 1.16, < 4.0)
mini_magick (~> 4.9)
mustache (~> 1.1.0)
omniauth (~> 2.0)
omniauth-facebook (~> 5.0)
omniauth-google-oauth2 (~> 1.0)
Expand All @@ -259,15 +258,15 @@ GEM
webpacker (= 6.0.0.rc.5)
webpush (~> 1.1)
wisper (~> 2.0)
decidim-debates (0.27.5)
decidim-comments (= 0.27.5)
decidim-core (= 0.27.5)
decidim-dev (0.27.5)
decidim-debates (0.27.6)
decidim-comments (= 0.27.6)
decidim-core (= 0.27.6)
decidim-dev (0.27.6)
axe-core-rspec (~> 4.1.0)
byebug (~> 11.0)
capybara (~> 3.24)
db-query-matchers (~> 0.10.0)
decidim (= 0.27.5)
decidim (= 0.27.6)
erb_lint (~> 0.0.35)
factory_bot_rails (~> 4.8)
i18n-tasks (~> 0.9.18)
Expand All @@ -290,45 +289,44 @@ GEM
w3c_rspec_validators (~> 0.3.0)
webmock (~> 3.6)
wisper-rspec (~> 1.0)
decidim-forms (0.27.5)
decidim-core (= 0.27.5)
decidim-forms (0.27.6)
decidim-core (= 0.27.6)
wicked_pdf (~> 2.1)
wkhtmltopdf-binary (~> 0.12)
decidim-generators (0.27.5)
decidim-core (= 0.27.5)
decidim-meetings (0.27.5)
decidim-core (= 0.27.5)
decidim-forms (= 0.27.5)
decidim-generators (0.27.6)
decidim-core (= 0.27.6)
decidim-meetings (0.27.6)
decidim-core (= 0.27.6)
decidim-forms (= 0.27.6)
icalendar (~> 2.5)
decidim-pages (0.27.5)
decidim-core (= 0.27.5)
decidim-participatory_processes (0.27.5)
decidim-core (= 0.27.5)
decidim-proposals (0.27.5)
decidim-comments (= 0.27.5)
decidim-core (= 0.27.5)
decidim-pages (0.27.6)
decidim-core (= 0.27.6)
decidim-participatory_processes (0.27.6)
decidim-core (= 0.27.6)
decidim-proposals (0.27.6)
decidim-comments (= 0.27.6)
decidim-core (= 0.27.6)
doc2text (~> 0.4.5)
redcarpet (~> 3.5, >= 3.5.1)
decidim-sortitions (0.27.5)
decidim-admin (= 0.27.5)
decidim-comments (= 0.27.5)
decidim-core (= 0.27.5)
decidim-proposals (= 0.27.5)
decidim-surveys (0.27.5)
decidim-core (= 0.27.5)
decidim-forms (= 0.27.5)
decidim-templates (= 0.27.5)
decidim-system (0.27.5)
decidim-sortitions (0.27.6)
decidim-admin (= 0.27.6)
decidim-comments (= 0.27.6)
decidim-core (= 0.27.6)
decidim-proposals (= 0.27.6)
decidim-surveys (0.27.6)
decidim-core (= 0.27.6)
decidim-forms (= 0.27.6)
decidim-system (0.27.6)
active_link_to (~> 1.0)
decidim-core (= 0.27.5)
decidim-core (= 0.27.6)
devise (~> 4.7)
devise-i18n (~> 1.2)
devise_invitable (~> 2.0, >= 2.0.9)
decidim-templates (0.27.5)
decidim-core (= 0.27.5)
decidim-forms (= 0.27.5)
decidim-verifications (0.27.5)
decidim-core (= 0.27.5)
decidim-templates (0.27.6)
decidim-core (= 0.27.6)
decidim-forms (= 0.27.6)
decidim-verifications (0.27.6)
decidim-core (= 0.27.6)
declarative-builder (0.1.0)
declarative-option (< 0.2.0)
declarative-option (0.1.0)
Expand All @@ -347,8 +345,8 @@ GEM
devise (>= 4.6)
diff-lcs (1.5.1)
diffy (3.4.2)
doc2text (0.4.6)
nokogiri (>= 1.13.2, < 1.15.0)
doc2text (0.4.7)
nokogiri (>= 1.13.2, < 1.17.0)
rubyzip (~> 2.3.0)
docile (1.4.0)
doorkeeper (5.6.8)
Expand Down Expand Up @@ -419,7 +417,7 @@ GEM
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
html_tokenizer (0.0.7)
html_tokenizer (0.0.8)
htmlentities (4.3.4)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
Expand All @@ -442,7 +440,7 @@ GEM
ruby-vips (>= 2.0.17, < 3)
invisible_captcha (0.13.0)
rails (>= 3.2.0)
json (2.7.1)
json (2.7.2)
jwt (2.7.1)
kaminari (1.2.2)
activesupport (>= 4.1.0)
Expand Down Expand Up @@ -502,7 +500,6 @@ GEM
chef-utils
msgpack (1.7.2)
multi_xml (0.6.0)
mustache (1.1.1)
net-http (0.4.1)
uri
net-imap (0.4.10)
Expand Down Expand Up @@ -663,7 +660,7 @@ GEM
rspec-html-matchers (0.9.4)
nokogiri (~> 1)
rspec (>= 3.0.0.a, < 4)
rspec-mocks (3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (4.1.2)
Expand All @@ -676,7 +673,7 @@ GEM
rspec-support (~> 3.10)
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.13.0)
rspec-support (3.13.1)
rspec_junit_formatter (0.3.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.28.2)
Expand Down Expand Up @@ -780,7 +777,7 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webmock (3.20.0)
webmock (3.23.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand All @@ -795,11 +792,11 @@ GEM
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
wicked_pdf (2.7.0)
wicked_pdf (2.8.0)
activesupport
wisper (2.0.1)
wisper-rspec (1.1.0)
wkhtmltopdf-binary (0.12.6.6)
wkhtmltopdf-binary (0.12.6.7)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.13)
Expand All @@ -815,8 +812,8 @@ DEPENDENCIES
bootsnap (~> 1.7)
byebug (~> 11.0)
codecov (~> 0.6.0)
decidim (= 0.27.5)
decidim-dev (= 0.27.5)
decidim (= 0.27.6)
decidim-dev (= 0.27.6)
decidim-vocdoni!
faker (~> 2.14)
i18n-tasks (~> 0.9.37)
Expand All @@ -832,4 +829,4 @@ RUBY VERSION
ruby 3.0.6p216

BUNDLED WITH
2.4.21
2.4.22
Loading

0 comments on commit 7b49435

Please sign in to comment.