decidim-bulletin_board 0.14.0 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -2
- data/Gemfile +2 -2
- data/Gemfile.lock +6 -6
- data/decidim-bulletin_board.gemspec +1 -1
- data/lib/decidim/bulletin_board.rb +1 -0
- data/lib/decidim/bulletin_board/authority/create_election.rb +7 -7
- data/lib/decidim/bulletin_board/authority/publish_results.rb +2 -2
- data/lib/decidim/bulletin_board/client.rb +1 -1
- data/lib/decidim/bulletin_board/file_client.rb +14 -0
- data/lib/decidim/bulletin_board/graphql/bb_schema.json +34 -6
- 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/version.rb +1 -1
- metadata +5 -7
- data/CHANGELOG.md +0 -242
- data/CODE_OF_CONDUCT.md +0 -74
- data/app/assets/javascripts/decidim/bulletin_board/decidim-bulletin_board.js +0 -293
- data/bin/release +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07057d8bf5262dbf5929110c87e970abc2d0de0eeaec11174220b83a85f7eb6e
|
4
|
+
data.tar.gz: d721f9561b10f02e7c2291a473a3ff592d6eae6e7767f5032e7c1fcb13e9c570
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0faec0781d970b589bb18e0f47f82cbeb9212c6c5c3ffd3b1c28768e71ff0385f4490aae97567299f65dbb326efcb3d57c8926a3efc73953fd6073b35612c523
|
7
|
+
data.tar.gz: d3fdd20acb00f422c1382bf6a081f611c0bc8eac1a5c5e1507b8468b44f7e0de7f2c2c187a10ba16f6214eb7a070f87daf467eec01bce86c58b8ce1b85e1958a
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
decidim-bulletin_board (0.
|
4
|
+
decidim-bulletin_board (0.15.1)
|
5
5
|
byebug (~> 11.0)
|
6
6
|
graphlient (~> 0.4.0)
|
7
7
|
jwt (~> 2.2.2)
|
@@ -96,7 +96,7 @@ GEM
|
|
96
96
|
faraday (>= 1.0)
|
97
97
|
faraday_middleware
|
98
98
|
graphql-client
|
99
|
-
graphql (1.12.
|
99
|
+
graphql (1.12.6)
|
100
100
|
graphql-client (0.16.0)
|
101
101
|
activesupport (>= 3.0)
|
102
102
|
graphql (~> 1.8)
|
@@ -117,8 +117,8 @@ GEM
|
|
117
117
|
mini_portile2 (2.5.0)
|
118
118
|
minitest (5.14.4)
|
119
119
|
multipart-post (2.1.1)
|
120
|
-
nio4r (2.5.
|
121
|
-
nokogiri (1.11.
|
120
|
+
nio4r (2.5.7)
|
121
|
+
nokogiri (1.11.2)
|
122
122
|
mini_portile2 (~> 2.5.0)
|
123
123
|
racc (~> 1.4)
|
124
124
|
parallel (1.20.1)
|
@@ -223,8 +223,8 @@ DEPENDENCIES
|
|
223
223
|
rake (~> 13.0)
|
224
224
|
rspec (~> 3.7)
|
225
225
|
rubocop (~> 0.92.0)
|
226
|
-
rubocop-faker
|
227
|
-
rubocop-rspec (~> 1.
|
226
|
+
rubocop-faker (~> 1.1.0)
|
227
|
+
rubocop-rspec (~> 1.44.1)
|
228
228
|
webmock (~> 3.6)
|
229
229
|
wisper-rspec (~> 1.1.0)
|
230
230
|
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
|
11
11
|
s.summary = ""
|
12
12
|
s.description = ""
|
13
|
-
s.homepage = "https://github.com"
|
13
|
+
s.homepage = "https://github.com/decidim/decidim-bulletin-board"
|
14
14
|
s.license = "AGPL-3.0"
|
15
15
|
s.required_ruby_version = Gem::Requirement.new(">= 2.6.6")
|
16
16
|
|
@@ -8,6 +8,7 @@ require "graphlient"
|
|
8
8
|
require "wisper"
|
9
9
|
|
10
10
|
require "decidim/bulletin_board/client"
|
11
|
+
require "decidim/bulletin_board/file_client"
|
11
12
|
require "decidim/bulletin_board/engine"
|
12
13
|
require "decidim/bulletin_board/jwk_utils"
|
13
14
|
require "decidim/bulletin_board/message_identifier"
|
@@ -69,16 +69,16 @@ module Decidim
|
|
69
69
|
|
70
70
|
def bulletin_board
|
71
71
|
{
|
72
|
-
|
73
|
-
|
72
|
+
slug: "bulletin-board",
|
73
|
+
name: "Bulletin Board",
|
74
74
|
public_key: settings.bulletin_board_public_key
|
75
75
|
}
|
76
76
|
end
|
77
77
|
|
78
78
|
def authority
|
79
79
|
{
|
80
|
-
|
81
|
-
|
80
|
+
slug: settings.authority_slug,
|
81
|
+
name: settings.authority_name,
|
82
82
|
public_key: settings.authority_public_key
|
83
83
|
}
|
84
84
|
end
|
@@ -86,8 +86,8 @@ module Decidim
|
|
86
86
|
def trustees
|
87
87
|
election_data[:trustees].map do |trustee|
|
88
88
|
{
|
89
|
-
|
90
|
-
|
89
|
+
slug: trustee[:name].parameterize,
|
90
|
+
name: trustee[:name],
|
91
91
|
public_key: trustee[:public_key]
|
92
92
|
}
|
93
93
|
end
|
@@ -101,7 +101,7 @@ module Decidim
|
|
101
101
|
sequence_order: index,
|
102
102
|
vote_variation: question[:max_selections] == 1 ? "one_of_m" : "n_of_m",
|
103
103
|
name: default_text(question[:title]),
|
104
|
-
number_elected: question[:
|
104
|
+
number_elected: question[:max_selections],
|
105
105
|
ballot_title: text(question[:title]),
|
106
106
|
ballot_subtitle: text(question[:description]),
|
107
107
|
ballot_selections: contest_answers(question)
|
@@ -33,7 +33,7 @@ module Decidim
|
|
33
33
|
response = graphql.query do
|
34
34
|
mutation do
|
35
35
|
publishResults(messageId: args[:message_id], signedData: args[:signed_data]) do
|
36
|
-
|
36
|
+
pendingMessage do
|
37
37
|
status
|
38
38
|
end
|
39
39
|
error
|
@@ -43,7 +43,7 @@ module Decidim
|
|
43
43
|
|
44
44
|
return broadcast(:error, response.data.publish_results.error) if response.data.publish_results.error.present?
|
45
45
|
|
46
|
-
broadcast(:ok, response.data.publish_results.
|
46
|
+
broadcast(:ok, response.data.publish_results.pending_message)
|
47
47
|
rescue Graphlient::Errors::ServerError
|
48
48
|
broadcast(:error, "Sorry, something went wrong")
|
49
49
|
end
|
@@ -101,7 +101,7 @@ module Decidim
|
|
101
101
|
def publish_results(election_id)
|
102
102
|
publish_results = configure Authority::PublishResults.new(election_id)
|
103
103
|
yield publish_results.message_id if block_given?
|
104
|
-
publish_results.on(:ok) { |
|
104
|
+
publish_results.on(:ok) { |pending_message| return pending_message }
|
105
105
|
publish_results.on(:error) { |error_message| raise StandardError, error_message }
|
106
106
|
publish_results.call
|
107
107
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module BulletinBoard
|
5
|
+
# Client to store GraphQL requests to a CSV file instead of sending them to the BulletinBoard
|
6
|
+
# It is intended to be used for load testing
|
7
|
+
class FileClient < Decidim::BulletinBoard::Client
|
8
|
+
def initialize(file_path, config = Decidim::BulletinBoard)
|
9
|
+
@settings = Settings.new(config)
|
10
|
+
@graphql = Graphql::Factory.client_for_file(settings, file_path)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -310,6 +310,34 @@
|
|
310
310
|
},
|
311
311
|
"isDeprecated": false,
|
312
312
|
"deprecationReason": null
|
313
|
+
},
|
314
|
+
{
|
315
|
+
"name": "verifiableResultsHash",
|
316
|
+
"description": null,
|
317
|
+
"args": [
|
318
|
+
|
319
|
+
],
|
320
|
+
"type": {
|
321
|
+
"kind": "SCALAR",
|
322
|
+
"name": "String",
|
323
|
+
"ofType": null
|
324
|
+
},
|
325
|
+
"isDeprecated": false,
|
326
|
+
"deprecationReason": null
|
327
|
+
},
|
328
|
+
{
|
329
|
+
"name": "verifiableResultsUrl",
|
330
|
+
"description": null,
|
331
|
+
"args": [
|
332
|
+
|
333
|
+
],
|
334
|
+
"type": {
|
335
|
+
"kind": "SCALAR",
|
336
|
+
"name": "String",
|
337
|
+
"ofType": null
|
338
|
+
},
|
339
|
+
"isDeprecated": false,
|
340
|
+
"deprecationReason": null
|
313
341
|
}
|
314
342
|
],
|
315
343
|
"inputFields": null,
|
@@ -1228,28 +1256,28 @@
|
|
1228
1256
|
"description": "Autogenerated return type of PublishResultsMutation",
|
1229
1257
|
"fields": [
|
1230
1258
|
{
|
1231
|
-
"name": "
|
1259
|
+
"name": "error",
|
1232
1260
|
"description": null,
|
1233
1261
|
"args": [
|
1234
1262
|
|
1235
1263
|
],
|
1236
1264
|
"type": {
|
1237
|
-
"kind": "
|
1238
|
-
"name": "
|
1265
|
+
"kind": "SCALAR",
|
1266
|
+
"name": "String",
|
1239
1267
|
"ofType": null
|
1240
1268
|
},
|
1241
1269
|
"isDeprecated": false,
|
1242
1270
|
"deprecationReason": null
|
1243
1271
|
},
|
1244
1272
|
{
|
1245
|
-
"name": "
|
1273
|
+
"name": "pendingMessage",
|
1246
1274
|
"description": null,
|
1247
1275
|
"args": [
|
1248
1276
|
|
1249
1277
|
],
|
1250
1278
|
"type": {
|
1251
|
-
"kind": "
|
1252
|
-
"name": "
|
1279
|
+
"kind": "OBJECT",
|
1280
|
+
"name": "PendingMessage",
|
1253
1281
|
"ofType": null
|
1254
1282
|
},
|
1255
1283
|
"isDeprecated": false,
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "decidim/bulletin_board/graphql/file_adapter"
|
4
|
+
|
3
5
|
module Decidim
|
4
6
|
module BulletinBoard
|
5
7
|
module Graphql
|
@@ -12,6 +14,15 @@ module Decidim
|
|
12
14
|
"Authorization" => settings.authority_api_key
|
13
15
|
})
|
14
16
|
end
|
17
|
+
|
18
|
+
def self.client_for_file(settings, file_path)
|
19
|
+
Graphlient::Client.new(file_path,
|
20
|
+
schema_path: File.join(__dir__, "bb_schema.json"),
|
21
|
+
http: FileAdapter,
|
22
|
+
headers: {
|
23
|
+
"Authorization" => settings.authority_api_key
|
24
|
+
})
|
25
|
+
end
|
15
26
|
end
|
16
27
|
end
|
17
28
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "csv"
|
4
|
+
|
5
|
+
module Decidim
|
6
|
+
module BulletinBoard
|
7
|
+
module Graphql
|
8
|
+
class FileAdapter
|
9
|
+
attr_reader :file_name
|
10
|
+
|
11
|
+
def initialize(file_name, _options = {}, &_block)
|
12
|
+
@file_name = file_name
|
13
|
+
end
|
14
|
+
|
15
|
+
def execute(document:, operation_name: nil, variables: {}, context: {})
|
16
|
+
body = {}
|
17
|
+
body["query"] = document.to_query_string
|
18
|
+
body["variables"] = variables if variables.any?
|
19
|
+
body["operationName"] = operation_name if operation_name
|
20
|
+
|
21
|
+
CSV.open(file_name, "a+", col_sep: ";") do |csv|
|
22
|
+
csv << [JSON.generate(body), context[:headers]["Authorization"]]
|
23
|
+
end
|
24
|
+
|
25
|
+
{ "data" => { "vote" => {} } }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -60,6 +60,10 @@ module Decidim
|
|
60
60
|
@message_id
|
61
61
|
end
|
62
62
|
|
63
|
+
def unique_trustee_id(authority_slug, trustee_name)
|
64
|
+
"#{authority_slug}.#{trustee_name}"
|
65
|
+
end
|
66
|
+
|
63
67
|
class << self
|
64
68
|
def format(unique_election_id, type_subtype, author_type, author_id)
|
65
69
|
"#{unique_election_id}.#{type_subtype}+#{INVERTED_AUTHOR_TYPE[author_type]}.#{author_id}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-bulletin_board
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Morcillo
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-
|
14
|
+
date: 2021-03-19 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -154,16 +154,12 @@ files:
|
|
154
154
|
- ".rubocop.yml"
|
155
155
|
- ".ruby-version"
|
156
156
|
- ".travis.yml"
|
157
|
-
- CHANGELOG.md
|
158
|
-
- CODE_OF_CONDUCT.md
|
159
157
|
- Gemfile
|
160
158
|
- Gemfile.lock
|
161
159
|
- README.md
|
162
160
|
- Rakefile
|
163
161
|
- app/assets/config/manifest.js
|
164
|
-
- app/assets/javascripts/decidim/bulletin_board/decidim-bulletin_board.js
|
165
162
|
- bin/console
|
166
|
-
- bin/release
|
167
163
|
- bin/setup
|
168
164
|
- decidim-bulletin_board.gemspec
|
169
165
|
- lib/decidim/bulletin_board.rb
|
@@ -178,15 +174,17 @@ files:
|
|
178
174
|
- lib/decidim/bulletin_board/client.rb
|
179
175
|
- lib/decidim/bulletin_board/command.rb
|
180
176
|
- lib/decidim/bulletin_board/engine.rb
|
177
|
+
- lib/decidim/bulletin_board/file_client.rb
|
181
178
|
- lib/decidim/bulletin_board/graphql/bb_schema.json
|
182
179
|
- lib/decidim/bulletin_board/graphql/factory.rb
|
180
|
+
- lib/decidim/bulletin_board/graphql/file_adapter.rb
|
183
181
|
- lib/decidim/bulletin_board/jwk_utils.rb
|
184
182
|
- lib/decidim/bulletin_board/message_identifier.rb
|
185
183
|
- lib/decidim/bulletin_board/settings.rb
|
186
184
|
- lib/decidim/bulletin_board/version.rb
|
187
185
|
- lib/decidim/bulletin_board/voter/cast_vote.rb
|
188
186
|
- lib/decidim/bulletin_board/voter/get_pending_message_status.rb
|
189
|
-
homepage: https://github.com
|
187
|
+
homepage: https://github.com/decidim/decidim-bulletin-board
|
190
188
|
licenses:
|
191
189
|
- AGPL-3.0
|
192
190
|
metadata: {}
|
data/CHANGELOG.md
DELETED
@@ -1,242 +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.14.0] - 2021-02-25
|
11
|
-
|
12
|
-
### Changed
|
13
|
-
|
14
|
-
- The `onSetup` event is no longer supported when adding the key ceremony, tally and voter components.
|
15
|
-
|
16
|
-
## [0.13.1] - 2021-02-25
|
17
|
-
|
18
|
-
### Changed
|
19
|
-
|
20
|
-
- The `create_election` method doesn't need the `weight` field for questions and answers anymore. It will use the given order to create the `sequence_order` value.
|
21
|
-
|
22
|
-
## [0.13.0] - 2021-02-23
|
23
|
-
|
24
|
-
## [0.12.1] - 2021-02-22
|
25
|
-
|
26
|
-
### Changed
|
27
|
-
|
28
|
-
- The `VoteComponent` event names have been changed to more suitable ones.
|
29
|
-
|
30
|
-
## [0.12.0] - 2021-02-19
|
31
|
-
|
32
|
-
### Added
|
33
|
-
|
34
|
-
- The `Voter` returns the ballot hash after encrpyting the plain vote and before auditing or casting it
|
35
|
-
|
36
|
-
### Changed
|
37
|
-
|
38
|
-
- The `create_election` command now expects objects representing the parts public keys.
|
39
|
-
|
40
|
-
## [0.11.0] - 2021-02-18
|
41
|
-
|
42
|
-
### Changed
|
43
|
-
|
44
|
-
- Changed the name of some settings\* to improve the readability of the code:
|
45
|
-
- BB settings: `bulletin_board_server`\* and `bulletin_board_public_key`\*.
|
46
|
-
- Authority settings: `authority_api_key`\*, `authority_name` and `authority_private_key`\*.
|
47
|
-
- Elections settings: `scheme_name`, `number_of_trustees` and `quorum`.
|
48
|
-
- `KeyCeremonyComponent` and `TallyComponent` now accepts a `trusteeWrapperAdapter` object.
|
49
|
-
- The `processMessage` method from the `TrusteeWrapperAdapter` now accepts a `messageType` instead of a `messageIdentifier`.
|
50
|
-
|
51
|
-
### Removed
|
52
|
-
|
53
|
-
- The `TrusteeWrapper` for the "dummy" voting scheme has been removed from the project.
|
54
|
-
|
55
|
-
### Added
|
56
|
-
|
57
|
-
- The `TrusteeWrapperAdapter` abstract class can be used to implement any voting scheme wrapper adapter.
|
58
|
-
|
59
|
-
## [0.10.1] - 2021-02-15
|
60
|
-
|
61
|
-
### Fixed
|
62
|
-
|
63
|
-
- The `TallyComponent` now uses the `key_ceremony` messages as well.
|
64
|
-
|
65
|
-
## [0.10.0] - 2021-02-12
|
66
|
-
|
67
|
-
## Added
|
68
|
-
|
69
|
-
- A command to get decoded election results.
|
70
|
-
- The (Bulletin Board) server public key is now included in the gem configuration.
|
71
|
-
- The option to `audit` a vote.
|
72
|
-
|
73
|
-
## Changed
|
74
|
-
|
75
|
-
- The `get_election_log_entries_by_type` command got renamed to `get_election_results`.
|
76
|
-
- 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`.
|
77
|
-
- The `scheme` setting was replaced by the `scheme_name` and `quorum` settings.
|
78
|
-
|
79
|
-
## [0.9.2] - 2021-02-02
|
80
|
-
|
81
|
-
## [0.9.1] - 2021-02-02
|
82
|
-
|
83
|
-
## Added
|
84
|
-
|
85
|
-
- The `VoteComponent` has been added. It will be used as a glue code between the vote and the UI.
|
86
|
-
- The ruby client now includes the `get_election_log_entries_by_types` method to get the election log entries filtered by type.
|
87
|
-
|
88
|
-
## [0.9.0] - 2021-02-01
|
89
|
-
|
90
|
-
## Changed
|
91
|
-
|
92
|
-
- The `open_ballot_box` and `close_ballot_box` are now called `start_vote` and `end_vote` and return a pending message.
|
93
|
-
- All the client operations yield the `message_id` before sending the request to the Bulletin Board.
|
94
|
-
|
95
|
-
## Added
|
96
|
-
|
97
|
-
- `start_key_ceremony` method to the `Decidim::BulletinBoard::Client`.
|
98
|
-
- The `IdentificationKeys` class has been added to the JS library.
|
99
|
-
- The `TallyComponent` has been added. It will be used as a glue code between the tally and the UI.
|
100
|
-
|
101
|
-
## [0.8.2] - 2021-01-28
|
102
|
-
|
103
|
-
## Changed
|
104
|
-
|
105
|
-
- `encrypt` in `VoterWrapperDummy` has a TimeOut of 500ms.
|
106
|
-
|
107
|
-
## [0.8.0] - 2021-01-27
|
108
|
-
|
109
|
-
## Changed
|
110
|
-
|
111
|
-
- `getPendingMessage` can get queried by `messageId` and by `id`.
|
112
|
-
- `get_status` renamed to `get_election_status` in the `Decidim::BulletinBoard::Client`.
|
113
|
-
|
114
|
-
## Added
|
115
|
-
|
116
|
-
- `getPendingMessageStatus` method to the `Decidim::BulletinBoard::Client`.
|
117
|
-
- `waitForPendingMessageToBeProcessed` method to the Voter class.
|
118
|
-
- The `KeyCeremonyComponent` has been added. It will be used as a glue code between the key ceremony process and the UI.
|
119
|
-
|
120
|
-
## [0.7.0] - 2021-01-26
|
121
|
-
|
122
|
-
## Changed
|
123
|
-
|
124
|
-
- The `Trustee` class now uses the `Election` class to interact with the log entries.
|
125
|
-
- The `Trustee` class handles everything now when performing both the key ceremony and the tally process.
|
126
|
-
- The `Trustee` class now includes a `setupKeyCeremony` generator function that must be called before starting the key ceremony process.
|
127
|
-
- `checkRestoreNeeded` method has been renamed to `needsToBeRestored` for both the `Trustee` and the `TrusteeWrapper`.
|
128
|
-
|
129
|
-
## Added
|
130
|
-
|
131
|
-
- `start_tally` method to the `Decidim::BulletinBoard::Client`.
|
132
|
-
- `publish_results` method to the `Decidim::BulletinBoard::Client`.
|
133
|
-
- `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.
|
134
|
-
- 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.
|
135
|
-
- The `EventManager` class now handles the `events` stream and exports some useful constants.
|
136
|
-
|
137
|
-
## Removed
|
138
|
-
|
139
|
-
- The `KeyCeremony` class has been removed.
|
140
|
-
- The `Trustee` backup method has been removed because it doesn't belong to the public API anymore.
|
141
|
-
|
142
|
-
## [0.6.1] - 2021-01-12
|
143
|
-
|
144
|
-
### Changed
|
145
|
-
|
146
|
-
- Production file now is called `decidim-bulletin_board.js` and development file is called `decidim-bulletin_board.dev.js`.
|
147
|
-
|
148
|
-
### Removed
|
149
|
-
|
150
|
-
- The GraphQL client doesn't use subscriptions anymore.
|
151
|
-
|
152
|
-
## [0.6.0] - 2021-01-12
|
153
|
-
|
154
|
-
### Changed
|
155
|
-
|
156
|
-
- Updated the app schema definition with the partial log entries list retrieval
|
157
|
-
- Gem is an engine, the js assets can be imported in Decidim.
|
158
|
-
|
159
|
-
## [0.5.3] - 2020-12-20
|
160
|
-
|
161
|
-
### Fixed
|
162
|
-
|
163
|
-
- Fix the schema definition folder when used inside an app
|
164
|
-
|
165
|
-
## [0.5.2] - 2020-12-20
|
166
|
-
|
167
|
-
### Fixed
|
168
|
-
|
169
|
-
- Include the schema definition within the gem to avoid extra trips to the server
|
170
|
-
|
171
|
-
## [0.5.1] - 2020-12-19
|
172
|
-
|
173
|
-
### Fixed
|
174
|
-
|
175
|
-
- Include the missing `close_ballot_box` method from the 0.4.0 release.
|
176
|
-
- Fixes for the client methods
|
177
|
-
|
178
|
-
## [0.5.0] - 2020-12-19
|
179
|
-
|
180
|
-
### Changed
|
181
|
-
|
182
|
-
- Renamed `setup_election` to `create_election` and moved `election_id` from the `election_data` to a separate argument.
|
183
|
-
|
184
|
-
### Fixed
|
185
|
-
|
186
|
-
- Include the missing `open_ballot_box` methods from the 0.4.0 release.
|
187
|
-
- Added missing namespace on the seed task
|
188
|
-
|
189
|
-
## [0.4.0] - 2020-12-18
|
190
|
-
|
191
|
-
### Added
|
192
|
-
|
193
|
-
- `content_hash` field for the `LogEntry` records with the hash of the `content` field, if included in the message.
|
194
|
-
- `Command` base class for all the classes representing GraphQL queries or mutations sent to the Bulletin Board.
|
195
|
-
- `open_ballot_box` and `close_ballot_box` methods to the `Decidim::BulletinBoard::Client`.
|
196
|
-
|
197
|
-
### Changed
|
198
|
-
|
199
|
-
- New format for the messages: `iat`, `message_id` and Bulletin Board fields in the root message, and `content` for the Voting Scheme messages.
|
200
|
-
- Improved consistency between methods included by `Decidim::BulletinBoard::Client`.
|
201
|
-
|
202
|
-
## [0.3.1] - 2020-12-10
|
203
|
-
|
204
|
-
### Fixed
|
205
|
-
|
206
|
-
- Uses the correct private key in the `sign_data` method.
|
207
|
-
|
208
|
-
## [0.3.0] - 2020-12-10
|
209
|
-
|
210
|
-
### Added
|
211
|
-
|
212
|
-
- `Decidim::BulletinBoard::Authority` namespace that includes commands and forms to get the status of an election.
|
213
|
-
|
214
|
-
### Changed
|
215
|
-
|
216
|
-
- `Decidim::BulletinBoard::Client` now includes a `get_status` method to get the election status using the `Authority` namespace.
|
217
|
-
|
218
|
-
### Fixed
|
219
|
-
|
220
|
-
- `Decidim::BulletinBoard::Voter::CastVote` command uses the `encrypted_vote` as a `String` and not as a `Hash`.
|
221
|
-
|
222
|
-
## [0.2.0] - 2020-12-08
|
223
|
-
|
224
|
-
### Added
|
225
|
-
|
226
|
-
- `Decidim::BulletinBoard::Voter` namespace that includes commands and forms to perform the cast vote action.
|
227
|
-
|
228
|
-
### Changed
|
229
|
-
|
230
|
-
- `Decidim::BulletinBoard::Client` now includes a `cast_vote` method to cast a vote using the `Voter` namespace.
|
231
|
-
|
232
|
-
## [0.1.0] - 2020-12-07
|
233
|
-
|
234
|
-
### Added
|
235
|
-
|
236
|
-
- `Decidim::BulletinBoard::Client` class totally configurable using `ActiveSupport::Configurable`
|
237
|
-
- The client now includes a `setup_election` method that creates the election in the bulletin board.
|
238
|
-
|
239
|
-
[unreleased]: https://github.com/decidim/decidim-bulletin-board/compare/v0.3.0...HEAD
|
240
|
-
[0.3.0]: https://github.com/decidim/decidim-bulletin-board/compare/v0.2.0...v0.3.0
|
241
|
-
[0.2.0]: https://github.com/decidim/decidim-bulletin-board/compare/v0.1.0...v0.2.0
|
242
|
-
[0.1.0]: https://github.com/decidim/decidim-bulletin-board/releases/tag/v0.1.0
|