Decidim Verifications for Barcelona Energia Census.
Decidim::Verifications::BarcelonaEnergiaCensus will be available as a Component for Verifications
- The user must be registered as "normal" Decidim::User. with the same email as Barcelona Energia Platform.
- Then, User goes to the Authorizations path and fill the fields email and password to verifiy the user. This connects to a WS with params (barcelona_energia_census_url, barcelona_energia_census_secret, barcelona_energia_census_interest) added on secrets.yml.
- If the return is valid, the user is verified.
Add this line to your application's Gemfile:
gem 'decidim-verifications-barcelona_energia_census'
And then execute:
bundle
BarcelonaEnergiaCensus verificator needs 2 values to perform requests: url and interest
Take care to add environment values to the secrets.yml file with:
barcelona_energia_census:
barcelona_energia_census_url: <%= ENV["BARCELONA_ENERGIA_CENSUS_URL"] %>
barcelona_energia_census_secret: <%= ENV["BARCELONA_ENERGIA_CENSUS_SECRET"] %>
barcelona_energia_census_interest: <%= ENV["BARCELONA_ENERGIA_CENSUS_INTEREST"] %>
-
Run
bundle exec rake test_app
. Execution will fail in an specific migration. -
cd
spec/decidim_dummy_app/
and:
2.1. Comment up
execution in failing migration
2.2. Execute...
RAILS_ENV=test bundle exec rails db:drop
RAILS_ENV=test bundle exec rails db:create
RAILS_ENV=test bundle exec rails db:migrate
-
back to root folder
cd ../..
-
run tests with
bundle exec rspec
-
Remember to configure this new test App with configuration values.
Decidim::Verifications::BarcelonaEnergiaCensus
depends directly on Decidim::Verifications
in 0.16.0
version.
See Decidim.
This engine is distributed under the GNU AFFERO GENERAL PUBLIC LICENSE.