decidim-bulletin_board 0.13.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -3
- data/Gemfile +2 -2
- data/Gemfile.lock +68 -66
- data/app/assets/javascripts/decidim/bulletin_board/decidim-bulletin_board.js +56 -56
- data/decidim-bulletin_board.gemspec +5 -2
- data/lib/decidim/bulletin_board.rb +1 -0
- data/lib/decidim/bulletin_board/authority/create_election.rb +11 -11
- data/lib/decidim/bulletin_board/authority/publish_results.rb +2 -2
- data/lib/decidim/bulletin_board/client.rb +11 -1
- data/lib/decidim/bulletin_board/file_client.rb +14 -0
- data/lib/decidim/bulletin_board/graphql/bb_schema.json +92 -13
- data/lib/decidim/bulletin_board/graphql/factory.rb +11 -0
- data/lib/decidim/bulletin_board/graphql/file_adapter.rb +30 -0
- data/lib/decidim/bulletin_board/message_identifier.rb +4 -0
- data/lib/decidim/bulletin_board/test/reset_test_database.rb +30 -0
- data/lib/decidim/bulletin_board/version.rb +1 -1
- metadata +20 -6
- data/CHANGELOG.md +0 -230
- data/CODE_OF_CONDUCT.md +0 -74
- data/bin/release +0 -10
data/CHANGELOG.md
DELETED
@@ -1,230 +0,0 @@
|
|
1
|
-
# Changelog
|
2
|
-
|
3
|
-
All notable changes to this project will be documented in this file.
|
4
|
-
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
-
|
8
|
-
## Unreleased
|
9
|
-
|
10
|
-
## [0.13.0] - 2021-02-23
|
11
|
-
|
12
|
-
## [0.12.1] - 2021-02-22
|
13
|
-
|
14
|
-
### Changed
|
15
|
-
|
16
|
-
- The `VoteComponent` event names have been changed to more suitable ones.
|
17
|
-
|
18
|
-
## [0.12.0] - 2021-02-19
|
19
|
-
|
20
|
-
### Added
|
21
|
-
|
22
|
-
- The `Voter` returns the ballot hash after encrpyting the plain vote and before auditing or casting it
|
23
|
-
|
24
|
-
### Changed
|
25
|
-
|
26
|
-
- The `create_election` command now expects objects representing the parts public keys.
|
27
|
-
|
28
|
-
## [0.11.0] - 2021-02-18
|
29
|
-
|
30
|
-
### Changed
|
31
|
-
|
32
|
-
- Changed the name of some settings\* to improve the readability of the code:
|
33
|
-
- BB settings: `bulletin_board_server`\* and `bulletin_board_public_key`\*.
|
34
|
-
- Authority settings: `authority_api_key`\*, `authority_name` and `authority_private_key`\*.
|
35
|
-
- Elections settings: `scheme_name`, `number_of_trustees` and `quorum`.
|
36
|
-
- `KeyCeremonyComponent` and `TallyComponent` now accepts a `trusteeWrapperAdapter` object.
|
37
|
-
- The `processMessage` method from the `TrusteeWrapperAdapter` now accepts a `messageType` instead of a `messageIdentifier`.
|
38
|
-
|
39
|
-
### Removed
|
40
|
-
|
41
|
-
- The `TrusteeWrapper` for the "dummy" voting scheme has been removed from the project.
|
42
|
-
|
43
|
-
### Added
|
44
|
-
|
45
|
-
- The `TrusteeWrapperAdapter` abstract class can be used to implement any voting scheme wrapper adapter.
|
46
|
-
|
47
|
-
## [0.10.1] - 2021-02-15
|
48
|
-
|
49
|
-
### Fixed
|
50
|
-
|
51
|
-
- The `TallyComponent` now uses the `key_ceremony` messages as well.
|
52
|
-
|
53
|
-
## [0.10.0] - 2021-02-12
|
54
|
-
|
55
|
-
## Added
|
56
|
-
|
57
|
-
- A command to get decoded election results.
|
58
|
-
- The (Bulletin Board) server public key is now included in the gem configuration.
|
59
|
-
- The option to `audit` a vote.
|
60
|
-
|
61
|
-
## Changed
|
62
|
-
|
63
|
-
- The `get_election_log_entries_by_type` command got renamed to `get_election_results`.
|
64
|
-
- The `create_election` command now receives all the information needed in a simple hash and builds the message to add to the election log. It only needs seven main keys: `trustees`, `default_locale`, `title`, `start_date`, `end_date`, `questions` and `answers`.
|
65
|
-
- The `scheme` setting was replaced by the `scheme_name` and `quorum` settings.
|
66
|
-
|
67
|
-
## [0.9.2] - 2021-02-02
|
68
|
-
|
69
|
-
## [0.9.1] - 2021-02-02
|
70
|
-
|
71
|
-
## Added
|
72
|
-
|
73
|
-
- The `VoteComponent` has been added. It will be used as a glue code between the vote and the UI.
|
74
|
-
- The ruby client now includes the `get_election_log_entries_by_types` method to get the election log entries filtered by type.
|
75
|
-
|
76
|
-
## [0.9.0] - 2021-02-01
|
77
|
-
|
78
|
-
## Changed
|
79
|
-
|
80
|
-
- The `open_ballot_box` and `close_ballot_box` are now called `start_vote` and `end_vote` and return a pending message.
|
81
|
-
- All the client operations yield the `message_id` before sending the request to the Bulletin Board.
|
82
|
-
|
83
|
-
## Added
|
84
|
-
|
85
|
-
- `start_key_ceremony` method to the `Decidim::BulletinBoard::Client`.
|
86
|
-
- The `IdentificationKeys` class has been added to the JS library.
|
87
|
-
- The `TallyComponent` has been added. It will be used as a glue code between the tally and the UI.
|
88
|
-
|
89
|
-
## [0.8.2] - 2021-01-28
|
90
|
-
|
91
|
-
## Changed
|
92
|
-
|
93
|
-
- `encrypt` in `VoterWrapperDummy` has a TimeOut of 500ms.
|
94
|
-
|
95
|
-
## [0.8.0] - 2021-01-27
|
96
|
-
|
97
|
-
## Changed
|
98
|
-
|
99
|
-
- `getPendingMessage` can get queried by `messageId` and by `id`.
|
100
|
-
- `get_status` renamed to `get_election_status` in the `Decidim::BulletinBoard::Client`.
|
101
|
-
|
102
|
-
## Added
|
103
|
-
|
104
|
-
- `getPendingMessageStatus` method to the `Decidim::BulletinBoard::Client`.
|
105
|
-
- `waitForPendingMessageToBeProcessed` method to the Voter class.
|
106
|
-
- The `KeyCeremonyComponent` has been added. It will be used as a glue code between the key ceremony process and the UI.
|
107
|
-
|
108
|
-
## [0.7.0] - 2021-01-26
|
109
|
-
|
110
|
-
## Changed
|
111
|
-
|
112
|
-
- The `Trustee` class now uses the `Election` class to interact with the log entries.
|
113
|
-
- The `Trustee` class handles everything now when performing both the key ceremony and the tally process.
|
114
|
-
- The `Trustee` class now includes a `setupKeyCeremony` generator function that must be called before starting the key ceremony process.
|
115
|
-
- `checkRestoreNeeded` method has been renamed to `needsToBeRestored` for both the `Trustee` and the `TrusteeWrapper`.
|
116
|
-
|
117
|
-
## Added
|
118
|
-
|
119
|
-
- `start_tally` method to the `Decidim::BulletinBoard::Client`.
|
120
|
-
- `publish_results` method to the `Decidim::BulletinBoard::Client`.
|
121
|
-
- `Election` class in the JS package to handle the election state. An instance of this class will be used by the key ceremony and the trustee to check anything related to log entries.
|
122
|
-
- The `Trustee` class now has a `teardown` method that is called automatically to clean a few things. It can be called early to avoid memory leaks if needed.
|
123
|
-
- The `EventManager` class now handles the `events` stream and exports some useful constants.
|
124
|
-
|
125
|
-
## Removed
|
126
|
-
|
127
|
-
- The `KeyCeremony` class has been removed.
|
128
|
-
- The `Trustee` backup method has been removed because it doesn't belong to the public API anymore.
|
129
|
-
|
130
|
-
## [0.6.1] - 2021-01-12
|
131
|
-
|
132
|
-
### Changed
|
133
|
-
|
134
|
-
- Production file now is called `decidim-bulletin_board.js` and development file is called `decidim-bulletin_board.dev.js`.
|
135
|
-
|
136
|
-
### Removed
|
137
|
-
|
138
|
-
- The GraphQL client doesn't use subscriptions anymore.
|
139
|
-
|
140
|
-
## [0.6.0] - 2021-01-12
|
141
|
-
|
142
|
-
### Changed
|
143
|
-
|
144
|
-
- Updated the app schema definition with the partial log entries list retrieval
|
145
|
-
- Gem is an engine, the js assets can be imported in Decidim.
|
146
|
-
|
147
|
-
## [0.5.3] - 2020-12-20
|
148
|
-
|
149
|
-
### Fixed
|
150
|
-
|
151
|
-
- Fix the schema definition folder when used inside an app
|
152
|
-
|
153
|
-
## [0.5.2] - 2020-12-20
|
154
|
-
|
155
|
-
### Fixed
|
156
|
-
|
157
|
-
- Include the schema definition within the gem to avoid extra trips to the server
|
158
|
-
|
159
|
-
## [0.5.1] - 2020-12-19
|
160
|
-
|
161
|
-
### Fixed
|
162
|
-
|
163
|
-
- Include the missing `close_ballot_box` method from the 0.4.0 release.
|
164
|
-
- Fixes for the client methods
|
165
|
-
|
166
|
-
## [0.5.0] - 2020-12-19
|
167
|
-
|
168
|
-
### Changed
|
169
|
-
|
170
|
-
- Renamed `setup_election` to `create_election` and moved `election_id` from the `election_data` to a separate argument.
|
171
|
-
|
172
|
-
### Fixed
|
173
|
-
|
174
|
-
- Include the missing `open_ballot_box` methods from the 0.4.0 release.
|
175
|
-
- Added missing namespace on the seed task
|
176
|
-
|
177
|
-
## [0.4.0] - 2020-12-18
|
178
|
-
|
179
|
-
### Added
|
180
|
-
|
181
|
-
- `content_hash` field for the `LogEntry` records with the hash of the `content` field, if included in the message.
|
182
|
-
- `Command` base class for all the classes representing GraphQL queries or mutations sent to the Bulletin Board.
|
183
|
-
- `open_ballot_box` and `close_ballot_box` methods to the `Decidim::BulletinBoard::Client`.
|
184
|
-
|
185
|
-
### Changed
|
186
|
-
|
187
|
-
- New format for the messages: `iat`, `message_id` and Bulletin Board fields in the root message, and `content` for the Voting Scheme messages.
|
188
|
-
- Improved consistency between methods included by `Decidim::BulletinBoard::Client`.
|
189
|
-
|
190
|
-
## [0.3.1] - 2020-12-10
|
191
|
-
|
192
|
-
### Fixed
|
193
|
-
|
194
|
-
- Uses the correct private key in the `sign_data` method.
|
195
|
-
|
196
|
-
## [0.3.0] - 2020-12-10
|
197
|
-
|
198
|
-
### Added
|
199
|
-
|
200
|
-
- `Decidim::BulletinBoard::Authority` namespace that includes commands and forms to get the status of an election.
|
201
|
-
|
202
|
-
### Changed
|
203
|
-
|
204
|
-
- `Decidim::BulletinBoard::Client` now includes a `get_status` method to get the election status using the `Authority` namespace.
|
205
|
-
|
206
|
-
### Fixed
|
207
|
-
|
208
|
-
- `Decidim::BulletinBoard::Voter::CastVote` command uses the `encrypted_vote` as a `String` and not as a `Hash`.
|
209
|
-
|
210
|
-
## [0.2.0] - 2020-12-08
|
211
|
-
|
212
|
-
### Added
|
213
|
-
|
214
|
-
- `Decidim::BulletinBoard::Voter` namespace that includes commands and forms to perform the cast vote action.
|
215
|
-
|
216
|
-
### Changed
|
217
|
-
|
218
|
-
- `Decidim::BulletinBoard::Client` now includes a `cast_vote` method to cast a vote using the `Voter` namespace.
|
219
|
-
|
220
|
-
## [0.1.0] - 2020-12-07
|
221
|
-
|
222
|
-
### Added
|
223
|
-
|
224
|
-
- `Decidim::BulletinBoard::Client` class totally configurable using `ActiveSupport::Configurable`
|
225
|
-
- The client now includes a `setup_election` method that creates the election in the bulletin board.
|
226
|
-
|
227
|
-
[unreleased]: https://github.com/decidim/decidim-bulletin-board/compare/v0.3.0...HEAD
|
228
|
-
[0.3.0]: https://github.com/decidim/decidim-bulletin-board/compare/v0.2.0...v0.3.0
|
229
|
-
[0.2.0]: https://github.com/decidim/decidim-bulletin-board/compare/v0.1.0...v0.2.0
|
230
|
-
[0.1.0]: https://github.com/decidim/decidim-bulletin-board/releases/tag/v0.1.0
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at david@codegram.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: https://contributor-covenant.org
|
74
|
-
[version]: https://contributor-covenant.org/version/1/4/
|
data/bin/release
DELETED