-
-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add and use decidim-bulletin_board gem (#6997)
* add BulletinBoard gem * set BulletinBoard configuration * use BulletinBoard gem to setup an election * remove graphlient gem * remove bulletin board client * fix scheme name * remove graphlient require * update setup election response handling * add decidim-bulletin_board gem * use decidim-bulletin_board gem * fix public key factory * lint code * remove old Bulletin Board client * update design_app gemfile * update decidim generators gemfile * update bulletin board docs * fix bulletin board configuration * fix: remove unneeded class (used from the BB gem) * test: handle error messages during election setup Co-authored-by: Leonardo Diez <leiodd@gmail.com>
- Loading branch information
1 parent
2ced107
commit dd287eb
Showing
18 changed files
with
115 additions
and
573 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
decidim-elections/config/initializers/decidim_bulletin_board.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
return if Rails.application.secrets.bulletin_board.blank? | ||
|
||
Decidim::BulletinBoard.configure do |config| | ||
# Exposes a configuration option: the bulletin board server | ||
config.server = Rails.application.secrets.bulletin_board[:server] | ||
|
||
# Exposes a configuration option: the api key generated by the Bulletin Board for the Decidim instance | ||
config.api_key = Rails.application.secrets.bulletin_board[:api_key] | ||
|
||
# Exposes a configuration option: the scheme to be used for messages | ||
config.scheme = Rails.application.secrets.bulletin_board[:scheme] | ||
|
||
# Exposes a configuration option: the authority name String | ||
config.authority_name = Rails.application.secrets.bulletin_board[:authority_name] | ||
|
||
# Exposes a configuration option: number of trustees for an election | ||
config.number_of_trustees = Rails.application.secrets.bulletin_board[:number_of_trustees] | ||
|
||
# Exposes a configuration option: private key, that got generated by the Decidim instance | ||
config.identification_private_key = Rails.application.secrets.bulletin_board[:identification_private_key] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
decidim-elections/lib/decidim/elections/bulletin_board_client.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
require "rails" | ||
require "decidim/core" | ||
require "graphlient" | ||
|
||
module Decidim | ||
module Elections | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
158 changes: 1 addition & 157 deletions
158
...ages_elections/set_up_an_election/when_the_election_is_published/sets_up_an_election.json
Large diffs are not rendered by default.
Oops, something went wrong.
157 changes: 0 additions & 157 deletions
157
...c/cassettes/Decidim_Elections_Admin_SetupElection/when_valid_form/setup_the_election.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.