decidim-debates 0.27.4 → 0.27.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/decidim/debates/widgets_controller.rb +11 -1
- data/app/events/decidim/debates/create_debate_event.rb +0 -14
- data/app/permissions/decidim/debates/permissions.rb +6 -0
- data/app/views/decidim/debates/debates/_debates.html.erb +12 -9
- data/config/locales/ar.yml +1 -7
- data/config/locales/bg.yml +30 -1
- data/config/locales/ca.yml +9 -6
- data/config/locales/cs.yml +8 -5
- data/config/locales/de.yml +10 -7
- data/config/locales/el.yml +0 -7
- data/config/locales/en.yml +7 -4
- data/config/locales/es-MX.yml +7 -4
- data/config/locales/es-PY.yml +7 -4
- data/config/locales/es.yml +10 -7
- data/config/locales/eu.yml +42 -39
- data/config/locales/fi-plain.yml +7 -4
- data/config/locales/fi.yml +7 -4
- data/config/locales/fr-CA.yml +8 -5
- data/config/locales/fr.yml +8 -5
- data/config/locales/gl.yml +0 -7
- data/config/locales/he-IL.yml +1 -0
- data/config/locales/hu.yml +3 -10
- data/config/locales/id-ID.yml +0 -7
- data/config/locales/is-IS.yml +0 -6
- data/config/locales/it.yml +1 -8
- data/config/locales/ja.yml +8 -5
- data/config/locales/lb.yml +4 -7
- data/config/locales/lt.yml +1 -7
- data/config/locales/lv.yml +0 -6
- data/config/locales/nl.yml +0 -7
- data/config/locales/no.yml +1 -8
- data/config/locales/pl.yml +7 -6
- data/config/locales/pt-BR.yml +8 -7
- data/config/locales/pt.yml +1 -8
- data/config/locales/ro-RO.yml +0 -7
- data/config/locales/ru.yml +0 -3
- data/config/locales/sk.yml +0 -6
- data/config/locales/sq-AL.yml +1 -0
- data/config/locales/sv.yml +0 -7
- data/config/locales/th-TH.yml +1 -0
- data/config/locales/tr-TR.yml +7 -7
- data/config/locales/uk.yml +0 -3
- data/config/locales/zh-CN.yml +0 -7
- data/config/locales/zh-TW.yml +0 -7
- data/decidim-debates.gemspec +32 -0
- data/lib/decidim/debates/component.rb +1 -1
- data/lib/decidim/debates/test/factories.rb +16 -18
- data/lib/decidim/debates/version.rb +1 -1
- metadata +19 -16
- data/config/environment.rb +0 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
4
|
+
|
5
|
+
require "decidim/debates/version"
|
6
|
+
|
7
|
+
# Describe your gem and declare its dependencies:
|
8
|
+
Gem::Specification.new do |s|
|
9
|
+
s.version = Decidim::Debates.version
|
10
|
+
s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva", "Genis Matutes Pujol"]
|
11
|
+
s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com", "genis.matutes@gmail.com"]
|
12
|
+
s.license = "AGPL-3.0"
|
13
|
+
s.homepage = "https://github.com/decidim/decidim"
|
14
|
+
s.required_ruby_version = "~> 3.0.0"
|
15
|
+
|
16
|
+
s.name = "decidim-debates"
|
17
|
+
s.summary = "Decidim debates module"
|
18
|
+
s.description = "A debates component for decidim's participatory spaces."
|
19
|
+
|
20
|
+
s.files = Dir.chdir(__dir__) do
|
21
|
+
`git ls-files -z`.split("\x0").select do |f|
|
22
|
+
(File.expand_path(f) == __FILE__) ||
|
23
|
+
f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
s.add_dependency "decidim-comments", Decidim::Debates.version
|
28
|
+
s.add_dependency "decidim-core", Decidim::Debates.version
|
29
|
+
|
30
|
+
s.add_development_dependency "decidim-admin", Decidim::Debates.version
|
31
|
+
s.add_development_dependency "decidim-dev", Decidim::Debates.version
|
32
|
+
end
|
@@ -21,7 +21,7 @@ Decidim.register_component(:debates) do |component|
|
|
21
21
|
settings.attribute :scopes_enabled, type: :boolean, default: false
|
22
22
|
settings.attribute :scope_id, type: :scope
|
23
23
|
settings.attribute :comments_enabled, type: :boolean, default: true
|
24
|
-
settings.attribute :comments_max_length, type: :integer, required:
|
24
|
+
settings.attribute :comments_max_length, type: :integer, required: true
|
25
25
|
settings.attribute :announcement, type: :text, translated: true, editor: true
|
26
26
|
end
|
27
27
|
|
@@ -10,17 +10,11 @@ FactoryBot.define do
|
|
10
10
|
skip_injection { false }
|
11
11
|
end
|
12
12
|
|
13
|
-
title
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|
20
|
-
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_debate_title } }
|
21
|
-
information_updates { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_debate_title } }
|
22
|
-
instructions { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_debate_title } }
|
23
|
-
component { build(:component, manifest_name: "debates") }
|
13
|
+
title { generate_localized_title(:debate_title, skip_injection: skip_injection) }
|
14
|
+
description { generate_localized_description(:debate_description, skip_injection: skip_injection) }
|
15
|
+
information_updates { generate_localized_description(:debate_information_updates, skip_injection: skip_injection) }
|
16
|
+
instructions { generate_localized_description(:debate_instructions, skip_injection: skip_injection) }
|
17
|
+
component { build(:debates_component, skip_injection: skip_injection) }
|
24
18
|
author { component.try(:organization) }
|
25
19
|
|
26
20
|
trait :open_ama do
|
@@ -32,7 +26,7 @@ FactoryBot.define do
|
|
32
26
|
start_time { nil }
|
33
27
|
end_time { nil }
|
34
28
|
author do
|
35
|
-
build(:user, organization: component.organization) if component
|
29
|
+
build(:user, organization: component.organization, skip_injection: skip_injection) if component
|
36
30
|
end
|
37
31
|
end
|
38
32
|
|
@@ -42,17 +36,17 @@ FactoryBot.define do
|
|
42
36
|
|
43
37
|
trait :user_group_author do
|
44
38
|
author do
|
45
|
-
create(:user, organization: component.organization) if component
|
39
|
+
create(:user, organization: component.organization, skip_injection: skip_injection) if component
|
46
40
|
end
|
47
41
|
|
48
42
|
user_group do
|
49
|
-
create(:user_group, :verified, organization: component.organization, users: [author]) if component
|
43
|
+
create(:user_group, :verified, organization: component.organization, users: [author], skip_injection: skip_injection) if component
|
50
44
|
end
|
51
45
|
end
|
52
46
|
|
53
47
|
trait :closed do
|
54
48
|
closed_at { Time.current }
|
55
|
-
conclusions {
|
49
|
+
conclusions { generate_localized_description(:debate_conclusions, skip_injection: skip_injection) }
|
56
50
|
end
|
57
51
|
|
58
52
|
after(:build) do |debate|
|
@@ -62,12 +56,16 @@ FactoryBot.define do
|
|
62
56
|
end
|
63
57
|
|
64
58
|
factory :debates_component, parent: :component do
|
65
|
-
|
59
|
+
transient do
|
60
|
+
skip_injection { false }
|
61
|
+
end
|
62
|
+
name { generate_component_name(participatory_space.organization.available_locales, :debates, skip_injection: skip_injection) }
|
66
63
|
manifest_name { :debates }
|
67
|
-
participatory_space { create(:participatory_process, :with_steps, organization: organization) }
|
64
|
+
participatory_space { create(:participatory_process, :with_steps, organization: organization, skip_injection: skip_injection) }
|
68
65
|
settings do
|
69
66
|
{
|
70
|
-
comments_enabled: true
|
67
|
+
comments_enabled: true,
|
68
|
+
comments_max_length: organization.comments_max_length
|
71
69
|
}
|
72
70
|
end
|
73
71
|
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-debates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.27.
|
4
|
+
version: 0.27.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
8
8
|
- Marc Riera Casals
|
9
9
|
- Oriol Gual Oliva
|
10
10
|
- Genis Matutes Pujol
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2024-04-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: decidim-comments
|
@@ -19,56 +19,56 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.27.
|
22
|
+
version: 0.27.6
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.27.
|
29
|
+
version: 0.27.6
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: decidim-core
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - '='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.27.
|
36
|
+
version: 0.27.6
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - '='
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.27.
|
43
|
+
version: 0.27.6
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: decidim-admin
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
48
|
- - '='
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.27.
|
50
|
+
version: 0.27.6
|
51
51
|
type: :development
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - '='
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 0.27.
|
57
|
+
version: 0.27.6
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: decidim-dev
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
62
|
- - '='
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 0.27.
|
64
|
+
version: 0.27.6
|
65
65
|
type: :development
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - '='
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: 0.27.
|
71
|
+
version: 0.27.6
|
72
72
|
description: A debates component for decidim's participatory spaces.
|
73
73
|
email:
|
74
74
|
- josepjaume@gmail.com
|
@@ -157,7 +157,6 @@ files:
|
|
157
157
|
- app/views/decidim/debates/versions/index.html.erb
|
158
158
|
- app/views/decidim/debates/versions/show.html.erb
|
159
159
|
- config/assets.rb
|
160
|
-
- config/environment.rb
|
161
160
|
- config/locales/am-ET.yml
|
162
161
|
- config/locales/ar-SA.yml
|
163
162
|
- config/locales/ar.yml
|
@@ -190,6 +189,7 @@ files:
|
|
190
189
|
- config/locales/ga-IE.yml
|
191
190
|
- config/locales/gl.yml
|
192
191
|
- config/locales/gn-PY.yml
|
192
|
+
- config/locales/he-IL.yml
|
193
193
|
- config/locales/hr-HR.yml
|
194
194
|
- config/locales/hr.yml
|
195
195
|
- config/locales/hu.yml
|
@@ -224,9 +224,11 @@ files:
|
|
224
224
|
- config/locales/sk.yml
|
225
225
|
- config/locales/sl.yml
|
226
226
|
- config/locales/so-SO.yml
|
227
|
+
- config/locales/sq-AL.yml
|
227
228
|
- config/locales/sr-CS.yml
|
228
229
|
- config/locales/sv.yml
|
229
230
|
- config/locales/sw-KE.yml
|
231
|
+
- config/locales/th-TH.yml
|
230
232
|
- config/locales/ti-ER.yml
|
231
233
|
- config/locales/tr-TR.yml
|
232
234
|
- config/locales/uk.yml
|
@@ -255,6 +257,7 @@ files:
|
|
255
257
|
- db/migrate/20210125101735_revert_archive_debates.rb
|
256
258
|
- db/migrate/20210310120652_add_followable_counter_cache_to_debates.rb
|
257
259
|
- db/migrate/20210519201932_add_comments_availability_columns_to_debates_table.rb
|
260
|
+
- decidim-debates.gemspec
|
258
261
|
- lib/decidim/api/debate_type.rb
|
259
262
|
- lib/decidim/api/debates_type.rb
|
260
263
|
- lib/decidim/debates.rb
|
@@ -269,15 +272,15 @@ homepage: https://github.com/decidim/decidim
|
|
269
272
|
licenses:
|
270
273
|
- AGPL-3.0
|
271
274
|
metadata: {}
|
272
|
-
post_install_message:
|
275
|
+
post_install_message:
|
273
276
|
rdoc_options: []
|
274
277
|
require_paths:
|
275
278
|
- lib
|
276
279
|
required_ruby_version: !ruby/object:Gem::Requirement
|
277
280
|
requirements:
|
278
|
-
- - "
|
281
|
+
- - "~>"
|
279
282
|
- !ruby/object:Gem::Version
|
280
|
-
version:
|
283
|
+
version: 3.0.0
|
281
284
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
282
285
|
requirements:
|
283
286
|
- - ">="
|
@@ -285,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
288
|
version: '0'
|
286
289
|
requirements: []
|
287
290
|
rubygems_version: 3.2.22
|
288
|
-
signing_key:
|
291
|
+
signing_key:
|
289
292
|
specification_version: 4
|
290
293
|
summary: Decidim debates module
|
291
294
|
test_files: []
|
data/config/environment.rb
DELETED
File without changes
|