-
-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add and use decidim-bulletin_board gem #6997
Merged
tramuntanal
merged 19 commits into
develop
from
refactor/move-bulletin-board-client-to-bb-gem
Dec 15, 2020
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9ba1792
add BulletinBoard gem
slickepinne ce374a5
set BulletinBoard configuration
slickepinne a019409
use BulletinBoard gem to setup an election
slickepinne 0e2285e
remove graphlient gem
slickepinne f48dc09
remove bulletin board client
slickepinne f9ba89f
fix scheme name
slickepinne 54b3c65
remove graphlient require
slickepinne ff6131e
update setup election response handling
slickepinne 174ad8e
add decidim-bulletin_board gem
slickepinne 8c09bea
use decidim-bulletin_board gem
slickepinne a25ee4c
fix public key factory
slickepinne a0d2cd6
lint code
slickepinne fda447f
remove old Bulletin Board client
slickepinne c30eca5
update design_app gemfile
slickepinne 5131813
update decidim generators gemfile
slickepinne 45a676a
update bulletin board docs
slickepinne d4d51ab
fix bulletin board configuration
slickepinne 0c0ac85
fix: remove unneeded class (used from the BB gem)
leio10 d2bf821
test: handle error messages during election setup
leio10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove the
election_id
andcreate_election
, as they are included in themessage_id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I have that in mind. I wanted to do that with the refactoring of moving the whole
election_data
to the gem.