decidim-sortitions 0.27.4 → 0.27.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/decidim/sortitions/widgets_controller.rb +11 -1
- data/app/permissions/decidim/sortitions/permissions.rb +14 -0
- data/config/locales/bg.yml +36 -0
- data/config/locales/ca.yml +1 -1
- data/config/locales/cs.yml +1 -1
- data/config/locales/de.yml +2 -2
- data/config/locales/es-MX.yml +1 -1
- data/config/locales/es-PY.yml +1 -1
- data/config/locales/eu.yml +6 -6
- data/config/locales/fi-plain.yml +1 -1
- data/config/locales/fi.yml +20 -20
- data/config/locales/he-IL.yml +1 -0
- data/config/locales/is-IS.yml +1 -3
- data/config/locales/it.yml +1 -1
- data/config/locales/nl.yml +2 -2
- data/config/locales/pl.yml +1 -0
- data/config/locales/pt-BR.yml +3 -1
- data/config/locales/sk.yml +1 -1
- data/config/locales/sq-AL.yml +1 -0
- data/config/locales/th-TH.yml +1 -0
- data/decidim-sortitions.gemspec +32 -0
- data/lib/decidim/sortitions/component.rb +1 -1
- data/lib/decidim/sortitions/test/factories.rb +16 -10
- data/lib/decidim/sortitions/version.rb +1 -1
- metadata +22 -18
- /data/{config/environment.rb → lib/tasks/decidim/.keep} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3f3f195e687563902d388e9cedbc8430378a6a072b5f998650d3068b76aec3e
|
4
|
+
data.tar.gz: 037313434d4200f71a148758e354b5253a4fb9b36b8d8992481c76926efa10b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86b6179b79eb8dc0d11c93d6b1ae2b9a1e35e522204acaf4963771a4dcb93fe6760e15c54d5c33cef5dbb16d85bb3d644c75341d68b4d37ea30630bdc9e2f673
|
7
|
+
data.tar.gz: '0902b6c5048f567ab5753be849b45f909df50ecc28fd7101683c6b81ab8b272911270d1b1f8626e929b7d37fb0f64b203f7c726f6fc7208d55f0762fa032b28f'
|
@@ -6,15 +6,25 @@ module Decidim
|
|
6
6
|
helper Decidim::SanitizeHelper
|
7
7
|
helper Sortitions::SortitionsHelper
|
8
8
|
|
9
|
+
def show
|
10
|
+
enforce_permission_to :embed, :sortition, sortition: model if model
|
11
|
+
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
9
15
|
private
|
10
16
|
|
11
17
|
def model
|
12
|
-
@model ||= Sortition.where(component:
|
18
|
+
@model ||= Sortition.where(component: current_component).find(params[:sortition_id])
|
13
19
|
end
|
14
20
|
|
15
21
|
def iframe_url
|
16
22
|
@iframe_url ||= sortition_widget_url(model)
|
17
23
|
end
|
24
|
+
|
25
|
+
def permission_class_chain
|
26
|
+
[Decidim::Sortitions::Permissions]
|
27
|
+
end
|
18
28
|
end
|
19
29
|
end
|
20
30
|
end
|
@@ -4,12 +4,26 @@ module Decidim
|
|
4
4
|
module Sortitions
|
5
5
|
class Permissions < Decidim::DefaultPermissions
|
6
6
|
def permissions
|
7
|
+
allow_embed_sortition?
|
7
8
|
return permission_action unless user
|
8
9
|
|
9
10
|
return Decidim::Sortitions::Admin::Permissions.new(user, permission_action, context).permissions if permission_action.scope == :admin
|
10
11
|
|
11
12
|
permission_action
|
12
13
|
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def sortition
|
18
|
+
@sortition ||= context.fetch(:sortition, nil) || context.fetch(:resource, nil)
|
19
|
+
end
|
20
|
+
|
21
|
+
# As this is a public action, we need to run this before other checks
|
22
|
+
def allow_embed_sortition?
|
23
|
+
return unless permission_action.action == :embed && permission_action.subject == :sortition && sortition
|
24
|
+
|
25
|
+
allow!
|
26
|
+
end
|
13
27
|
end
|
14
28
|
end
|
15
29
|
end
|
data/config/locales/bg.yml
CHANGED
@@ -6,3 +6,39 @@ bg:
|
|
6
6
|
additional_info: Сортиране на информация
|
7
7
|
decidim_category_id: Категории от набора от предложения, в които искате да приложите жребий
|
8
8
|
decidim_proposals_component_id: Предложенията са зададени
|
9
|
+
decidim:
|
10
|
+
sortitions:
|
11
|
+
admin:
|
12
|
+
sortitions:
|
13
|
+
create:
|
14
|
+
success: Жребият беше създаден успешно
|
15
|
+
destroy:
|
16
|
+
error: Жребият не може да се отмени.
|
17
|
+
success: Жребият беше отменен успешно
|
18
|
+
form:
|
19
|
+
title: Нов жребий за предложения
|
20
|
+
new:
|
21
|
+
confirm: Когато натиснете бутона „Напред“, системата ще запише датата и часа (с точност до секунди) и заедно с хвърлянето на зара тази информация ще се използва за генериране на избор на случаен принцип. Действието няма да може да бъде отменено — когато щракнете върху бутона, резултатът от жребия ще бъде публикуван заедно с въведените в този формуляр данни и няма да подлежи на промяна. Моля, прегледайте съдържанието внимателно
|
22
|
+
update:
|
23
|
+
success: Жребият беше актуализиран успешно
|
24
|
+
sortitions:
|
25
|
+
filters:
|
26
|
+
category_prompt: Изберете категория
|
27
|
+
search: Търсене
|
28
|
+
filters_small_view:
|
29
|
+
close_modal: Затвори прозореца
|
30
|
+
filter: Филтър
|
31
|
+
filter_by: Филтрирай по
|
32
|
+
unfold: Разгъване
|
33
|
+
results_count:
|
34
|
+
count:
|
35
|
+
one: избрано предложение
|
36
|
+
other: избрани предложения
|
37
|
+
show:
|
38
|
+
back: Назад към списъка
|
39
|
+
dice_result: "(1) Резултат от жребия"
|
40
|
+
mathematical_result: Резултат (1) x (2)
|
41
|
+
sortition_reproducibility_details: Подробности за възпроизвеждане на жребия
|
42
|
+
time_seed: "(2) Време за зареждане"
|
43
|
+
sortition:
|
44
|
+
view: Изглед
|
data/config/locales/ca.yml
CHANGED
@@ -31,7 +31,7 @@ ca:
|
|
31
31
|
sortitions:
|
32
32
|
sortition_created:
|
33
33
|
email_intro: El sorteig "%{resource_title}" s'ha afegit a "%{participatory_space_title}" que segueixes.
|
34
|
-
email_outro: Has rebut aquesta notificació perquè estàs seguint "%{participatory_space_title}". Pots deixar de seguir-lo des de l'enllaç anterior.
|
34
|
+
email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de seguir-lo des de l'enllaç anterior.
|
35
35
|
email_subject: Nou sorteig afegit a %{participatory_space_title}
|
36
36
|
notification_title: El sorteig <a href="%{resource_path}">%{resource_title}</a> s'ha afegit a %{participatory_space_title}
|
37
37
|
sortitions:
|
data/config/locales/cs.yml
CHANGED
@@ -135,7 +135,7 @@ cs:
|
|
135
135
|
candidate_proposals_info: 'Losování bylo provedeno mezi následujícími návrhy (%{category_label}), s následujícími ID (označené tučně vybrané návrhy) '
|
136
136
|
category: z kategorie %{category}
|
137
137
|
dice_result: "(1) Výsledek hodu kostkou"
|
138
|
-
introduction:
|
138
|
+
introduction: "Tato stránka obsahuje výsledky losování %{reference}. Prostřednictvím tohoto losování bylo vybráno %{target_items} výsledků náhodně a se stejným rozdělením pravděpodobnosti ze souboru návrhů zobrazených níže. \n\nSpolu s výsledky informace zobrazené na této stránce poskytují všechny informace potřebné pro maximalizaci záruk a reprodukci výsledků. Klíčem ke kvalitě tohoto losování je dvojitá náhodnost, kterou poskytuje hod kostkou (ověřený svědky) a přesný čas výběru, který poskytuje vstup pro algoritmus, který generuje náhodný výběr. \n\nČasový základ pro losování je tak přesný (na sekundy), že není možné ovládat lidi, a tak lze poskytnout dvojitý \"nekontrolovatelný\" vstup, který zaručí spravedlivý výsledek. "
|
139
139
|
mathematical_result: Výsledek (1) x (2)
|
140
140
|
proposals_selected_by_sortition: Návrhy vybrané losováním
|
141
141
|
sortition_reproducibility_details: Detaily reprodukovatelnosti losování
|
data/config/locales/de.yml
CHANGED
@@ -68,7 +68,7 @@ de:
|
|
68
68
|
error: Die Sortierung kann nicht abgebrochen werden.
|
69
69
|
success: Die Sortierung wurde erfolgreich abgebrochen
|
70
70
|
edit:
|
71
|
-
title:
|
71
|
+
title: Informationen zur Sortierung aktualisieren
|
72
72
|
update: Aktualisieren
|
73
73
|
form:
|
74
74
|
all_categories: Alle Kategorien
|
@@ -102,7 +102,7 @@ de:
|
|
102
102
|
category: Kategorie
|
103
103
|
category_prompt: Wählen Sie eine Kategorie
|
104
104
|
search: Suche
|
105
|
-
state:
|
105
|
+
state: Status
|
106
106
|
filters_small_view:
|
107
107
|
close_modal: Modal schließen
|
108
108
|
filter: Filter
|
data/config/locales/es-MX.yml
CHANGED
data/config/locales/es-PY.yml
CHANGED
data/config/locales/eu.yml
CHANGED
@@ -51,7 +51,7 @@ eu:
|
|
51
51
|
reference: Erreferentzia
|
52
52
|
request_timestamp: Zozketa-denbora
|
53
53
|
seed: Hazia
|
54
|
-
target_items:
|
54
|
+
target_items: Aukeratzeko itemak
|
55
55
|
title: Izenburua
|
56
56
|
name:
|
57
57
|
one: Zozketa
|
@@ -73,13 +73,13 @@ eu:
|
|
73
73
|
form:
|
74
74
|
all_categories: Kategoria guztiak
|
75
75
|
select_proposal_component: Aukeratu proposamenen multzoa
|
76
|
-
title: Proposamenen zozketa
|
76
|
+
title: Proposamenen beste zozketa bat
|
77
77
|
index:
|
78
78
|
title: Zozketak
|
79
79
|
new:
|
80
80
|
confirm: Botoia sakatzean plataformak egun eta ordua (segundu gutxi batzuk gora behera) eta dadoak botatzean ateratako zenbakia gorde egingo ditu ausazko hautaketa bat egiteko. Botoia sakatu ondoren ez dago atzera egiterik eta zozketaren emaitzak zein txantiloi honetan sartutako datuak argitaratu eta ezin izango dira aldatu. Beraz, mesedez, arretaz jarraitu
|
81
81
|
create: Sortu
|
82
|
-
title:
|
82
|
+
title: Beste zozketa bat
|
83
83
|
show:
|
84
84
|
selected_proposals: Aukeratutako proposamenak
|
85
85
|
update:
|
@@ -100,9 +100,9 @@ eu:
|
|
100
100
|
search: Bilatu
|
101
101
|
state: Egoera
|
102
102
|
filters_small_view:
|
103
|
-
close_modal:
|
104
|
-
filter:
|
105
|
-
filter_by:
|
103
|
+
close_modal: Itxi leihoa
|
104
|
+
filter: Iragazkia
|
105
|
+
filter_by: Iragazi honen arabera
|
106
106
|
unfold: Zabaldu
|
107
107
|
linked_sortitions:
|
108
108
|
selected_proposals: Aukeratutako proposamenak
|
data/config/locales/fi-plain.yml
CHANGED
data/config/locales/fi.yml
CHANGED
@@ -3,26 +3,26 @@ fi:
|
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
5
|
sortition:
|
6
|
-
additional_info:
|
7
|
-
decidim_category_id:
|
8
|
-
decidim_proposals_component_id:
|
6
|
+
additional_info: Satunnaisvalinnan tiedot
|
7
|
+
decidim_category_id: Ehdotusten aihepiirit, joiden perusteella haluat tehdä satunnaisvalinnan
|
8
|
+
decidim_proposals_component_id: Ehdotusten joukko
|
9
9
|
dice: Noppaheiton tulos. Heitä kuusisivuista noppaa tai etsi toinen tapa luoda satunnaisesti numero 1-6, ja kirjoita tähän tuloksena saatu luku muutamien todistajien edessä. Tämä auttaa takamaan tuloksen satunnaisuuden
|
10
|
-
target_items: Valittavien ehdotusten määrä (ilmoittaa niiden ehdotusten lukumäärän, jotka haluat valita arpomalla kustakin aiemmin valitsemastasi
|
10
|
+
target_items: Valittavien ehdotusten määrä (ilmoittaa niiden ehdotusten lukumäärän, jotka haluat valita arpomalla kustakin aiemmin valitsemastasi ehdotusjoukosta)
|
11
11
|
title: Otsikko
|
12
12
|
witnesses: Todistajat
|
13
13
|
models:
|
14
|
-
decidim/sortitions/create_sortition_event:
|
14
|
+
decidim/sortitions/create_sortition_event: Satunnaisvalinta
|
15
15
|
activerecord:
|
16
16
|
models:
|
17
17
|
decidim/sortitions/sortition:
|
18
|
-
one:
|
19
|
-
other:
|
18
|
+
one: Satunnaisvalinta
|
19
|
+
other: Satunnaisvalinnat
|
20
20
|
decidim:
|
21
21
|
components:
|
22
22
|
sortitions:
|
23
23
|
actions:
|
24
24
|
comment: Kommentoi
|
25
|
-
name:
|
25
|
+
name: Satunnaisvalinnat
|
26
26
|
settings:
|
27
27
|
global:
|
28
28
|
comments_enabled: Kommentointi sallittu
|
@@ -32,15 +32,15 @@ fi:
|
|
32
32
|
sortition_created:
|
33
33
|
email_intro: Satunnaisvalinta "%{resource_title}" on lisätty kohteeseen "%{participatory_space_title}" jota sinä seuraat.
|
34
34
|
email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta "%{participatory_space_title}". Voit lopettaa seuraamisen edellä esitetyn linkin kautta.
|
35
|
-
email_subject: Uusi
|
36
|
-
notification_title:
|
35
|
+
email_subject: Uusi satunnaisvalinta lisättiin kohteeseen %{participatory_space_title}
|
36
|
+
notification_title: Satunnaisvalinta <a href="%{resource_path}">%{resource_title}</a> on lisätty kohteeseen %{participatory_space_title}
|
37
37
|
sortitions:
|
38
38
|
admin:
|
39
39
|
actions:
|
40
|
-
destroy: Peruuta
|
40
|
+
destroy: Peruuta satunnaisvalinta
|
41
41
|
edit: Muokkaa
|
42
|
-
new: Uusi
|
43
|
-
show:
|
42
|
+
new: Uusi satunnaisvalinta
|
43
|
+
show: Satunnaisvalinnan tarkemmat tiedot
|
44
44
|
models:
|
45
45
|
sortition:
|
46
46
|
fields:
|
@@ -54,13 +54,13 @@ fi:
|
|
54
54
|
target_items: Valittavat kohteet
|
55
55
|
title: Otsikko
|
56
56
|
name:
|
57
|
-
one:
|
58
|
-
other:
|
57
|
+
one: Satunnaisvalinta
|
58
|
+
other: Satunnaisvalinnat
|
59
59
|
sortitions:
|
60
60
|
confirm_destroy:
|
61
|
-
confirm_destroy: Haluatko varmasti peruuttaa tämän
|
62
|
-
destroy: Peruuta
|
63
|
-
title:
|
61
|
+
confirm_destroy: Haluatko varmasti peruuttaa tämän satunnaisvalinnan?
|
62
|
+
destroy: Peruuta satunnaisvalinta
|
63
|
+
title: Satunnaisvalinnan peruuttaminen
|
64
64
|
create:
|
65
65
|
error: Uuden satunnaisvalinnan luonti epäonnistui.
|
66
66
|
success: Satunnaisvalinnan luonti onnistui
|
@@ -123,7 +123,7 @@ fi:
|
|
123
123
|
any_category: kaikista aihepiireistä
|
124
124
|
back: Takaisin listaan
|
125
125
|
cancelled: Peruttu satunnaisvalinta
|
126
|
-
candidate_proposal_ids:
|
126
|
+
candidate_proposal_ids: Satunnaisvalinnan ehdotusten järjestys ja tunnukset
|
127
127
|
candidate_proposals_info: 'Satunnaisvalinta tehtiin seuraavien ehdotusten (%{category_label}) välillä, seuraavilla tunnuksilla (lihavoituna valitut ehdotukset) '
|
128
128
|
category: aihepiiristä %{category}
|
129
129
|
dice_result: "(1) Noppatulos"
|
@@ -148,4 +148,4 @@ fi:
|
|
148
148
|
one: 1 satunnaisvalinta
|
149
149
|
other: "%{count} satunnaisvalintaa"
|
150
150
|
statistics:
|
151
|
-
sortitions_count:
|
151
|
+
sortitions_count: Satunnaisvalintaa
|
@@ -0,0 +1 @@
|
|
1
|
+
he:
|
data/config/locales/is-IS.yml
CHANGED
@@ -28,6 +28,7 @@ is:
|
|
28
28
|
actions:
|
29
29
|
destroy: Hætta við flokkunina
|
30
30
|
edit: Breyta
|
31
|
+
new: Ný flokkun
|
31
32
|
show: Uppsetningarupplýsingar
|
32
33
|
models:
|
33
34
|
sortition:
|
@@ -41,9 +42,6 @@ is:
|
|
41
42
|
seed: Fræ
|
42
43
|
target_items: Atriði til að velja
|
43
44
|
title: Titill
|
44
|
-
name:
|
45
|
-
one: Flokkun
|
46
|
-
other: Flokkanir
|
47
45
|
sortitions:
|
48
46
|
confirm_destroy:
|
49
47
|
confirm_destroy: Ertu viss um að þú viljir hætta við þessa flokkun?
|
data/config/locales/it.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/pl.yml
CHANGED
@@ -79,6 +79,7 @@ pl:
|
|
79
79
|
index:
|
80
80
|
title: Wybór losowy
|
81
81
|
new:
|
82
|
+
confirm: Naciśnięcie kolejnego przycisku sprawi, że platforma zapisze datę i godzinę (z dokładnością do sekund) wraz z wynikiem rzutu kostką. Informacje te zostaną wykorzystane do dokonania losowego wyboru. Nie można cofnąć tej operacji; po kliknięciu przycisku wynik losowania zostanie opublikowany wraz z danymi wpisanymi w formularzu i nie będzie można modyfikować jego treści; prosimy o uważne sprawdzenie jego treści
|
82
83
|
create: Utwórz
|
83
84
|
title: Nowy wybór losowy
|
84
85
|
show:
|
data/config/locales/pt-BR.yml
CHANGED
@@ -11,7 +11,7 @@ pt-BR:
|
|
11
11
|
title: Título
|
12
12
|
witnesses: Testemunhas
|
13
13
|
models:
|
14
|
-
decidim/sortitions/create_sortition_event:
|
14
|
+
decidim/sortitions/create_sortition_event: Classificação
|
15
15
|
activerecord:
|
16
16
|
models:
|
17
17
|
decidim/sortitions/sortition:
|
@@ -20,6 +20,8 @@ pt-BR:
|
|
20
20
|
decidim:
|
21
21
|
components:
|
22
22
|
sortitions:
|
23
|
+
actions:
|
24
|
+
comment: Comentário
|
23
25
|
name: Sorteios
|
24
26
|
settings:
|
25
27
|
global:
|
data/config/locales/sk.yml
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
sq:
|
@@ -0,0 +1 @@
|
|
1
|
+
th:
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
4
|
+
|
5
|
+
require "decidim/sortitions/version"
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.version = Decidim::Sortitions.version
|
9
|
+
s.authors = ["Juan Salvador Perez Garcia"]
|
10
|
+
s.email = ["jsperezg@gmail.com"]
|
11
|
+
s.license = "AGPL-3.0"
|
12
|
+
s.homepage = "https://github.com/decidim/decidim"
|
13
|
+
s.required_ruby_version = "~> 3.0.0"
|
14
|
+
|
15
|
+
s.name = "decidim-sortitions"
|
16
|
+
s.summary = "Decidim sortitions module"
|
17
|
+
s.description = "This module makes possible to select amont a set of proposal by sortition"
|
18
|
+
|
19
|
+
s.files = Dir.chdir(__dir__) do
|
20
|
+
`git ls-files -z`.split("\x0").select do |f|
|
21
|
+
(File.expand_path(f) == __FILE__) ||
|
22
|
+
f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
s.add_dependency "decidim-admin", Decidim::Sortitions.version
|
27
|
+
s.add_dependency "decidim-comments", Decidim::Sortitions.version
|
28
|
+
s.add_dependency "decidim-core", Decidim::Sortitions.version
|
29
|
+
s.add_dependency "decidim-proposals", Decidim::Sortitions.version
|
30
|
+
|
31
|
+
s.add_development_dependency "decidim-dev", Decidim::Sortitions.version
|
32
|
+
end
|
@@ -17,7 +17,7 @@ Decidim.register_component(:sortitions) do |component|
|
|
17
17
|
|
18
18
|
component.settings(:global) do |settings|
|
19
19
|
settings.attribute :comments_enabled, type: :boolean, default: true
|
20
|
-
settings.attribute :comments_max_length, type: :integer, required:
|
20
|
+
settings.attribute :comments_max_length, type: :integer, required: true
|
21
21
|
end
|
22
22
|
|
23
23
|
# Register an optional resource that can be referenced from other resources.
|
@@ -6,16 +6,22 @@ require "decidim/participatory_processes/test/factories"
|
|
6
6
|
|
7
7
|
FactoryBot.define do
|
8
8
|
factory :sortition_component, parent: :component do
|
9
|
-
|
9
|
+
transient do
|
10
|
+
skip_injection { false }
|
11
|
+
end
|
12
|
+
name { generate_component_name(participatory_space.organization.available_locales, :sortitions, skip_injection: skip_injection) }
|
10
13
|
manifest_name { :sortitions }
|
11
|
-
participatory_space { create(:participatory_process, :with_steps, organization: organization) }
|
14
|
+
participatory_space { create(:participatory_process, :with_steps, organization: organization, skip_injection: skip_injection) }
|
12
15
|
end
|
13
16
|
|
14
17
|
factory :sortition, class: "Decidim::Sortitions::Sortition" do
|
15
|
-
|
16
|
-
|
18
|
+
transient do
|
19
|
+
skip_injection { false }
|
20
|
+
end
|
21
|
+
component { create(:sortition_component, skip_injection: skip_injection) }
|
22
|
+
decidim_proposals_component { create(:proposal_component, organization: component.organization, skip_injection: skip_injection) }
|
17
23
|
|
18
|
-
title { generate_localized_title }
|
24
|
+
title { generate_localized_title(:sortition_title, skip_injection: skip_injection) }
|
19
25
|
author do
|
20
26
|
create(:user, :admin, organization: component.organization) if component
|
21
27
|
end
|
@@ -23,15 +29,15 @@ FactoryBot.define do
|
|
23
29
|
dice { Faker::Number.between(from: 1, to: 6).to_i }
|
24
30
|
target_items { Faker::Number.between(from: 1, to: 5).to_i }
|
25
31
|
request_timestamp { Time.now.utc }
|
26
|
-
witnesses {
|
27
|
-
additional_info {
|
28
|
-
selected_proposals { create_list(:proposal, target_items, component: decidim_proposals_component).pluck(:id) }
|
32
|
+
witnesses { generate_localized_description(:sortition_witnesses, skip_injection: skip_injection) }
|
33
|
+
additional_info { generate_localized_description(:sortition_additional_info, skip_injection: skip_injection) }
|
34
|
+
selected_proposals { create_list(:proposal, target_items, component: decidim_proposals_component, skip_injection: skip_injection).pluck(:id) }
|
29
35
|
candidate_proposals { selected_proposals }
|
30
36
|
|
31
37
|
trait :cancelled do
|
32
38
|
cancelled_on { Time.now.utc }
|
33
|
-
cancel_reason {
|
34
|
-
cancelled_by_user { create(:user, :admin, organization: component.organization) if component }
|
39
|
+
cancel_reason { generate_localized_description(:sortition_cancel_reason, skip_injection: skip_injection) }
|
40
|
+
cancelled_by_user { create(:user, :admin, organization: component.organization, skip_injection: skip_injection) if component }
|
35
41
|
end
|
36
42
|
end
|
37
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-sortitions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.27.
|
4
|
+
version: 0.27.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Salvador Perez Garcia
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-admin
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.27.
|
19
|
+
version: 0.27.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.27.
|
26
|
+
version: 0.27.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: decidim-comments
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.27.
|
33
|
+
version: 0.27.6
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.27.
|
40
|
+
version: 0.27.6
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: decidim-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.27.
|
47
|
+
version: 0.27.6
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.27.
|
54
|
+
version: 0.27.6
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: decidim-proposals
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.27.
|
61
|
+
version: 0.27.6
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.27.
|
68
|
+
version: 0.27.6
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: decidim-dev
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.27.
|
75
|
+
version: 0.27.6
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.27.
|
82
|
+
version: 0.27.6
|
83
83
|
description: This module makes possible to select amont a set of proposal by sortition
|
84
84
|
email:
|
85
85
|
- jsperezg@gmail.com
|
@@ -144,7 +144,6 @@ files:
|
|
144
144
|
- app/views/decidim/sortitions/sortitions/index.js.erb
|
145
145
|
- app/views/decidim/sortitions/sortitions/show.html.erb
|
146
146
|
- config/assets.rb
|
147
|
-
- config/environment.rb
|
148
147
|
- config/locales/am-ET.yml
|
149
148
|
- config/locales/ar-SA.yml
|
150
149
|
- config/locales/ar.yml
|
@@ -177,6 +176,7 @@ files:
|
|
177
176
|
- config/locales/ga-IE.yml
|
178
177
|
- config/locales/gl.yml
|
179
178
|
- config/locales/gn-PY.yml
|
179
|
+
- config/locales/he-IL.yml
|
180
180
|
- config/locales/hr-HR.yml
|
181
181
|
- config/locales/hr.yml
|
182
182
|
- config/locales/hu.yml
|
@@ -211,9 +211,11 @@ files:
|
|
211
211
|
- config/locales/sk.yml
|
212
212
|
- config/locales/sl.yml
|
213
213
|
- config/locales/so-SO.yml
|
214
|
+
- config/locales/sq-AL.yml
|
214
215
|
- config/locales/sr-CS.yml
|
215
216
|
- config/locales/sv.yml
|
216
217
|
- config/locales/sw-KE.yml
|
218
|
+
- config/locales/th-TH.yml
|
217
219
|
- config/locales/ti-ER.yml
|
218
220
|
- config/locales/tr-TR.yml
|
219
221
|
- config/locales/uk.yml
|
@@ -238,6 +240,7 @@ files:
|
|
238
240
|
- db/migrate/20181017110803_make_sortitions_authors_polymorphic.rb
|
239
241
|
- db/migrate/20200320105926_index_foreign_keys_in_decidim_sortitions_sortitions.rb
|
240
242
|
- db/migrate/20200827154036_add_commentable_counter_cache_to_sortitions.rb
|
243
|
+
- decidim-sortitions.gemspec
|
241
244
|
- lib/decidim/api/sortition_type.rb
|
242
245
|
- lib/decidim/api/sortitions_type.rb
|
243
246
|
- lib/decidim/sortitions.rb
|
@@ -248,19 +251,20 @@ files:
|
|
248
251
|
- lib/decidim/sortitions/engine.rb
|
249
252
|
- lib/decidim/sortitions/test/factories.rb
|
250
253
|
- lib/decidim/sortitions/version.rb
|
254
|
+
- lib/tasks/decidim/.keep
|
251
255
|
homepage: https://github.com/decidim/decidim
|
252
256
|
licenses:
|
253
257
|
- AGPL-3.0
|
254
258
|
metadata: {}
|
255
|
-
post_install_message:
|
259
|
+
post_install_message:
|
256
260
|
rdoc_options: []
|
257
261
|
require_paths:
|
258
262
|
- lib
|
259
263
|
required_ruby_version: !ruby/object:Gem::Requirement
|
260
264
|
requirements:
|
261
|
-
- - "
|
265
|
+
- - "~>"
|
262
266
|
- !ruby/object:Gem::Version
|
263
|
-
version:
|
267
|
+
version: 3.0.0
|
264
268
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
265
269
|
requirements:
|
266
270
|
- - ">="
|
@@ -268,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
272
|
version: '0'
|
269
273
|
requirements: []
|
270
274
|
rubygems_version: 3.2.22
|
271
|
-
signing_key:
|
275
|
+
signing_key:
|
272
276
|
specification_version: 4
|
273
277
|
summary: Decidim sortitions module
|
274
278
|
test_files: []
|
File without changes
|