decidim-surveys 0.27.9 → 0.28.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/cells/decidim/surveys/survey_activity_cell.rb +1 -4
  4. data/app/controllers/decidim/surveys/admin/surveys_controller.rb +7 -1
  5. data/app/controllers/decidim/surveys/surveys_controller.rb +3 -1
  6. data/app/helpers/decidim/surveys/survey_helper.rb +1 -3
  7. data/app/jobs/decidim/surveys/clean_survey_answers_job.rb +1 -1
  8. data/app/jobs/decidim/surveys/settings_change_job.rb +2 -2
  9. data/app/mailers/decidim/surveys/survey_confirmation_mailer.rb +39 -0
  10. data/app/serializers/decidim/surveys/data_serializer.rb +1 -1
  11. data/app/views/decidim/surveys/admin/component/_actions.html.erb +17 -16
  12. data/app/views/decidim/surveys/admin/surveys/edit.html.erb +40 -0
  13. data/app/views/decidim/surveys/survey_confirmation_mailer/confirmation.html.erb +3 -0
  14. data/app/views/decidim/surveys/surveys/no_permission.html.erb +1 -1
  15. data/config/assets.rb +0 -1
  16. data/config/locales/ar.yml +0 -2
  17. data/config/locales/bg.yml +1 -62
  18. data/config/locales/ca.yml +9 -4
  19. data/config/locales/cs.yml +7 -2
  20. data/config/locales/de.yml +7 -2
  21. data/config/locales/el.yml +2 -2
  22. data/config/locales/en.yml +7 -2
  23. data/config/locales/es-MX.yml +7 -2
  24. data/config/locales/es-PY.yml +7 -2
  25. data/config/locales/es.yml +9 -4
  26. data/config/locales/eu.yml +7 -2
  27. data/config/locales/fi-plain.yml +7 -2
  28. data/config/locales/fi.yml +8 -3
  29. data/config/locales/fr-CA.yml +5 -2
  30. data/config/locales/fr.yml +7 -2
  31. data/config/locales/gl.yml +0 -3
  32. data/config/locales/hu.yml +0 -3
  33. data/config/locales/id-ID.yml +0 -2
  34. data/config/locales/it.yml +0 -3
  35. data/config/locales/ja.yml +2 -5
  36. data/config/locales/lb.yml +0 -3
  37. data/config/locales/lt.yml +2 -2
  38. data/config/locales/lv.yml +0 -3
  39. data/config/locales/nl.yml +0 -3
  40. data/config/locales/no.yml +0 -3
  41. data/config/locales/pl.yml +1 -8
  42. data/config/locales/pt-BR.yml +0 -7
  43. data/config/locales/pt.yml +0 -3
  44. data/config/locales/ro-RO.yml +2 -2
  45. data/config/locales/sk.yml +0 -3
  46. data/config/locales/sv.yml +3 -9
  47. data/config/locales/tr-TR.yml +0 -3
  48. data/config/locales/zh-CN.yml +0 -3
  49. data/config/locales/zh-TW.yml +2 -2
  50. data/db/migrate/20200609090533_check_legacy_tables.rb +5 -5
  51. data/lib/decidim/surveys/admin_engine.rb +1 -1
  52. data/lib/decidim/surveys/component.rb +6 -89
  53. data/lib/decidim/surveys/engine.rb +20 -1
  54. data/lib/decidim/surveys/seeds.rb +103 -0
  55. data/lib/decidim/surveys/test/factories.rb +5 -10
  56. data/lib/decidim/surveys/version.rb +1 -1
  57. data/lib/tasks/decidim_surveys_tasks.rake +4 -4
  58. metadata +35 -29
  59. data/app/packs/stylesheets/decidim/surveys/_surveys.scss +0 -67
  60. data/config/locales/he-IL.yml +0 -1
  61. data/decidim-surveys.gemspec +0 -35
@@ -1,24 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "decidim/components/namer"
3
4
  require "decidim/core/test/factories"
4
5
  require "decidim/forms/test/factories"
5
6
  require "decidim/participatory_processes/test/factories"
6
7
 
7
8
  FactoryBot.define do
8
9
  factory :surveys_component, parent: :component do
9
- transient do
10
- skip_injection { false }
11
- end
12
- name { generate_component_name(participatory_space.organization.available_locales, :surveys, skip_injection: skip_injection) }
10
+ name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :surveys).i18n_name }
13
11
  manifest_name { :surveys }
14
- participatory_space { create(:participatory_process, :with_steps, skip_injection: skip_injection) }
12
+ participatory_space { create(:participatory_process, :with_steps) }
15
13
  end
16
14
 
17
15
  factory :survey, class: "Decidim::Surveys::Survey" do
18
- transient do
19
- skip_injection { false }
20
- end
21
- questionnaire { build(:questionnaire, :with_questions, skip_injection: skip_injection) }
22
- component { build(:surveys_component, skip_injection: skip_injection) }
16
+ questionnaire { build(:questionnaire, :with_questions) }
17
+ component { build(:surveys_component) }
23
18
  end
24
19
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-surveys version.
5
5
  module Surveys
6
6
  def self.version
