Skip to content

Commit

Permalink
Use objects to represent JWKs everywhere (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
leio10 authored Feb 19, 2021
1 parent 8c24add commit da05b92
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion decidim-bulletin_board-app/app/commands/create_election.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def find_or_create_trustee(trustee)
Trustee.create!(
name: trustee[:pretty_name],
unique_id: trustee[:name],
public_key: JSON.parse(trustee[:public_key])
public_key: trustee[:public_key]
)
end

Expand Down
6 changes: 3 additions & 3 deletions decidim-bulletin_board-app/spec/factories/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def fix_reserved_names(attributes)
factory :json_bulletin_board do
name { "bulletin-board" }
pretty_name { "Bulletin Board" }
public_key { BulletinBoard.public_key.to_json }
public_key { BulletinBoard.public_key }
end

factory :json_authority do
Expand All @@ -77,7 +77,7 @@ def fix_reserved_names(attributes)

name { authority.unique_id }
pretty_name { authority.name }
public_key { authority.public_key.to_json }
public_key { authority.public_key }
end

factory :json_trustee do
Expand All @@ -88,7 +88,7 @@ def fix_reserved_names(attributes)

name { pretty_name.parameterize }
pretty_name { trustee.name }
public_key { private_key.export.to_json }
public_key { private_key.export }
end

factory :description do
Expand Down
8 changes: 6 additions & 2 deletions decidim-bulletin_board-ruby/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## Added
### Added

- The `Voter` returns the ballot hash after encrpyting the plain vote and before auditing or casting it

### Changed

- The `create_election` command now expects objects representing the parts public keys.

## [0.11.0] - 2021-02-18

## Changed
### Changed

- Changed the name of some settings\* to improve the readability of the code:
- BB settings: `bulletin_board_server`\* and `bulletin_board_public_key`\*.
Expand Down

0 comments on commit da05b92

Please sign in to comment.