decidim-dev 0.28.4 → 0.28.6
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/app/models/decidim/dev/dummy_resource.rb +2 -2
- data/app/permissions/decidim/dev/permissions.rb +22 -0
- data/app/presenters/decidim/dev/dummy_resource_presenter.rb +13 -0
- data/config/locales/ar.yml +3 -0
- data/config/locales/bn-BD.yml +1 -0
- data/config/locales/bs-BA.yml +9 -0
- data/config/locales/ca-IT.yml +68 -0
- data/config/locales/ca.yml +3 -0
- data/config/locales/cs.yml +3 -0
- data/config/locales/de.yml +3 -0
- data/config/locales/en.yml +3 -0
- data/config/locales/es-MX.yml +3 -0
- data/config/locales/es-PY.yml +3 -0
- data/config/locales/es.yml +3 -0
- data/config/locales/eu.yml +6 -3
- data/config/locales/fi-plain.yml +3 -0
- data/config/locales/fi.yml +3 -0
- data/config/locales/fr-CA.yml +3 -0
- data/config/locales/fr.yml +3 -0
- data/config/locales/ja.yml +3 -0
- data/config/locales/ro-RO.yml +1 -1
- data/config/locales/sv.yml +13 -5
- data/decidim-dev.gemspec +1 -1
- data/lib/decidim/dev/component.rb +1 -0
- data/lib/decidim/dev/test/rspec_support/geocoder.rb +13 -0
- data/lib/decidim/dev/test/rspec_support/translation_helpers.rb +1 -0
- data/lib/decidim/dev/version.rb +1 -1
- metadata +10 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12b548f29f2f963bd48e0d10cc0ddfefac096eda973b9f20a40d54c09d1ddd5b
|
4
|
+
data.tar.gz: b95a086988d19dbb333580718b4f1064f16fb3d56ea228b49261d0c9c51d4a57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efab0c2f8e4a2661f0d4d4f5f73b08c32997c2b42a5406cb521e383aff1c9e594b889d1c3fafe018df3d0a03690a27013996cb737acae71cbd3ed487029bcfeb
|
7
|
+
data.tar.gz: 0c0ec5f742be2c30a9c3122f68f2022b6ccd9e1c9c0d9415d8da6dd09436f55ef685215d90168baeed4715d1b91135e75c6f662e5cfd59f94002c5dd6c389f30
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Dev
|
5
|
+
class Permissions < Decidim::DefaultPermissions
|
6
|
+
def permissions
|
7
|
+
return permission_action unless user
|
8
|
+
|
9
|
+
return permission_action if permission_action.scope != :public
|
10
|
+
|
11
|
+
toggle_allow(!dummy_resource.hidden? && dummy_resource.published?) if permission_action.subject == :dummy_resource
|
12
|
+
permission_action
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def dummy_resource
|
18
|
+
context[:dummy_resource] = context.fetch(:dummy_resource, nil) || context.fetch(:resource, nil)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Dev
|
5
|
+
class DummyResourcePresenter < Decidim::ResourcePresenter
|
6
|
+
def title(links: false, html_escape: false, all_locales: false)
|
7
|
+
return unless __getobj__
|
8
|
+
|
9
|
+
super(__getobj__.title, links, html_escape, all_locales)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/config/locales/ar.yml
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
bn:
|
@@ -0,0 +1,68 @@
|
|
1
|
+
---
|
2
|
+
ca-IT:
|
3
|
+
activemodel:
|
4
|
+
attributes:
|
5
|
+
dummy:
|
6
|
+
image: Imatge
|
7
|
+
dummy_attribute: Atribut de prova
|
8
|
+
dummy_resource:
|
9
|
+
created_at: Creat el
|
10
|
+
decidim_scope_id: Àmbit
|
11
|
+
field: El meu camp
|
12
|
+
start_date: Data d'inici
|
13
|
+
title: Títol
|
14
|
+
translatable_text: Text traduïble
|
15
|
+
updated_at: Actualitzat el
|
16
|
+
decidim:
|
17
|
+
components:
|
18
|
+
dummy:
|
19
|
+
settings:
|
20
|
+
global:
|
21
|
+
guided: Entrada guiada
|
22
|
+
guided_help: Text d'ajuda
|
23
|
+
guided_readonly: Entrada deshabilitada
|
24
|
+
guided_rich: Entrada guiada enriquida
|
25
|
+
guided_rich_help_html: HTML <strong>ajuda</strong> text
|
26
|
+
guided_rich_readonly_html: HTML <strong>ajuda</strong> text per l'entrada deshabilitada
|
27
|
+
readonly_attribute: Atribut de només lectura
|
28
|
+
test: Una prova
|
29
|
+
test_choices:
|
30
|
+
a: Opció A
|
31
|
+
b: Opció B
|
32
|
+
c: Opció C
|
33
|
+
test_options:
|
34
|
+
bar: Barra
|
35
|
+
baz: Baz
|
36
|
+
foo: Foo
|
37
|
+
step:
|
38
|
+
endorsements_blocked: Adhesions bloquejades
|
39
|
+
endorsements_enabled: Adhesions habilitades
|
40
|
+
readonly_step_attribute: Atribut de només lectura
|
41
|
+
test_options:
|
42
|
+
bar: Barra
|
43
|
+
baz: Baz
|
44
|
+
foo: Foo
|
45
|
+
dummy:
|
46
|
+
admin:
|
47
|
+
exports:
|
48
|
+
dummies: Proves
|
49
|
+
gamification:
|
50
|
+
badges:
|
51
|
+
test:
|
52
|
+
conditions:
|
53
|
+
- Utilitza un entorn de prova per decidim.
|
54
|
+
description: Les participants obtenen aquesta insígnia creant proves.
|
55
|
+
description_another: Aquesta participant ha creat %{score} proves.
|
56
|
+
description_own: Has creat %{score} proves.
|
57
|
+
name: Proves
|
58
|
+
next_level_in: Crea %{score} més proves per arribar al següent nivell!
|
59
|
+
unearned_another: Aquesta participant encara no ha creat cap prova.
|
60
|
+
unearned_own: Encara no has creat cap prova.
|
61
|
+
resource_links:
|
62
|
+
test_link:
|
63
|
+
dummy_resource_dummy: Prova relacionada
|
64
|
+
statistics:
|
65
|
+
bar: Barra
|
66
|
+
dummies_count_high: Fals alt
|
67
|
+
dummies_count_medium: Fals mitjà
|
68
|
+
foo: Foo
|
data/config/locales/ca.yml
CHANGED
data/config/locales/cs.yml
CHANGED
data/config/locales/de.yml
CHANGED
data/config/locales/en.yml
CHANGED
data/config/locales/es-MX.yml
CHANGED
data/config/locales/es-PY.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/eu.yml
CHANGED
@@ -2,10 +2,13 @@
|
|
2
2
|
eu:
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
|
+
dummy:
|
6
|
+
image: Irudia
|
7
|
+
dummy_attribute: Balizko atributua
|
5
8
|
dummy_resource:
|
6
9
|
created_at: Sortua
|
7
|
-
decidim_scope_id:
|
8
|
-
field: Nire eremua
|
10
|
+
decidim_scope_id: Eremua
|
11
|
+
field: Nire datu-eremua
|
9
12
|
start_date: Hasiera data
|
10
13
|
title: Izenburua
|
11
14
|
translatable_text: Itzul daitekeen testua
|
@@ -49,7 +52,7 @@ eu:
|
|
49
52
|
conditions:
|
50
53
|
- Erabili probako ingurunea erabakitzeko.
|
51
54
|
description: Parte-hartzaileek garaikur hau lortzen dute probak sortzeagatik.
|
52
|
-
description_another:
|
55
|
+
description_another: Parte-hartzaile honek %{score} proba egin ditu.
|
53
56
|
description_own: '%{score} proba sortu dituzu.'
|
54
57
|
name: Probak
|
55
58
|
next_level_in: Sortu %{score} proba gehiago hurrengo mailara iristeko!
|
data/config/locales/fi-plain.yml
CHANGED
data/config/locales/fi.yml
CHANGED
data/config/locales/fr-CA.yml
CHANGED
data/config/locales/fr.yml
CHANGED
data/config/locales/ja.yml
CHANGED
data/config/locales/ro-RO.yml
CHANGED
data/config/locales/sv.yml
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
sv:
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
|
+
dummy:
|
6
|
+
image: Bild
|
7
|
+
dummy_attribute: Testattribut
|
5
8
|
dummy_resource:
|
6
9
|
created_at: Skapad
|
7
10
|
decidim_scope_id: Indelning
|
@@ -15,14 +18,18 @@ sv:
|
|
15
18
|
dummy:
|
16
19
|
settings:
|
17
20
|
global:
|
18
|
-
guided: Guidad
|
21
|
+
guided: Guidad inmatning
|
19
22
|
guided_help: Hjälptext
|
23
|
+
guided_readonly: Inmatning inaktiverad
|
24
|
+
guided_rich: Guidad formatterad textinmatning
|
25
|
+
guided_rich_help_html: HTML <strong>hjälp</strong>-text
|
26
|
+
guided_rich_readonly_html: HTML <strong>hjälp</strong>-text för inaktiverad inmatning
|
20
27
|
readonly_attribute: Skrivskyddat attribut
|
21
28
|
test: Ett test
|
22
29
|
test_choices:
|
23
|
-
a:
|
24
|
-
b: B
|
25
|
-
c: C
|
30
|
+
a: Alternativ A
|
31
|
+
b: Alternativ B
|
32
|
+
c: Alternativ C
|
26
33
|
test_options:
|
27
34
|
bar: Bar
|
28
35
|
baz: Baz
|
@@ -30,7 +37,7 @@ sv:
|
|
30
37
|
step:
|
31
38
|
endorsements_blocked: Blockera gilla-markeringar
|
32
39
|
endorsements_enabled: Aktivera gilla-markeringar
|
33
|
-
readonly_step_attribute:
|
40
|
+
readonly_step_attribute: Attribut för skrivskyddat steg
|
34
41
|
test_options:
|
35
42
|
bar: Bar
|
36
43
|
baz: Baz
|
@@ -49,6 +56,7 @@ sv:
|
|
49
56
|
description_own: Du har skapat %{score} tester.
|
50
57
|
name: Tester
|
51
58
|
next_level_in: Skapa %{score} till tester för att nå nästa nivå!
|
59
|
+
unearned_another: Den här deltagaren har inte skapat några tester än.
|
52
60
|
unearned_own: Du har inte skapat några tester än.
|
53
61
|
resource_links:
|
54
62
|
test_link:
|
data/decidim-dev.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.version = Decidim::Dev.version
|
11
11
|
s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
|
12
12
|
s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
|
13
|
-
s.license = "AGPL-3.0"
|
13
|
+
s.license = "AGPL-3.0-or-later"
|
14
14
|
s.homepage = "https://decidim.org"
|
15
15
|
s.metadata = {
|
16
16
|
"bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
|
@@ -8,6 +8,7 @@ Decidim.register_component(:dummy) do |component|
|
|
8
8
|
component.actions = %w(foo bar)
|
9
9
|
|
10
10
|
component.newsletter_participant_entities = ["Decidim::Dev::DummyResource"]
|
11
|
+
component.permissions_class_name = "Decidim::Dev::Permissions"
|
11
12
|
|
12
13
|
component.settings(:global) do |settings|
|
13
14
|
settings.attribute :scopes_enabled, type: :boolean, default: false
|
@@ -14,6 +14,19 @@ module GeocoderHelpers
|
|
14
14
|
)
|
15
15
|
end
|
16
16
|
|
17
|
+
def stub_geocoding_coordinates(coordinates)
|
18
|
+
geocoder_request_url = "https://nominatim.openstreetmap.org/reverse?accept-language=en&addressdetails=1&format=json&lat=#{coordinates[0]}&lon=#{coordinates[1]}"
|
19
|
+
geocoder_response = File.read(Decidim::Dev.asset("geocoder_result_here.json"))
|
20
|
+
|
21
|
+
stub_request(:get, geocoder_request_url).with(
|
22
|
+
headers: {
|
23
|
+
"Accept" => "*/*",
|
24
|
+
"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
25
|
+
"User-Agent" => "Ruby"
|
26
|
+
}
|
27
|
+
).to_return(body: geocoder_response)
|
28
|
+
end
|
29
|
+
|
17
30
|
# Waits for the front-end geocoding request to finish in order to ensure there
|
18
31
|
# are no pending requests when proceeding.
|
19
32
|
def fill_in_geocoding(attribute, options = {})
|
@@ -62,6 +62,7 @@ module TranslationHelpers
|
|
62
62
|
# localized_values - a Hash where the keys are the locales IDs and the values
|
63
63
|
# are the values that will be entered in the form field.
|
64
64
|
def fill_in_i18n_editor(field, tab_selector, localized_values)
|
65
|
+
clear_i18n_editor field, tab_selector, localized_values.keys
|
65
66
|
fill_in_i18n_fields(field, tab_selector, localized_values) do |locator, value|
|
66
67
|
fill_in_editor locator, with: value
|
67
68
|
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.28.
|
4
|
+
version: 0.28.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2025-04-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: capybara
|
@@ -32,14 +32,14 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.28.
|
35
|
+
version: 0.28.6
|
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.28.
|
42
|
+
version: 0.28.6
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: factory_bot_rails
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -475,6 +475,8 @@ files:
|
|
475
475
|
- app/packs/stylesheets/decidim/dev.scss
|
476
476
|
- app/packs/stylesheets/decidim/dev/_accessibility.scss
|
477
477
|
- app/packs/stylesheets/decidim/dev/_map.scss
|
478
|
+
- app/permissions/decidim/dev/permissions.rb
|
479
|
+
- app/presenters/decidim/dev/dummy_resource_presenter.rb
|
478
480
|
- app/presenters/decidim/dev/official_author_presenter.rb
|
479
481
|
- app/serializers/decidim/dev/dummy_serializer.rb
|
480
482
|
- app/views/decidim/dev/dummy_resources/foo.html.erb
|
@@ -486,6 +488,9 @@ files:
|
|
486
488
|
- config/locales/ar.yml
|
487
489
|
- config/locales/bg-BG.yml
|
488
490
|
- config/locales/bg.yml
|
491
|
+
- config/locales/bn-BD.yml
|
492
|
+
- config/locales/bs-BA.yml
|
493
|
+
- config/locales/ca-IT.yml
|
489
494
|
- config/locales/ca.yml
|
490
495
|
- config/locales/cs-CZ.yml
|
491
496
|
- config/locales/cs.yml
|
@@ -694,7 +699,7 @@ files:
|
|
694
699
|
- rubocop-decidim.yml
|
695
700
|
homepage: https://decidim.org
|
696
701
|
licenses:
|
697
|
-
- AGPL-3.0
|
702
|
+
- AGPL-3.0-or-later
|
698
703
|
metadata:
|
699
704
|
bug_tracker_uri: https://github.com/decidim/decidim/issues
|
700
705
|
documentation_uri: https://docs.decidim.org/
|