decidim-surveys 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/decidim/surveys/feature.rb +23 -27
  3. metadata +19 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48533ca887256da1dee624731d6c3e1a4335e348
4
- data.tar.gz: 8cfb871cdfb4dd5acef6a85ba8eb40dc8a4f965d
3
+ metadata.gz: ac6eccc7e1fa0861b67609403d6d9668494e5960
4
+ data.tar.gz: fa8da36871f31f1b77d84d1fba7cc893b2ea402e
5
5
  SHA512:
6
- metadata.gz: c4383d2f2503a8d2f5d035dd55a3c7fd6d4491d6329bb05e951393a0ef6b11312d84cfba437b5de6ceaa1361a15165c18d9e2cd832553eb840e6714488514f68
7
- data.tar.gz: ffc94c9271bad995c3dd36c541e612ca73d21667a67ea23cd1fbf3e5a7e36ff9f80eb484b9caaaba53e7b72fca529fa04d47037c342b43b6e99b6757c50f0e7c
6
+ metadata.gz: 47ce7f70e447f5545917fcc8a930a6f2be87349d69b77e8999198546b1763dbcedac6d437b609cd79c7da460c77d36ee077e7184b71165a53d9680b6d7e33708
7
+ data.tar.gz: b191229066b83ac755c0ce7428a41bbe923b321b5b58a1802fcd4bbfbf8366d3011dd7bccda9f0d217bf9aa6f5050e247fb6090618c40652cd101a53131f4652
@@ -67,35 +67,31 @@ Decidim.register_feature(:surveys) do |feature|
67
67
  exports.serializer Decidim::Surveys::SurveyUserAnswersSerializer
68
68
  end
69
69
 
70
- feature.seeds do
71
- Decidim::ParticipatoryProcess.find_each do |process|
72
- next unless process.steps.any?
73
-
74
- feature = Decidim::Feature.create!(
75
- name: Decidim::Features::Namer.new(process.organization.available_locales, :surveys).i18n_name,
76
- manifest_name: :surveys,
77
- published_at: Time.current,
78
- participatory_process: process
79
- )
70
+ feature.seeds do |process|
71
+ feature = Decidim::Feature.create!(
72
+ name: Decidim::Features::Namer.new(process.organization.available_locales, :surveys).i18n_name,
73
+ manifest_name: :surveys,
74
+ published_at: Time.current,
75
+ participatory_process: process
76
+ )
77
+
78
+ survey = Decidim::Surveys::Survey.create!(
79
+ feature: feature,
80
+ title: Decidim::Faker::Localized.paragraph,
81
+ description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
82
+ Decidim::Faker::Localized.paragraph(3)
83
+ end,
84
+ tos: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
85
+ Decidim::Faker::Localized.paragraph(2)
86
+ end
87
+ )
80
88
 
81
- survey = Decidim::Surveys::Survey.create!(
82
- feature: feature,
83
- title: Decidim::Faker::Localized.paragraph,
84
- description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
85
- Decidim::Faker::Localized.paragraph(3)
86
- end,
87
- tos: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
88
- Decidim::Faker::Localized.paragraph(2)
89
- end
89
+ 3.times do
90
+ Decidim::Surveys::SurveyQuestion.create!(
91
+ survey: survey,
92
+ body: Decidim::Faker::Localized.paragraph,
93
+ question_type: "short_answer"
90
94
  )
91
-
92
- 3.times do
93
- Decidim::Surveys::SurveyQuestion.create!(
94
- survey: survey,
95
- body: Decidim::Faker::Localized.paragraph,
96
- question_type: "short_answer"
97
- )
98
- end
99
95
  end
100
96
  end
101
97
  end
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.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.4.3
21
+ version: 0.4.4
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.4.3
28
+ version: 0.4.4
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: jquery-tmpl-rails
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -46,14 +46,28 @@ dependencies:
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.4.3
49
+ version: 0.4.4
50
50
  type: :development
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.4.3
56
+ version: 0.4.4
57
+ - !ruby/object:Gem::Dependency
58
+ name: decidim-admin
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - '='
62
+ - !ruby/object:Gem::Version
63
+ version: 0.4.4
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - '='
69
+ - !ruby/object:Gem::Version
70
+ version: 0.4.4
57
71
  description: A component for decidim's participatory processes.
58
72
  email:
59
73
  - josepjaume@gmail.com