decidim-bulletin_board 0.20.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47cb4e09b0a3e66e871638f5a6e370dc724279fb27a69eeaf3c5d0d61a39485c
4
- data.tar.gz: 79022bae7d00055f5f17f4e5a25322c918769ec119ac2a420ec33438c7d70b49
3
+ metadata.gz: '03922663d9b5541ee3f5e27ac57825b7306c4b4d876068d607ab6774ff61acdb'
4
+ data.tar.gz: d3c3569be3291c7ebbbe4b42aa8727ff172c486eb13ced87649ad6c93a18691f
5
5
  SHA512:
6
- metadata.gz: edf4d6cea3f99877ab35a0ca366fae2ec481b21149e8bf9496ee5ffe2e8f274dfcb518911bae57c3cb4c3a40fc273bdfcd52b8a1ef3b255bc0a4e37e5ae5b049
7
- data.tar.gz: e258ae5682c1c71288dad93069f41a4303a1a5988a1c37f2daa6ea222f7ee41c402a3e1e80ccd1c08296ab34d7156a5edf76162ddcdfcc3f55074157563190f0
6
+ metadata.gz: 25066d09cf994dc43f03f1100d7eedd54c5c386aeb7e58210ffe8219bf3ef363f20ff42e209867381cb8a823bee50eb9c2aa888e9d6a31a2d6e01a0bb2b3add5
7
+ data.tar.gz: f46fd917b4c8673414850410f05a04f997964ee005e30a384925d73a8374aa393b1cc2942ea4bfb67c59a7c85f6208ff7f1a490f8018b919cca3863726e710a1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- decidim-bulletin_board (0.20.0)
4
+ decidim-bulletin_board (0.21.0)
5
5
  byebug (~> 11.0)
6
6
  graphlient (~> 0.4.0)
7
7
  jwt (~> 2.2.2)
@@ -33,22 +33,25 @@ module Decidim
33
33
  logEntries(types: args[:types]) do
34
34
  signedData
35
35
  end
36
+ verifiableResultsUrl
37
+ verifiableResultsHash
36
38
  end
37
39
  end
38
40
  end
39
41
 
40
42
  return broadcast(:error, "There aren't any log entries with type: 'end_tally' for this election.") if response.data.election.log_entries.empty?
41
43
 
42
- @signed_data = response.data.election.log_entries.first.signed_data
44
+ @election = response.data.election
45
+ @signed_data = election.log_entries.first.signed_data
43
46
 
44
- broadcast(:ok, decoded_data["results"])
47
+ broadcast(:ok, { election_results: decoded_data["results"], verifiable_results: verifiable_results })
45
48
  rescue Graphlient::Errors::ServerError
46
49
  broadcast(:error, "Sorry, something went wrong")
47
50
  end
48
51
 
49
52
  private
50
53
 
51
- attr_reader :election_id, :types, :signed_data
54
+ attr_reader :election_id, :types, :signed_data, :election
52
55
 
53
56
  def decoded_data
54
57
  @decoded_data ||= begin
@@ -57,6 +60,13 @@ module Decidim
57
60
  { error: e.message }
58
61
  end
59
62
  end
63
+
64
+ def verifiable_results
65
+ {
66
+ url: election.verifiable_results_url,
67
+ hash: election.verifiable_results_hash
68
+ }
69
+ end
60
70
  end
61
71
  end
62
72
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Decidim
4
4
  module BulletinBoard
5
- VERSION = "0.20.0"
5
+ VERSION = "0.21.0"
6
6
  end
7
7
  end
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.20.0
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Morcillo