decidim-dev 0.28.0.rc4 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/commands/decidim/{dummy_resources → dev}/create_dummy_resource.rb +1 -1
- data/app/controllers/decidim/{dummy_resources → dev}/dummy_resources_controller.rb +2 -2
- data/app/events/decidim/{dummy_resources → dev}/dummy_resource_event.rb +1 -1
- data/app/forms/decidim/{dummy_resources → dev}/dummy_resource_form.rb +1 -1
- data/app/jobs/decidim/{dummy_resources → dev}/hide_all_created_by_author_job.rb +2 -2
- data/app/mailers/decidim/{dummy_resources → dev}/dummy_resource_mailer.rb +1 -1
- data/app/models/decidim/{dummy_resources → dev}/application_record.rb +1 -1
- data/app/models/decidim/{dummy_resources → dev}/coauthorable_dummy_resource.rb +1 -1
- data/app/models/decidim/{dummy_resources → dev}/dummy_resource.rb +8 -8
- data/app/models/decidim/{dummy_resources → dev}/nested_dummy_resource.rb +1 -1
- data/app/presenters/decidim/{dummy_resources → dev}/official_author_presenter.rb +1 -1
- data/app/serializers/decidim/{dummy_resources → dev}/dummy_serializer.rb +1 -1
- data/config/environment.rb +3 -0
- data/config/locales/pt-BR.yml +6 -0
- data/lib/decidim/{dummy_resources → dev}/admin.rb +1 -1
- data/lib/decidim/{dummy_resources → dev}/admin_engine.rb +3 -3
- data/lib/decidim/{dummy_resources → dev}/component.rb +7 -7
- data/lib/decidim/dev/engine.rb +18 -1
- data/lib/decidim/dev/test/base_spec_helper.rb +1 -0
- data/lib/decidim/dev/test/factories.rb +48 -0
- data/lib/decidim/dev/test/rspec_support/component.rb +7 -7
- data/lib/decidim/dev/test/rspec_support/imports_controller_shared_examples.rb +2 -2
- data/lib/decidim/dev/test/spec_helper.rb +1 -1
- data/lib/decidim/dev/version.rb +1 -1
- data/lib/decidim/dev.rb +21 -8
- data/lib/decidim-dev.rb +1 -1
- metadata +25 -26
- data/lib/decidim/dummy_resources/engine.rb +0 -28
- data/lib/decidim/dummy_resources.rb +0 -20
- /data/app/views/decidim/{dummy_resources → dev}/dummy_resources/foo.html.erb +0 -0
- /data/app/views/decidim/{dummy_resources → dev}/dummy_resources/show.html.erb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d771cf6c51fc798d8cbf1d938245c3f52e67cb8404f666e044250a93e92210c7
|
4
|
+
data.tar.gz: b5dec2927ed2a0e397e9d5c0a9b303a27add20a71508229812c7ca0e5b4a982e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 166cf877812db4d03c99d2a23df8d449800dadca22e05b0de418d3fad4f7e56202fcf730c00f753e73862eef11a7aa372fe9dec2cbf0404aee29703458b70cd2
|
7
|
+
data.tar.gz: 2cbeeb10ec359e66619fdb5780bf5643c7c9de663da470b50102e84c0a99e83b51d8ef7a1b3d2133aa99baaaa5f2c2500760f98dda31914d50d1ae179fd10d37
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Decidim
|
4
|
-
module
|
4
|
+
module Dev
|
5
5
|
class DummyResourcesController < Decidim::Components::BaseController
|
6
6
|
helper Decidim::Comments::CommentsHelper
|
7
7
|
include Decidim::TranslatableAttributes
|
8
8
|
|
9
9
|
def show
|
10
|
-
@commentable =
|
10
|
+
@commentable = Dev::DummyResource.find(params[:id])
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Decidim
|
4
|
-
module
|
4
|
+
module Dev
|
5
5
|
class HideAllCreatedByAuthorJob < Decidim::HideAllCreatedByAuthorJob
|
6
6
|
protected
|
7
7
|
|
8
8
|
def base_query
|
9
|
-
Decidim::
|
9
|
+
Decidim::Dev::DummyResource.not_hidden.where(author:)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Decidim
|
4
|
-
module
|
4
|
+
module Dev
|
5
5
|
class DummyResource < ApplicationRecord
|
6
6
|
include HasComponent
|
7
7
|
include HasReference
|
@@ -35,7 +35,7 @@ module Decidim
|
|
35
35
|
|
36
36
|
amendable(
|
37
37
|
fields: [:title],
|
38
|
-
form: "Decidim::
|
38
|
+
form: "Decidim::Dev::DummyResourceForm"
|
39
39
|
)
|
40
40
|
|
41
41
|
component_manifest_name "dummy"
|
@@ -80,12 +80,12 @@ module Decidim
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def self.newsletter_participant_ids(component)
|
83
|
-
authors_ids = Decidim::
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
commentators_ids = Decidim::Comments::Comment.user_commentators_ids_in(Decidim::
|
83
|
+
authors_ids = Decidim::Dev::DummyResource.where(component:)
|
84
|
+
.where(decidim_author_type: Decidim::UserBaseEntity.name)
|
85
|
+
.where.not(author: nil)
|
86
|
+
.group(:decidim_author_id)
|
87
|
+
.pluck(:decidim_author_id)
|
88
|
+
commentators_ids = Decidim::Comments::Comment.user_commentators_ids_in(Decidim::Dev::DummyResource.where(component:))
|
89
89
|
(authors_ids + commentators_ids).flatten.compact.uniq
|
90
90
|
end
|
91
91
|
end
|
data/config/locales/pt-BR.yml
CHANGED
@@ -15,6 +15,12 @@ pt-BR:
|
|
15
15
|
dummy:
|
16
16
|
settings:
|
17
17
|
global:
|
18
|
+
guided: Entrada guiada
|
19
|
+
guided_help: Texto de ajuda
|
20
|
+
guided_readonly: Entrada desabilitada
|
21
|
+
guided_rich: Entrada de rich text guiada
|
22
|
+
guided_rich_help_html: HTML <strong>ajuda</strong> texto
|
23
|
+
guided_rich_readonly_html: HTML <strong>ajuda</strong> texto para entrada desativada
|
18
24
|
readonly_attribute: Atributo somente leitura
|
19
25
|
test: Teste A
|
20
26
|
test_choices:
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Decidim
|
4
|
-
module
|
4
|
+
module Dev
|
5
5
|
class AdminEngine < Rails::Engine
|
6
6
|
engine_name "dummy_admin"
|
7
7
|
|
@@ -16,7 +16,7 @@ module Decidim
|
|
16
16
|
initializer "dummy_admin.imports" do
|
17
17
|
class ::DummyCreator < Decidim::Admin::Import::Creator
|
18
18
|
def self.resource_klass
|
19
|
-
Decidim::
|
19
|
+
Decidim::Dev::DummyResource
|
20
20
|
end
|
21
21
|
|
22
22
|
def produce
|
@@ -26,7 +26,7 @@ module Decidim
|
|
26
26
|
private
|
27
27
|
|
28
28
|
def resource
|
29
|
-
@resource ||= Decidim::
|
29
|
+
@resource ||= Decidim::Dev::DummyResource.new(
|
30
30
|
title: { en: "Dummy" },
|
31
31
|
author: context[:current_user],
|
32
32
|
component:
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
Decidim.register_component(:dummy) do |component|
|
4
|
-
component.engine = Decidim::
|
5
|
-
component.admin_engine = Decidim::
|
4
|
+
component.engine = Decidim::Dev::Engine
|
5
|
+
component.admin_engine = Decidim::Dev::AdminEngine
|
6
6
|
component.icon = "media/images/decidim_dev_dummy.svg"
|
7
7
|
|
8
8
|
component.actions = %w(foo bar)
|
9
9
|
|
10
|
-
component.newsletter_participant_entities = ["Decidim::
|
10
|
+
component.newsletter_participant_entities = ["Decidim::Dev::DummyResource"]
|
11
11
|
|
12
12
|
component.settings(:global) do |settings|
|
13
13
|
settings.attribute :scopes_enabled, type: :boolean, default: false
|
@@ -39,7 +39,7 @@ Decidim.register_component(:dummy) do |component|
|
|
39
39
|
|
40
40
|
component.register_resource(:dummy_resource) do |resource|
|
41
41
|
resource.name = :dummy
|
42
|
-
resource.model_class_name = "Decidim::
|
42
|
+
resource.model_class_name = "Decidim::Dev::DummyResource"
|
43
43
|
resource.template = "decidim/dummy_resource/linked_dummys"
|
44
44
|
resource.actions = %w(foo)
|
45
45
|
resource.searchable = true
|
@@ -47,12 +47,12 @@ Decidim.register_component(:dummy) do |component|
|
|
47
47
|
|
48
48
|
component.register_resource(:nested_dummy_resource) do |resource|
|
49
49
|
resource.name = :nested_dummy
|
50
|
-
resource.model_class_name = "Decidim::
|
50
|
+
resource.model_class_name = "Decidim::Dev::NestedDummyResource"
|
51
51
|
end
|
52
52
|
|
53
53
|
component.register_resource(:coauthorable_dummy_resource) do |resource|
|
54
54
|
resource.name = :coauthorable_dummy
|
55
|
-
resource.model_class_name = "Decidim::
|
55
|
+
resource.model_class_name = "Decidim::Dev::CoauthorableDummyResource"
|
56
56
|
resource.template = "decidim/coauthorabledummy_resource/linked_dummys"
|
57
57
|
resource.actions = %w(foo-coauthorable)
|
58
58
|
resource.searchable = false
|
@@ -71,7 +71,7 @@ Decidim.register_component(:dummy) do |component|
|
|
71
71
|
[1, 2, 3]
|
72
72
|
end
|
73
73
|
|
74
|
-
exports.serializer Decidim::
|
74
|
+
exports.serializer Decidim::Dev::DummySerializer
|
75
75
|
end
|
76
76
|
|
77
77
|
component.imports :dummies do |imports|
|
data/lib/decidim/dev/engine.rb
CHANGED
@@ -7,16 +7,33 @@ module Decidim
|
|
7
7
|
isolate_namespace Decidim::Dev
|
8
8
|
engine_name "decidim_dev"
|
9
9
|
|
10
|
+
routes do
|
11
|
+
root to: proc { [200, {}, ["DUMMY ENGINE"]] }
|
12
|
+
|
13
|
+
resources :dummy_resources do
|
14
|
+
resources :nested_dummy_resources
|
15
|
+
get :foo, on: :member
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
10
19
|
initializer "decidim_dev.tools" do
|
11
20
|
# Disable if the boost performance mode is enabled
|
12
21
|
next if Rails.application.config.try(:boost_performance)
|
13
22
|
|
14
|
-
ActiveSupport.on_load(:action_controller) { include Decidim::Dev::NeedsDevelopmentTools }
|
23
|
+
ActiveSupport.on_load(:action_controller) { include Decidim::Dev::NeedsDevelopmentTools } if Rails.env.development? || ENV.fetch("DECIDIM_DEV_ENGINE", nil)
|
15
24
|
end
|
16
25
|
|
17
26
|
initializer "decidim_dev.webpacker.assets_path" do
|
18
27
|
Decidim.register_assets_path File.expand_path("app/packs", root)
|
19
28
|
end
|
29
|
+
|
30
|
+
initializer "decidim_dev.moderation_content" do
|
31
|
+
config.to_prepare do
|
32
|
+
ActiveSupport::Notifications.subscribe("decidim.admin.block_user:after") do |_event_name, data|
|
33
|
+
Decidim::Dev::HideAllCreatedByAuthorJob.perform_later(**data)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
20
37
|
end
|
21
38
|
end
|
22
39
|
end
|
@@ -7,4 +7,52 @@ FactoryBot.define do
|
|
7
7
|
name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :surveys).i18n_name }
|
8
8
|
manifest_name { :dummy }
|
9
9
|
end
|
10
|
+
|
11
|
+
factory :dummy_resource, class: "Decidim::Dev::DummyResource" do
|
12
|
+
transient do
|
13
|
+
users { nil }
|
14
|
+
# user_groups correspondence to users is by sorting order
|
15
|
+
user_groups { [] }
|
16
|
+
end
|
17
|
+
title { Decidim::Faker::Localized.localized { generate(:name) } }
|
18
|
+
component { create(:component, manifest_name: "dummy") }
|
19
|
+
author { create(:user, :confirmed, organization: component.organization) }
|
20
|
+
scope { create(:scope, organization: component.organization) }
|
21
|
+
|
22
|
+
trait :published do
|
23
|
+
published_at { Time.current }
|
24
|
+
end
|
25
|
+
|
26
|
+
trait :with_endorsements do
|
27
|
+
after :create do |resource|
|
28
|
+
5.times.collect do
|
29
|
+
create(:endorsement, resource:, author: build(:user, organization: resource.component.organization))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
factory :nested_dummy_resource, class: "Decidim::Dev::NestedDummyResource" do
|
36
|
+
title { generate(:name) }
|
37
|
+
dummy_resource { create(:dummy_resource) }
|
38
|
+
end
|
39
|
+
|
40
|
+
factory :coauthorable_dummy_resource, class: "Decidim::Dev::CoauthorableDummyResource" do
|
41
|
+
title { generate(:name) }
|
42
|
+
component { create(:component, manifest_name: "dummy") }
|
43
|
+
|
44
|
+
transient do
|
45
|
+
authors_list { [create(:user, organization: component.organization)] }
|
46
|
+
end
|
47
|
+
|
48
|
+
after :build do |resource, evaluator|
|
49
|
+
evaluator.authors_list.each do |coauthor|
|
50
|
+
resource.coauthorships << if coauthor.is_a?(Decidim::UserGroup)
|
51
|
+
build(:coauthorship, author: coauthor.users.first, user_group: coauthor, coauthorable: resource, organization: evaluator.component.organization)
|
52
|
+
else
|
53
|
+
build(:coauthorship, author: coauthor, coauthorable: resource, organization: evaluator.component.organization)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
10
58
|
end
|
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
require "decidim/component_validator"
|
4
4
|
require "decidim/comments"
|
5
|
-
require "decidim/
|
5
|
+
require "decidim/dev"
|
6
6
|
|
7
7
|
RSpec.configure do |config|
|
8
8
|
config.before(:suite) do
|
9
9
|
ActiveRecord::Migration.suppress_messages do
|
10
|
-
unless ActiveRecord::Base.connection.data_source_exists?("
|
11
|
-
ActiveRecord::Migration.create_table :
|
10
|
+
unless ActiveRecord::Base.connection.data_source_exists?("decidim_dev_dummy_resources")
|
11
|
+
ActiveRecord::Migration.create_table :decidim_dev_dummy_resources do |t|
|
12
12
|
t.jsonb :translatable_text
|
13
13
|
t.jsonb :title
|
14
14
|
t.string :body
|
@@ -32,8 +32,8 @@ RSpec.configure do |config|
|
|
32
32
|
t.timestamps
|
33
33
|
end
|
34
34
|
end
|
35
|
-
unless ActiveRecord::Base.connection.data_source_exists?("
|
36
|
-
ActiveRecord::Migration.create_table :
|
35
|
+
unless ActiveRecord::Base.connection.data_source_exists?("decidim_dev_nested_dummy_resources")
|
36
|
+
ActiveRecord::Migration.create_table :decidim_dev_nested_dummy_resources do |t|
|
37
37
|
t.jsonb :translatable_text
|
38
38
|
t.string :title
|
39
39
|
|
@@ -41,8 +41,8 @@ RSpec.configure do |config|
|
|
41
41
|
t.timestamps
|
42
42
|
end
|
43
43
|
end
|
44
|
-
unless ActiveRecord::Base.connection.data_source_exists?("
|
45
|
-
ActiveRecord::Migration.create_table :
|
44
|
+
unless ActiveRecord::Base.connection.data_source_exists?("decidim_dev_coauthorable_dummy_resources")
|
45
|
+
ActiveRecord::Migration.create_table :decidim_dev_coauthorable_dummy_resources do |t|
|
46
46
|
t.jsonb :translatable_text
|
47
47
|
t.string :title
|
48
48
|
t.string :body
|
@@ -31,8 +31,8 @@ shared_examples "admin imports controller" do
|
|
31
31
|
expect(response).to have_http_status(:found)
|
32
32
|
expect(flash[:notice]).not_to be_empty
|
33
33
|
|
34
|
-
expect(Decidim::
|
35
|
-
Decidim::
|
34
|
+
expect(Decidim::Dev::DummyResource.count).to eq(3)
|
35
|
+
Decidim::Dev::DummyResource.find_each do |dummy|
|
36
36
|
expect(dummy.title).to eq("en" => "Dummy")
|
37
37
|
expect(dummy.author).to eq(user)
|
38
38
|
expect(dummy.component).to eq(component)
|
@@ -13,7 +13,7 @@ require "decidim/dev/test/w3c_rspec_validators_overrides"
|
|
13
13
|
# in ./rspec_support/ and its subdirectories.
|
14
14
|
Dir["#{__dir__}/rspec_support/**/*.rb"].each { |f| require f }
|
15
15
|
|
16
|
-
|
16
|
+
require "decidim/dev/test/factories"
|
17
17
|
|
18
18
|
RSpec.configure do |config|
|
19
19
|
config.color = true
|
data/lib/decidim/dev/version.rb
CHANGED
data/lib/decidim/dev.rb
CHANGED
@@ -2,22 +2,35 @@
|
|
2
2
|
|
3
3
|
require "decidim/dev/railtie"
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
#
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
require "decidim/dev/admin"
|
6
|
+
require "decidim/dev/engine"
|
7
|
+
require "decidim/dev/admin_engine"
|
8
|
+
# We shall not load the component here, as it will complain there is no method register_component
|
9
|
+
# for Decidim module. To fix that we need to require 'decidim/core', which will cause a major
|
10
|
+
# performance setback, as this file is usually the first request in "spec_helpers".
|
11
|
+
# We load dev component by requiring it later in the stack within lib/decidim/dev/test/base_spec_helper,
|
12
|
+
# right after decidim/core is required
|
13
|
+
# This comment and the below line is added to preserve consistency across all modules supplied.
|
14
|
+
# Also, to avoid further headaches :)
|
15
|
+
# require "decidim/dev/component"
|
13
16
|
|
14
17
|
module Decidim
|
15
18
|
# Decidim::Dev holds all the convenience logic and libraries to be able to
|
16
19
|
# create external libraries that create test apps and test themselves against
|
17
20
|
# them.
|
18
21
|
module Dev
|
22
|
+
include ActiveSupport::Configurable
|
19
23
|
autoload :DummyTranslator, "decidim/dev/dummy_translator"
|
20
24
|
|
25
|
+
# Settings needed to compare emendations in Decidim::SimilarEmendations
|
26
|
+
config_accessor :similarity_threshold do
|
27
|
+
0.25
|
28
|
+
end
|
29
|
+
|
30
|
+
config_accessor :similarity_limit do
|
31
|
+
10
|
32
|
+
end
|
33
|
+
|
21
34
|
# Public: Finds an asset.
|
22
35
|
#
|
23
36
|
# Returns a String with the path for a particular asset.
|
data/lib/decidim-dev.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.0
|
4
|
+
version: 0.28.0
|
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: 2023-12-
|
13
|
+
date: 2023-12-20 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.0
|
35
|
+
version: 0.28.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.28.0
|
42
|
+
version: 0.28.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: factory_bot_rails
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -427,17 +427,17 @@ extra_rdoc_files: []
|
|
427
427
|
files:
|
428
428
|
- README.md
|
429
429
|
- Rakefile
|
430
|
-
- app/commands/decidim/
|
430
|
+
- app/commands/decidim/dev/create_dummy_resource.rb
|
431
431
|
- app/controllers/concerns/decidim/dev/needs_development_tools.rb
|
432
|
-
- app/controllers/decidim/
|
433
|
-
- app/events/decidim/
|
434
|
-
- app/forms/decidim/
|
435
|
-
- app/jobs/decidim/
|
436
|
-
- app/mailers/decidim/
|
437
|
-
- app/models/decidim/
|
438
|
-
- app/models/decidim/
|
439
|
-
- app/models/decidim/
|
440
|
-
- app/models/decidim/
|
432
|
+
- app/controllers/decidim/dev/dummy_resources_controller.rb
|
433
|
+
- app/events/decidim/dev/dummy_resource_event.rb
|
434
|
+
- app/forms/decidim/dev/dummy_resource_form.rb
|
435
|
+
- app/jobs/decidim/dev/hide_all_created_by_author_job.rb
|
436
|
+
- app/mailers/decidim/dev/dummy_resource_mailer.rb
|
437
|
+
- app/models/decidim/dev/application_record.rb
|
438
|
+
- app/models/decidim/dev/coauthorable_dummy_resource.rb
|
439
|
+
- app/models/decidim/dev/dummy_resource.rb
|
440
|
+
- app/models/decidim/dev/nested_dummy_resource.rb
|
441
441
|
- app/packs/entrypoints/decidim_dev.js
|
442
442
|
- app/packs/entrypoints/decidim_dev.scss
|
443
443
|
- app/packs/entrypoints/decidim_dev_test_custom_map.js
|
@@ -448,12 +448,13 @@ files:
|
|
448
448
|
- app/packs/stylesheets/decidim/dev.scss
|
449
449
|
- app/packs/stylesheets/decidim/dev/_accessibility.scss
|
450
450
|
- app/packs/stylesheets/decidim/dev/_map.scss
|
451
|
-
- app/presenters/decidim/
|
452
|
-
- app/serializers/decidim/
|
451
|
+
- app/presenters/decidim/dev/official_author_presenter.rb
|
452
|
+
- app/serializers/decidim/dev/dummy_serializer.rb
|
453
|
+
- app/views/decidim/dev/dummy_resources/foo.html.erb
|
454
|
+
- app/views/decidim/dev/dummy_resources/show.html.erb
|
453
455
|
- app/views/decidim/dummy_resource/_linked_dummys.html.erb
|
454
|
-
- app/views/decidim/dummy_resources/dummy_resources/foo.html.erb
|
455
|
-
- app/views/decidim/dummy_resources/dummy_resources/show.html.erb
|
456
456
|
- config/assets.rb
|
457
|
+
- config/environment.rb
|
457
458
|
- config/locales/am-ET.yml
|
458
459
|
- config/locales/ar-SA.yml
|
459
460
|
- config/locales/ar.yml
|
@@ -540,6 +541,8 @@ files:
|
|
540
541
|
- config/rubocop/ruby.yml
|
541
542
|
- lib/decidim-dev.rb
|
542
543
|
- lib/decidim/dev.rb
|
544
|
+
- lib/decidim/dev/admin.rb
|
545
|
+
- lib/decidim/dev/admin_engine.rb
|
543
546
|
- lib/decidim/dev/assets/5000x5000.png
|
544
547
|
- lib/decidim/dev/assets/Exampledocument.pdf
|
545
548
|
- lib/decidim/dev/assets/assemblies.json
|
@@ -591,6 +594,7 @@ files:
|
|
591
594
|
- lib/decidim/dev/assets/test_excel.xlsx
|
592
595
|
- lib/decidim/dev/assets/verify_user_groups.csv
|
593
596
|
- lib/decidim/dev/common_rake.rb
|
597
|
+
- lib/decidim/dev/component.rb
|
594
598
|
- lib/decidim/dev/dummy_translator.rb
|
595
599
|
- lib/decidim/dev/engine.rb
|
596
600
|
- lib/decidim/dev/railtie.rb
|
@@ -649,11 +653,6 @@ files:
|
|
649
653
|
- lib/decidim/dev/test/spec_helper.rb
|
650
654
|
- lib/decidim/dev/test/w3c_rspec_validators_overrides.rb
|
651
655
|
- lib/decidim/dev/version.rb
|
652
|
-
- lib/decidim/dummy_resources.rb
|
653
|
-
- lib/decidim/dummy_resources/admin.rb
|
654
|
-
- lib/decidim/dummy_resources/admin_engine.rb
|
655
|
-
- lib/decidim/dummy_resources/component.rb
|
656
|
-
- lib/decidim/dummy_resources/engine.rb
|
657
656
|
- lib/tasks/generators.rake
|
658
657
|
- lib/tasks/lighthouse_report.rake
|
659
658
|
- lib/tasks/locale_checker.rake
|
@@ -678,11 +677,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
678
677
|
version: '3.1'
|
679
678
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
680
679
|
requirements:
|
681
|
-
- - "
|
680
|
+
- - ">="
|
682
681
|
- !ruby/object:Gem::Version
|
683
|
-
version:
|
682
|
+
version: '0'
|
684
683
|
requirements: []
|
685
|
-
rubygems_version: 3.4.
|
684
|
+
rubygems_version: 3.4.22
|
686
685
|
signing_key:
|
687
686
|
specification_version: 4
|
688
687
|
summary: Decidim dev tools
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module DummyResources
|
5
|
-
# Dummy engine to be able to test components.
|
6
|
-
class DummyEngine < Rails::Engine
|
7
|
-
engine_name "dummy"
|
8
|
-
isolate_namespace Decidim::DummyResources
|
9
|
-
|
10
|
-
routes do
|
11
|
-
root to: proc { [200, {}, ["DUMMY ENGINE"]] }
|
12
|
-
|
13
|
-
resources :dummy_resources do
|
14
|
-
resources :nested_dummy_resources
|
15
|
-
get :foo, on: :member
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
initializer "dummy.moderation_content" do
|
20
|
-
config.to_prepare do
|
21
|
-
ActiveSupport::Notifications.subscribe("decidim.admin.block_user:after") do |_event_name, data|
|
22
|
-
Decidim::DummyResources::HideAllCreatedByAuthorJob.perform_later(**data)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "decidim/dummy_resources/admin"
|
4
|
-
require "decidim/dummy_resources/engine"
|
5
|
-
require "decidim/dummy_resources/admin_engine"
|
6
|
-
require "decidim/dummy_resources/component"
|
7
|
-
|
8
|
-
module Decidim
|
9
|
-
module DummyResources
|
10
|
-
include ActiveSupport::Configurable
|
11
|
-
|
12
|
-
# Settings needed to compare emendations in Decidim::SimilarEmendations
|
13
|
-
config_accessor :similarity_threshold do
|
14
|
-
0.25
|
15
|
-
end
|
16
|
-
config_accessor :similarity_limit do
|
17
|
-
10
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
File without changes
|
File without changes
|