decidim-surveys 0.3.2 → 0.4.0

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
  SHA1:
3
- metadata.gz: 0a467c80da467171b864b8041b72dd44f790ca75
4
- data.tar.gz: 0aaf30d3736bbd8270f7f7b74fc8fa3e16708412
3
+ metadata.gz: 0c7160ceecc7ac57c0cae86f9766bcc485a47374
4
+ data.tar.gz: cf3591ea30821b6d495c9f0b00eb25100f8c740b
5
5
  SHA512:
6
- metadata.gz: e619141adabfb74b0184048ff8120bdfa2b734d941f9ada8837f06c1507b080633ed7ba14ea60672465673ec0eb5e941cd60663f5c1cb5375b19ae6711b492e2
7
- data.tar.gz: 0714e3377ebedc1b69dbfa37cff00b9c75f44b2cf4d4c8e4eec9e929982ef80c2cb76973154dec6b729279d9021912af1d05767d0ffb9a79abecfaed8f135142
6
+ metadata.gz: f440bfbc35c95363d90ef75bc1708fd4f470664ca99b6269abb4e42d69099378d28519002f5f8f9d9470ebc9ed6c46e8d5a26e1338f4f86727e6fc579c645d65
7
+ data.tar.gz: 59cd39dd2aa9aa863b301c25feb9cc5c996e1fc39d342debccb1067040b810137148f533d1477b63b4b823f902ceee42eda182b1b6cc0adf52884681fa28a29b
@@ -8,6 +8,8 @@ module Decidim
8
8
 
9
9
  belongs_to :survey, class_name: "Survey", foreign_key: "decidim_survey_id"
10
10
 
11
+ validates :question_type, inclusion: { in: TYPES }
12
+
11
13
  # Rectify can't handle a hash when using the from_model method so
12
14
  # the answer options must be converted to struct.
13
15
  def answer_options
@@ -53,7 +53,7 @@ Decidim.register_feature(:surveys) do |feature|
53
53
  end
54
54
 
55
55
  feature.seeds do
56
- Decidim::ParticipatoryProcess.all.each do |process|
56
+ Decidim::ParticipatoryProcess.find_each do |process|
57
57
  next unless process.steps.any?
58
58
 
59
59
  feature = Decidim::Feature.create!(
@@ -77,7 +77,8 @@ Decidim.register_feature(:surveys) do |feature|
77
77
  3.times do
78
78
  Decidim::Surveys::SurveyQuestion.create!(
79
79
  survey: survey,
80
- body: Decidim::Faker::Localized.paragraph
80
+ body: Decidim::Faker::Localized.paragraph,
81
+ question_type: "short_answer"
81
82
  )
82
83
  end
83
84
  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.3.2
4
+ version: 0.4.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: 2017-06-19 00:00:00.000000000 Z
13
+ date: 2017-07-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.3.2
21
+ version: 0.4.0
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.3.2
28
+ version: 0.4.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: jquery-tmpl-rails
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -46,14 +46,14 @@ dependencies:
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.3.2
49
+ version: 0.4.0
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.3.2
56
+ version: 0.4.0
57
57
  description: A component for decidim's participatory processes.
58
58
  email:
59
59
  - josepjaume@gmail.com