decidim-dev 0.28.3 → 0.28.5

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: d6b9973be99a2087203195bd53e2d70c217f03e931d9dd65b41131175847f279
4
- data.tar.gz: a11250967979f905fc8f477dddae1dcef632895fc3259657dd18b0ccc40883f4
3
+ metadata.gz: f3347a25842917fe88b1ff45b1b93ee9db85e0dda681bbe290930cc5ab968291
4
+ data.tar.gz: f714b13d8ec320485e8861aecec79d54af6fb32e495ce6ea8ac614c815df8a60
5
5
  SHA512:
6
- metadata.gz: 1a845fc6a1a4228598a8b2c1f4f0b83e269075ad3433ebb9596c17c866650dccf9ddec58f233d3a8e2cdc0ee8232e583206370897c2b585a4b76d8896c2901e9
7
- data.tar.gz: 75b487e53ab3b1b30918dc3adae0e3039d280c53963863145fbcdc49a3dc0c345948735cd4e1e9239dc4b2f5c09b3d8a4b8cbe09a775d436ff9980adaefb2a07
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:
@@ -0,0 +1,9 @@
1
+ ---
2
+ bs:
3
+ decidim:
4
+ components:
5
+ dummy:
6
+ settings:
7
+ step:
8
+ endorsements_blocked: Podržavanja su onemogućena
9
+ endorsements_enabled: Podržavanja su omogućena
@@ -4,8 +4,8 @@ eu:
4
4
  attributes:
5
5
  dummy_resource:
6
6
  created_at: Sortua
7
- decidim_scope_id: Esparrua
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: Erabiltzaile honek %{score} proba egin ditu.
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!
@@ -15,22 +15,26 @@ sv:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
- guided: Guidad ingång
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: Ett val
24
- b: B val
25
- c: C val
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: Instämmanden är blockerade
32
- endorsements_enabled: Instämmanden tillåtna
33
- readonly_step_attribute: Skrivskyddade steg attribut
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
@@ -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
 
@@ -10,6 +10,7 @@ module Decidim
10
10
  #
11
11
  def relogin_as(user, scope: :user)
12
12
  logout scope
13
+ sleep 0.5
13
14
 
14
15
  login_as user, scope:
15
16
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-dev version.
5
5
  module Dev
6
6
  def self.version
7
- "0.28.3"
7
+ "0.28.5"
8
8
  end
9
9
  end
10
10
  end
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.3
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: 2024-09-10 00:00:00.000000000 Z
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.3
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.3
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/