decidim-dev 0.28.3 → 0.28.5
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/permissions/decidim/dev/permissions.rb +22 -0
- data/config/locales/bn-BD.yml +1 -0
- data/config/locales/bs-BA.yml +9 -0
- data/config/locales/eu.yml +3 -3
- data/config/locales/sv.yml +12 -7
- data/decidim-dev.gemspec +1 -1
- data/lib/decidim/dev/assets/invalid_extension.log +1 -0
- data/lib/decidim/dev/assets/odt_file_reported_as.pdf +0 -0
- data/lib/decidim/dev/auth_engine.rb +33 -0
- data/lib/decidim/dev/component.rb +1 -0
- data/lib/decidim/dev/test/rspec_support/attachment_helpers.rb +1 -3
- data/lib/decidim/dev/test/rspec_support/warden.rb +1 -0
- data/lib/decidim/dev/version.rb +1 -1
- data/lib/decidim/dev.rb +1 -0
- metadata +12 -6
- /data/{app/controllers/concerns → lib}/decidim/dev/needs_development_tools.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3347a25842917fe88b1ff45b1b93ee9db85e0dda681bbe290930cc5ab968291
|
4
|
+
data.tar.gz: f714b13d8ec320485e8861aecec79d54af6fb32e495ce6ea8ac614c815df8a60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cfb0c9bb9bf48ba15e2bf160856d4400d7ecfd9742aec05db7ee7b576ebb68d978e23ec46661aa3784198cd290b76a19411c1770db83bce70ec437e82172900
|
7
|
+
data.tar.gz: 29b0f83786a9973bb0a973a02f5e8a9bf2146541699e211926cf5062069735e4ac20a473525e74bacc71e4abbb513e395a0d0e41b6bbf28f9185fbecd1d55b40
|
@@ -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 @@
|
|
1
|
+
bn:
|
data/config/locales/eu.yml
CHANGED
@@ -4,8 +4,8 @@ eu:
|
|
4
4
|
attributes:
|
5
5
|
dummy_resource:
|
6
6
|
created_at: Sortua
|
7
|
-
decidim_scope_id:
|
8
|
-
field: Nire eremua
|
7
|
+
decidim_scope_id: Eremua
|
8
|
+
field: Nire datu-eremua
|
9
9
|
start_date: Hasiera data
|
10
10
|
title: Izenburua
|
11
11
|
translatable_text: Itzul daitekeen testua
|
@@ -49,7 +49,7 @@ eu:
|
|
49
49
|
conditions:
|
50
50
|
- Erabili probako ingurunea erabakitzeko.
|
51
51
|
description: Parte-hartzaileek garaikur hau lortzen dute probak sortzeagatik.
|
52
|
-
description_another:
|
52
|
+
description_another: Parte-hartzaile honek %{score} proba egin ditu.
|
53
53
|
description_own: '%{score} proba sortu dituzu.'
|
54
54
|
name: Probak
|
55
55
|
next_level_in: Sortu %{score} proba gehiago hurrengo mailara iristeko!
|
data/config/locales/sv.yml
CHANGED
@@ -15,22 +15,26 @@ sv:
|
|
15
15
|
dummy:
|
16
16
|
settings:
|
17
17
|
global:
|
18
|
-
guided: Guidad
|
18
|
+
guided: Guidad inmatning
|
19
19
|
guided_help: Hjälptext
|
20
|
+
guided_readonly: Inmatning inaktiverad
|
21
|
+
guided_rich: Guidad formatterad textinmatning
|
22
|
+
guided_rich_help_html: HTML <strong>hjälp</strong>-text
|
23
|
+
guided_rich_readonly_html: HTML <strong>hjälp</strong>-text för inaktiverad inmatning
|
20
24
|
readonly_attribute: Skrivskyddat attribut
|
21
25
|
test: Ett test
|
22
26
|
test_choices:
|
23
|
-
a:
|
24
|
-
b: B
|
25
|
-
c: C
|
27
|
+
a: Alternativ A
|
28
|
+
b: Alternativ B
|
29
|
+
c: Alternativ C
|
26
30
|
test_options:
|
27
31
|
bar: Bar
|
28
32
|
baz: Baz
|
29
33
|
foo: Foo
|
30
34
|
step:
|
31
|
-
endorsements_blocked:
|
32
|
-
endorsements_enabled:
|
33
|
-
readonly_step_attribute:
|
35
|
+
endorsements_blocked: Blockera gilla-markeringar
|
36
|
+
endorsements_enabled: Aktivera gilla-markeringar
|
37
|
+
readonly_step_attribute: Attribut för skrivskyddat steg
|
34
38
|
test_options:
|
35
39
|
bar: Bar
|
36
40
|
baz: Baz
|
@@ -49,6 +53,7 @@ sv:
|
|
49
53
|
description_own: Du har skapat %{score} tester.
|
50
54
|
name: Tester
|
51
55
|
next_level_in: Skapa %{score} till tester för att nå nästa nivå!
|
56
|
+
unearned_another: Den här deltagaren har inte skapat några tester än.
|
52
57
|
unearned_own: Du har inte skapat några tester än.
|
53
58
|
resource_links:
|
54
59
|
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",
|
@@ -0,0 +1 @@
|
|
1
|
+
FooBar
|
Binary file
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "decidim/dev/needs_development_tools"
|
4
|
+
|
5
|
+
module Decidim
|
6
|
+
module Dev
|
7
|
+
# Example engine overriding the core authentication routes.
|
8
|
+
class AuthEngine < ::Rails::Engine
|
9
|
+
isolate_namespace Decidim::Dev
|
10
|
+
engine_name "decidim_dev_auth"
|
11
|
+
|
12
|
+
routes do
|
13
|
+
devise_scope :user do
|
14
|
+
match(
|
15
|
+
"/users/auth/test/callback",
|
16
|
+
to: "omniauth_callbacks#dev_callback",
|
17
|
+
as: "user_test_omniauth_authorize",
|
18
|
+
via: [:get, :post]
|
19
|
+
)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
initializer "decidim_dev_auth.mount_test_routes", before: :add_routing_paths do
|
24
|
+
next unless Rails.env.test?
|
25
|
+
|
26
|
+
# Required for overriding the callback route.
|
27
|
+
Decidim::Core::Engine.routes.prepend do
|
28
|
+
mount Decidim::Dev::AuthEngine => "/"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -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,12 +14,10 @@ module AttachmentHelpers
|
|
14
14
|
# Used in non-system tests that need files.
|
15
15
|
def upload_test_file(file, options = {})
|
16
16
|
filename = options[:filename] || upload_test_file_filename(file)
|
17
|
-
content_type = options[:content_type] || upload_test_file_content_type(file)
|
18
17
|
|
19
18
|
blob = ActiveStorage::Blob.create_and_upload!(
|
20
19
|
io: File.open(file),
|
21
|
-
filename
|
22
|
-
content_type:
|
20
|
+
filename:
|
23
21
|
)
|
24
22
|
return blob if options[:return_blob]
|
25
23
|
|
data/lib/decidim/dev/version.rb
CHANGED
data/lib/decidim/dev.rb
CHANGED
@@ -5,6 +5,7 @@ require "decidim/dev/railtie"
|
|
5
5
|
require "decidim/dev/admin"
|
6
6
|
require "decidim/dev/engine"
|
7
7
|
require "decidim/dev/admin_engine"
|
8
|
+
require "decidim/dev/auth_engine"
|
8
9
|
# We shall not load the component here, as it will complain there is no method register_component
|
9
10
|
# for Decidim module. To fix that we need to require 'decidim/core', which will cause a major
|
10
11
|
# performance setback, as this file is usually the first request in "spec_helpers".
|
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.5
|
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-02-12 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.5
|
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.5
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: factory_bot_rails
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -456,7 +456,6 @@ files:
|
|
456
456
|
- README.md
|
457
457
|
- Rakefile
|
458
458
|
- app/commands/decidim/dev/create_dummy_resource.rb
|
459
|
-
- app/controllers/concerns/decidim/dev/needs_development_tools.rb
|
460
459
|
- app/controllers/decidim/dev/dummy_resources_controller.rb
|
461
460
|
- app/events/decidim/dev/dummy_resource_event.rb
|
462
461
|
- app/forms/decidim/dev/dummy_resource_form.rb
|
@@ -476,6 +475,7 @@ files:
|
|
476
475
|
- app/packs/stylesheets/decidim/dev.scss
|
477
476
|
- app/packs/stylesheets/decidim/dev/_accessibility.scss
|
478
477
|
- app/packs/stylesheets/decidim/dev/_map.scss
|
478
|
+
- app/permissions/decidim/dev/permissions.rb
|
479
479
|
- app/presenters/decidim/dev/official_author_presenter.rb
|
480
480
|
- app/serializers/decidim/dev/dummy_serializer.rb
|
481
481
|
- app/views/decidim/dev/dummy_resources/foo.html.erb
|
@@ -487,6 +487,8 @@ files:
|
|
487
487
|
- config/locales/ar.yml
|
488
488
|
- config/locales/bg-BG.yml
|
489
489
|
- config/locales/bg.yml
|
490
|
+
- config/locales/bn-BD.yml
|
491
|
+
- config/locales/bs-BA.yml
|
490
492
|
- config/locales/ca.yml
|
491
493
|
- config/locales/cs-CZ.yml
|
492
494
|
- config/locales/cs.yml
|
@@ -604,9 +606,11 @@ files:
|
|
604
606
|
- lib/decidim/dev/assets/import_voting_census_with_ballot_styles.csv
|
605
607
|
- lib/decidim/dev/assets/import_voting_census_without_headers.csv
|
606
608
|
- lib/decidim/dev/assets/invalid.jpeg
|
609
|
+
- lib/decidim/dev/assets/invalid_extension.log
|
607
610
|
- lib/decidim/dev/assets/iso-8859-15.md
|
608
611
|
- lib/decidim/dev/assets/logo.png
|
609
612
|
- lib/decidim/dev/assets/malicious.jpg
|
613
|
+
- lib/decidim/dev/assets/odt_file_reported_as.pdf
|
610
614
|
- lib/decidim/dev/assets/participatory_processes.json
|
611
615
|
- lib/decidim/dev/assets/participatory_processes_with_null.json
|
612
616
|
- lib/decidim/dev/assets/participatory_text.md
|
@@ -622,10 +626,12 @@ files:
|
|
622
626
|
- lib/decidim/dev/assets/ssl-key.pem
|
623
627
|
- lib/decidim/dev/assets/test_excel.xlsx
|
624
628
|
- lib/decidim/dev/assets/verify_user_groups.csv
|
629
|
+
- lib/decidim/dev/auth_engine.rb
|
625
630
|
- lib/decidim/dev/common_rake.rb
|
626
631
|
- lib/decidim/dev/component.rb
|
627
632
|
- lib/decidim/dev/dummy_translator.rb
|
628
633
|
- lib/decidim/dev/engine.rb
|
634
|
+
- lib/decidim/dev/needs_development_tools.rb
|
629
635
|
- lib/decidim/dev/railtie.rb
|
630
636
|
- lib/decidim/dev/test/authorization_shared_examples.rb
|
631
637
|
- lib/decidim/dev/test/base_spec_helper.rb
|
@@ -691,7 +697,7 @@ files:
|
|
691
697
|
- rubocop-decidim.yml
|
692
698
|
homepage: https://decidim.org
|
693
699
|
licenses:
|
694
|
-
- AGPL-3.0
|
700
|
+
- AGPL-3.0-or-later
|
695
701
|
metadata:
|
696
702
|
bug_tracker_uri: https://github.com/decidim/decidim/issues
|
697
703
|
documentation_uri: https://docs.decidim.org/
|
File without changes
|