7
- "0.27.9"
7
+ "0.28.0.rc4"
8
8
  end
9
9
  end
10
10
  end
@@ -42,7 +42,7 @@ namespace :decidim_surveys do
42
42
  puts "Migrating question #{survey_question.id}..."
43
43
 
44
44
  question = Decidim::Forms::Question.create!(
45
- questionnaire: questionnaire,
45
+ questionnaire:,
46
46
  position: survey_question.position,
47
47
  question_type: survey_question.question_type,
48
48
  mandatory: survey_question.mandatory,
@@ -58,7 +58,7 @@ namespace :decidim_surveys do
58
58
 
59
59
  AnswerOption.where(decidim_survey_question_id: survey_question.id).find_each do |survey_answer_option|
60
60
  answer_option_mapping[survey_answer_option.id] = Decidim::Forms::AnswerOption.create!(
61
- question: question,
61
+ question:,
62
62
  body: survey_answer_option.body,
63
63
  free_text: survey_answer_option.free_text
64
64
  )
@@ -66,8 +66,8 @@ namespace :decidim_surveys do
66
66
 
67
67
  Answer.where(decidim_survey_id: survey.id, decidim_survey_question_id: survey_question.id).find_each do |survey_answer|
68
68
  answer = Decidim::Forms::Answer.new(
69
- questionnaire: questionnaire,
70
- question: question,
69
+ questionnaire:,
70
+ question:,
71
71
  decidim_user_id: survey_answer.decidim_user_id,
72
72
  body: survey_answer.body,
73
73
  created_at: survey_answer.created_at,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-surveys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.9
4
+ version: 0.28.0.rc4
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: 2023-12-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,84 +18,84 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.27.9
21
+ version: 0.28.0.rc4
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.27.9
28
+ version: 0.28.0.rc4
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-forms
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.27.9
35
+ version: 0.28.0.rc4
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.27.9
42
+ version: 0.28.0.rc4
43
43
  - !ruby/object:Gem::Dependency
44
- name: decidim-admin
44
+ name: decidim-templates
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.27.9
50
- type: :development
49
+ version: 0.28.0.rc4
50
+ type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.27.9
56
+ version: 0.28.0.rc4
57
57
  - !ruby/object:Gem::Dependency
58
- name: decidim-dev
58
+ name: decidim-admin
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.27.9
63
+ version: 0.28.0.rc4
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.27.9
70
+ version: 0.28.0.rc4
71
71
  - !ruby/object:Gem::Dependency
72
- name: decidim-participatory_processes
72
+ name: decidim-dev
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.27.9
77
+ version: 0.28.0.rc4
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.27.9
84
+ version: 0.28.0.rc4
85
85
  - !ruby/object:Gem::Dependency
86
- name: decidim-templates
86
+ name: decidim-participatory_processes
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.27.9
91
+ version: 0.28.0.rc4
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - '='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.27.9
98
+ version: 0.28.0.rc4
99
99
  description: A surveys component for decidim's participatory spaces.
100
100
  email:
101
101
  - josepjaume@gmail.com
@@ -118,9 +118,9 @@ files:
118
118
  - app/helpers/decidim/surveys/survey_helper.rb
119
119
  - app/jobs/decidim/surveys/clean_survey_answers_job.rb
120
120
  - app/jobs/decidim/surveys/settings_change_job.rb
121
+ - app/mailers/decidim/surveys/survey_confirmation_mailer.rb
121
122
  - app/models/decidim/surveys/application_record.rb
122
123
  - app/models/decidim/surveys/survey.rb
123
- - app/packs/stylesheets/decidim/surveys/_surveys.scss
124
124
  - app/permissions/decidim/surveys/admin/permissions.rb
125
125
  - app/permissions/decidim/surveys/permissions.rb
126
126
  - app/queries/decidim/surveys/metrics/answers_metric_manage.rb
@@ -128,6 +128,8 @@ files:
128
128
  - app/serializers/decidim/surveys/data_importer.rb
129
129
  - app/serializers/decidim/surveys/data_serializer.rb
130
130
  - app/views/decidim/surveys/admin/component/_actions.html.erb
131
+ - app/views/decidim/surveys/admin/surveys/edit.html.erb
132
+ - app/views/decidim/surveys/survey_confirmation_mailer/confirmation.html.erb
131
133
  - app/views/decidim/surveys/surveys/no_permission.html.erb
132
134
  - config/assets.rb
133
135
  - config/locales/am-ET.yml
@@ -162,7 +164,6 @@ files:
162
164
  - config/locales/ga-IE.yml
163
165
  - config/locales/gl.yml
164
166
  - config/locales/gn-PY.yml
165
- - config/locales/he-IL.yml
166
167
  - config/locales/hr-HR.yml
167
168
  - config/locales/hr.yml
168
169
  - config/locales/hu.yml
@@ -232,7 +233,6 @@ files:
232
233
  - db/migrate/20200610090725_remove_survey_answers.rb
233
234
  - db/migrate/20200610090845_remove_survey_questions.rb
234
235
  - db/migrate/20200610105927_remove_survey_columns.rb
235
- - decidim-surveys.gemspec
236
236
  - lib/decidim/api/survey_type.rb
237
237
  - lib/decidim/api/surveys_type.rb
238
238
  - lib/decidim/surveys.rb
@@ -241,29 +241,35 @@ files:
241
241
  - lib/decidim/surveys/api.rb
242
242
  - lib/decidim/surveys/component.rb
243
243
  - lib/decidim/surveys/engine.rb
244
+ - lib/decidim/surveys/seeds.rb
244
245
  - lib/decidim/surveys/test/factories.rb
245
246
  - lib/decidim/surveys/version.rb
246
247
  - lib/tasks/decidim_surveys_tasks.rake
247
- homepage: https://github.com/decidim/decidim
248
+ homepage: https://decidim.org
248
249
  licenses:
249
250
  - AGPL-3.0
250
- metadata: {}
251
+ metadata:
252
+ bug_tracker_uri: https://github.com/decidim/decidim/issues
253
+ documentation_uri: https://docs.decidim.org/
254
+ funding_uri: https://opencollective.com/decidim
255
+ homepage_uri: https://decidim.org
256
+ source_code_uri: https://github.com/decidim/decidim
251
257
  post_install_message:
252
258
  rdoc_options: []
253
259
  require_paths:
254
260
  - lib
255
261
  required_ruby_version: !ruby/object:Gem::Requirement
256
262
  requirements:
257
- - - "~>"
263
+ - - ">="
258
264
  - !ruby/object:Gem::Version
259
- version: 3.0.0
265
+ version: '3.1'
260
266
  required_rubygems_version: !ruby/object:Gem::Requirement
261
267
  requirements:
262
- - - ">="
268
+ - - ">"
263
269
  - !ruby/object:Gem::Version
264
- version: '0'
270
+ version: 1.3.1
265
271
  requirements: []
266
- rubygems_version: 3.5.14
272
+ rubygems_version: 3.4.20
267
273
  signing_key:
268
274
  specification_version: 4
269
275
  summary: Decidim surveys module
@@ -1,67 +0,0 @@
1
- @import "stylesheets/decidim/forms/forms";
2
-
3
- .answer-questionnaire{
4
- label{
5
- font-size: inherit;
6
- }
7
-
8
- .radio-button-collection,
9
- .check-box-collection,
10
- .sortable-check-box-collection{
11
- margin: 0 0 1rem;
12
- }
13
-
14
- .tos-agreement{
15
- margin: 1rem 0 0;
16
-
17
- .help-text{
18
- margin: .2rem 0 0;
19
- }
20
- }
21
-
22
- .questionnaire-question{
23
- font-weight: 600;
24
- line-height: 1.4;
25
- margin-bottom: .3em;
26
- }
27
-
28
- .questionnaire-title_and_description{
29
- font-size: 2rem;
30
- font-weight: 600;
31
- padding-left: 1rem;
32
- line-height: 1.4;
33
- margin-bottom: .3em;
34
- }
35
-
36
- .help-title_and_description{
37
- padding-left: 1rem;
38
- margin-bottom: 2rem;
39
-
40
- .ql-video{
41
- margin: .5em auto;
42
- }
43
- }
44
-
45
- .help-text{
46
- margin-top: .5em;
47
-
48
- .ql-video{
49
- margin: .5em auto;
50
- }
51
- }
52
-
53
- .last-sorted{
54
- margin-bottom: 1rem;
55
- }
56
-
57
- &__steps{
58
- font-size: .8rem;
59
- }
60
-
61
- &__submit{
62
- display: flex;
63
- align-items: baseline;
64
- justify-content: space-between;
65
- margin-top: 2rem;
66
- }
67
- }
@@ -1 +0,0 @@
1
- he:
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- $LOAD_PATH.push File.expand_path("lib", __dir__)
4
-
5
- # Maintain your gem's version:
6
- require "decidim/surveys/version"
7
-
8
- # Describe your gem and declare its dependencies:
9
- Gem::Specification.new do |s|
10
- s.version = Decidim::Surveys.version
11
- s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
12
- s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
13
- s.license = "AGPL-3.0"
14
- s.homepage = "https://github.com/decidim/decidim"
15
- s.required_ruby_version = "~> 3.0.0"
16
-
17
- s.name = "decidim-surveys"
18
- s.summary = "Decidim surveys module"
19
- s.description = "A surveys component for decidim's participatory spaces."
20
-
21
- s.files = Dir.chdir(__dir__) do
22
- `git ls-files -z`.split("\x0").select do |f|
23
- (File.expand_path(f) == __FILE__) ||
24
- f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
25
- end
26
- end
27
-
28
- s.add_dependency "decidim-core", Decidim::Surveys.version
29
- s.add_dependency "decidim-forms", Decidim::Surveys.version
30
-
31
- s.add_development_dependency "decidim-admin", Decidim::Surveys.version
32
- s.add_development_dependency "decidim-dev", Decidim::Surveys.version
33
- s.add_development_dependency "decidim-participatory_processes", Decidim::Surveys.version
34
- s.add_development_dependency "decidim-templates", Decidim::Surveys.version
35
- end