decidim-dev 0.16.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/locales/ar-SA.yml +3 -0
- data/config/locales/ca.yml +3 -3
- data/config/locales/cs.yml +40 -0
- data/config/locales/en.yml +5 -4
- data/config/locales/es.yml +3 -3
- data/config/locales/fi-plain.yml +40 -0
- data/config/locales/id-ID.yml +3 -0
- data/config/locales/tr-TR.yml +3 -3
- data/lib/decidim/dev/test/form_to_param_shared_examples.rb +33 -0
- data/lib/decidim/dev/test/rspec_support/authorization.rb +10 -12
- data/lib/decidim/dev/test/rspec_support/component_context.rb +1 -1
- data/lib/decidim/dev/test/rspec_support/orderly_matchers.rb +5 -7
- data/lib/decidim/dev/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b60c2bd96c2726d4bc8d3ae1cbafc93458e43a0cb91f684c10b47bc67fdb4f00
|
|
4
|
+
data.tar.gz: 65256479b9c29a2cda91c07994baf635bd663e519b0d2ec8e584cd359f0c6b97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea861e572ec6f9c7f48c377d2aed92e87b3373a7f78fa0b0704ef4d71a1722fd0a4459b5ebf9a8e95747a6578428167f136abbcb1a9295a3401d935c8e080086
|
|
7
|
+
data.tar.gz: c045f663c730cec4e69256028a222f4d37a0512293fb60245f8faffbfa5698924c82831c5459e065c9f780541b0e32cf3fe687b52d54cb4d9d69649232cfd750
|
data/config/locales/ar-SA.yml
CHANGED
|
@@ -17,9 +17,12 @@ ar:
|
|
|
17
17
|
test:
|
|
18
18
|
conditions:
|
|
19
19
|
- استخدام بيئة اختبار ل decidim.
|
|
20
|
+
description: يحصل المشاركون على هذه الشارة عن طريق إنشاء اختبارات.
|
|
21
|
+
description_another: قام هذا المشارك بإنشاء %{score} اختبار.
|
|
20
22
|
description_own: لقد أنشأت %{score} اختبارات.
|
|
21
23
|
name: اختبارات
|
|
22
24
|
next_level_in: إنشاء %{score} اختبارات أخرى للوصول إلى المستوى التالي!
|
|
25
|
+
unearned_another: لم ينشئ هذا المشارك أي اختبارات حتى الآن.
|
|
23
26
|
unearned_own: لم تنشئ اختبارات بعد.
|
|
24
27
|
pages:
|
|
25
28
|
home:
|
data/config/locales/ca.yml
CHANGED
|
@@ -17,12 +17,12 @@ ca:
|
|
|
17
17
|
test:
|
|
18
18
|
conditions:
|
|
19
19
|
- Utilitza un entorn de prova per decidim.
|
|
20
|
-
description:
|
|
21
|
-
description_another:
|
|
20
|
+
description: Les participants obtenen aquesta insígnia creant proves.
|
|
21
|
+
description_another: Aquesta participant ha creat %{score} proves.
|
|
22
22
|
description_own: Heu creat %{score} proves.
|
|
23
23
|
name: Proves
|
|
24
24
|
next_level_in: Crea %{score} més proves per arribar al següent nivell!
|
|
25
|
-
unearned_another:
|
|
25
|
+
unearned_another: Aquesta participant encara no ha creat cap prova.
|
|
26
26
|
unearned_own: Encara no has creat cap prova.
|
|
27
27
|
pages:
|
|
28
28
|
home:
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
cs:
|
|
2
|
+
activemodel:
|
|
3
|
+
attributes:
|
|
4
|
+
dummy_resource:
|
|
5
|
+
created_at: Vytvořeno u
|
|
6
|
+
field: Moje pole
|
|
7
|
+
start_date: Počáteční datum
|
|
8
|
+
title: Titul
|
|
9
|
+
updated_at: Aktualizováno na
|
|
10
|
+
decidim:
|
|
11
|
+
dummy:
|
|
12
|
+
admin:
|
|
13
|
+
exports:
|
|
14
|
+
dummies: Dummies
|
|
15
|
+
gamification:
|
|
16
|
+
badges:
|
|
17
|
+
test:
|
|
18
|
+
conditions:
|
|
19
|
+
- Použijte testovací prostředí pro decidim.
|
|
20
|
+
description: Uživatelé získají tento odznak vytvořením testů.
|
|
21
|
+
description_another: Tento uživatel vytvořil %{score} testů.
|
|
22
|
+
description_own: Vytvořili jste %{score} testů.
|
|
23
|
+
name: Testy
|
|
24
|
+
next_level_in: Vytvořte %{score} dalších testů, abyste dosáhli další úrovně!
|
|
25
|
+
unearned_another: Tento uživatel zatím nevytvořil žádné testy.
|
|
26
|
+
unearned_own: Dosud jste nevytvořili žádné testy.
|
|
27
|
+
pages:
|
|
28
|
+
home:
|
|
29
|
+
statistics:
|
|
30
|
+
bar: Bar
|
|
31
|
+
dummies_count_high: Figuríny vysoké
|
|
32
|
+
dummies_count_medium: Dummies střední
|
|
33
|
+
foo: Foo
|
|
34
|
+
participatory_processes:
|
|
35
|
+
statistics:
|
|
36
|
+
dummies_count_high: Figuríny vysoké
|
|
37
|
+
dummies_count_medium: Dummies střední
|
|
38
|
+
resource_links:
|
|
39
|
+
test_link:
|
|
40
|
+
dummy_resource_dummy: Související figurína
|
data/config/locales/en.yml
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
---
|
|
1
2
|
en:
|
|
2
3
|
activemodel:
|
|
3
4
|
attributes:
|
|
@@ -16,13 +17,13 @@ en:
|
|
|
16
17
|
badges:
|
|
17
18
|
test:
|
|
18
19
|
conditions:
|
|
19
|
-
|
|
20
|
-
description:
|
|
21
|
-
description_another: This
|
|
20
|
+
- Use a test environment for decidim.
|
|
21
|
+
description: Participants get this badge by creating tests.
|
|
22
|
+
description_another: This participant has created %{score} tests.
|
|
22
23
|
description_own: You have created %{score} tests.
|
|
23
24
|
name: Tests
|
|
24
25
|
next_level_in: Create %{score} more tests to reach the next level!
|
|
25
|
-
unearned_another: This
|
|
26
|
+
unearned_another: This participant hasn't created any tests yet.
|
|
26
27
|
unearned_own: You have created no tests yet.
|
|
27
28
|
pages:
|
|
28
29
|
home:
|
data/config/locales/es.yml
CHANGED
|
@@ -17,12 +17,12 @@ es:
|
|
|
17
17
|
test:
|
|
18
18
|
conditions:
|
|
19
19
|
- Utilice un entorno de prueba para decidim.
|
|
20
|
-
description:
|
|
21
|
-
description_another:
|
|
20
|
+
description: Las participantes obtienen esta insignia al crear pruebas.
|
|
21
|
+
description_another: Esta participante ha creado %{score} pruebas.
|
|
22
22
|
description_own: Has creado %{score} pruebas.
|
|
23
23
|
name: Pruebas
|
|
24
24
|
next_level_in: '¡Crea %{score} pruebas más para alcanzar el siguiente nivel!'
|
|
25
|
-
unearned_another:
|
|
25
|
+
unearned_another: Esta participante aún no ha creado ninguna prueba.
|
|
26
26
|
unearned_own: No has creado ninguna prueba todavía.
|
|
27
27
|
pages:
|
|
28
28
|
home:
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
fi-pl:
|
|
2
|
+
activemodel:
|
|
3
|
+
attributes:
|
|
4
|
+
dummy_resource:
|
|
5
|
+
created_at: Luontiaika
|
|
6
|
+
field: Oma kenttä
|
|
7
|
+
start_date: Alkamispäivä
|
|
8
|
+
title: Otsikko
|
|
9
|
+
updated_at: Päivitysaika
|
|
10
|
+
decidim:
|
|
11
|
+
dummy:
|
|
12
|
+
admin:
|
|
13
|
+
exports:
|
|
14
|
+
dummies: Esimerkkitiedot
|
|
15
|
+
gamification:
|
|
16
|
+
badges:
|
|
17
|
+
test:
|
|
18
|
+
conditions:
|
|
19
|
+
- Käytä testiympäristöä Decidimille.
|
|
20
|
+
description: Käyttäjät saavat tämän kunniamerkin luomalla testejä.
|
|
21
|
+
description_another: Tämä käyttäjä on luonut %{score} testiä.
|
|
22
|
+
description_own: Olet luonut %{score} testiä.
|
|
23
|
+
name: Testit
|
|
24
|
+
next_level_in: Luo vielä %{score} testiä seuraavan tason saavuttamiseksi!
|
|
25
|
+
unearned_another: Tämä käyttäjä ei ole vielä luonut testejä.
|
|
26
|
+
unearned_own: Et ole vielä luonut testejä.
|
|
27
|
+
pages:
|
|
28
|
+
home:
|
|
29
|
+
statistics:
|
|
30
|
+
bar: Palkki
|
|
31
|
+
dummies_count_high: Esimerkkiluku, korkea
|
|
32
|
+
dummies_count_medium: Esimerkkiluku, keskitaso
|
|
33
|
+
foo: Foo
|
|
34
|
+
participatory_processes:
|
|
35
|
+
statistics:
|
|
36
|
+
dummies_count_high: Esimerkkiluku, korkea
|
|
37
|
+
dummies_count_medium: Esimerkkiluku, keskitaso
|
|
38
|
+
resource_links:
|
|
39
|
+
test_link:
|
|
40
|
+
dummy_resource_dummy: Liittyvät esimerkkitiedot
|
data/config/locales/id-ID.yml
CHANGED
|
@@ -17,9 +17,12 @@ id:
|
|
|
17
17
|
test:
|
|
18
18
|
conditions:
|
|
19
19
|
- Gunakan lingkungan uji untuk decidim.
|
|
20
|
+
description: Peserta mendapatkan lencana ini dengan membuat tes.
|
|
21
|
+
description_another: Peserta ini telah membuat %{score} tes.
|
|
20
22
|
description_own: Anda telah membuat %{score} tes.
|
|
21
23
|
name: Tes
|
|
22
24
|
next_level_in: Buat %{score} tes lagi untuk mencapai level selanjutnya!
|
|
25
|
+
unearned_another: Peserta ini belum membuat tes apa pun.
|
|
23
26
|
unearned_own: Anda belum membuat tes.
|
|
24
27
|
pages:
|
|
25
28
|
home:
|
data/config/locales/tr-TR.yml
CHANGED
|
@@ -17,12 +17,12 @@ tr:
|
|
|
17
17
|
test:
|
|
18
18
|
conditions:
|
|
19
19
|
- Decidim için bir test ortamı kullanın.
|
|
20
|
-
description:
|
|
21
|
-
description_another: Bu
|
|
20
|
+
description: Katılımcılar testler oluşturarak bu rozeti alırlar.
|
|
21
|
+
description_another: Bu katılımcı %{score} test oluşturdu.
|
|
22
22
|
description_own: '%{score} test oluşturdunuz.'
|
|
23
23
|
name: Testler
|
|
24
24
|
next_level_in: Bir sonraki seviyeye ulaşmak için %{score} test daha oluştur!
|
|
25
|
-
unearned_another: Bu
|
|
25
|
+
unearned_another: Bu katılımcı henüz bir test oluşturmadı.
|
|
26
26
|
unearned_own: Henüz bir test oluşturmadınız.
|
|
27
27
|
pages:
|
|
28
28
|
home:
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
shared_examples "form to param" do |options|
|
|
4
|
+
method_name = options[:method_name] || :to_param
|
|
5
|
+
|
|
6
|
+
describe "##{method_name}" do
|
|
7
|
+
subject { described_class.new(id: id) }
|
|
8
|
+
|
|
9
|
+
context "with actual ID" do
|
|
10
|
+
let(:id) { double }
|
|
11
|
+
|
|
12
|
+
it "returns the ID" do
|
|
13
|
+
expect(subject.public_send(method_name)).to be(id)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
context "with nil ID" do
|
|
18
|
+
let(:id) { nil }
|
|
19
|
+
|
|
20
|
+
it "returns the ID placeholder" do
|
|
21
|
+
expect(subject.public_send(method_name)).to eq(options[:default_id])
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
context "with empty ID" do
|
|
26
|
+
let(:id) { "" }
|
|
27
|
+
|
|
28
|
+
it "returns the ID placeholder" do
|
|
29
|
+
expect(subject.public_send(method_name)).to eq(options[:default_id])
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -27,20 +27,18 @@ end
|
|
|
27
27
|
|
|
28
28
|
RSpec.configure do |config|
|
|
29
29
|
config.around(:example, :with_authorization_workflows) do |example|
|
|
30
|
-
|
|
31
|
-
previous_workflows = Decidim::Verifications.workflows.dup
|
|
30
|
+
previous_workflows = Decidim::Verifications.workflows.dup
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
new_workflows = example.metadata[:with_authorization_workflows].map do |name|
|
|
33
|
+
Decidim::Verifications.find_workflow_manifest(name)
|
|
34
|
+
end
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
Decidim::Verifications.reset_workflows(*new_workflows)
|
|
37
|
+
Rails.application.reload_routes!
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
end
|
|
39
|
+
example.run
|
|
40
|
+
ensure
|
|
41
|
+
Decidim::Verifications.reset_workflows(*previous_workflows)
|
|
42
|
+
Rails.application.reload_routes!
|
|
45
43
|
end
|
|
46
44
|
end
|
|
@@ -5,7 +5,7 @@ shared_context "with a component" do
|
|
|
5
5
|
|
|
6
6
|
let(:user) { create :user, :confirmed, organization: organization }
|
|
7
7
|
|
|
8
|
-
let!(:organization) { create(:organization) }
|
|
8
|
+
let!(:organization) { create(:organization, available_authorizations: %w(dummy_authorization_handler another_dummy_authorization_handler)) }
|
|
9
9
|
|
|
10
10
|
let(:participatory_process) do
|
|
11
11
|
create(:participatory_process, :with_steps, organization: organization)
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
RSpec::Matchers.define :appear_before do |later_content|
|
|
4
4
|
match do |earlier_content|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
raise "Could not locate earlier content on page: #{earlier_content}"
|
|
11
|
-
end
|
|
5
|
+
page.body.index(earlier_content) < page.body.index(later_content)
|
|
6
|
+
rescue ArgumentError
|
|
7
|
+
raise "Could not locate later content on page: #{later_content}"
|
|
8
|
+
rescue NoMethodError
|
|
9
|
+
raise "Could not locate earlier content on page: #{earlier_content}"
|
|
12
10
|
end
|
|
13
11
|
end
|
data/lib/decidim/dev/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-dev
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.17.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
@@ -32,14 +32,14 @@ dependencies:
|
|
|
32
32
|
requirements:
|
|
33
33
|
- - '='
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
|
-
version: 0.
|
|
35
|
+
version: 0.17.0
|
|
36
36
|
type: :runtime
|
|
37
37
|
prerelease: false
|
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
39
39
|
requirements:
|
|
40
40
|
- - '='
|
|
41
41
|
- !ruby/object:Gem::Version
|
|
42
|
-
version: 0.
|
|
42
|
+
version: 0.17.0
|
|
43
43
|
- !ruby/object:Gem::Dependency
|
|
44
44
|
name: factory_bot_rails
|
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -347,6 +347,7 @@ files:
|
|
|
347
347
|
- config/locales/ar-SA.yml
|
|
348
348
|
- config/locales/ca.yml
|
|
349
349
|
- config/locales/cs-CZ.yml
|
|
350
|
+
- config/locales/cs.yml
|
|
350
351
|
- config/locales/de.yml
|
|
351
352
|
- config/locales/en.yml
|
|
352
353
|
- config/locales/es-MX.yml
|
|
@@ -354,6 +355,7 @@ files:
|
|
|
354
355
|
- config/locales/es.yml
|
|
355
356
|
- config/locales/eu.yml
|
|
356
357
|
- config/locales/fi-pl.yml
|
|
358
|
+
- config/locales/fi-plain.yml
|
|
357
359
|
- config/locales/fi.yml
|
|
358
360
|
- config/locales/fr.yml
|
|
359
361
|
- config/locales/gl.yml
|
|
@@ -387,6 +389,7 @@ files:
|
|
|
387
389
|
- lib/decidim/dev/test/authorization_shared_examples.rb
|
|
388
390
|
- lib/decidim/dev/test/base_spec_helper.rb
|
|
389
391
|
- lib/decidim/dev/test/factories.rb
|
|
392
|
+
- lib/decidim/dev/test/form_to_param_shared_examples.rb
|
|
390
393
|
- lib/decidim/dev/test/promoted_participatory_processes_shared_examples.rb
|
|
391
394
|
- lib/decidim/dev/test/rspec_support/action_mailer.rb
|
|
392
395
|
- lib/decidim/dev/test/rspec_support/active_job.rb
|
|
@@ -431,7 +434,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
431
434
|
requirements:
|
|
432
435
|
- - ">="
|
|
433
436
|
- !ruby/object:Gem::Version
|
|
434
|
-
version: '2.
|
|
437
|
+
version: '2.5'
|
|
435
438
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
436
439
|
requirements:
|
|
437
440
|
- - ">="
|