quby-compiler 0.5.31 → 0.5.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6013111357cf3e8e7e55045da2b06aeec8040b66034709091357ed43fb2eff6
4
- data.tar.gz: eac3c3ce3e2d961336fe7b230d9f299a3fc0065cac2695e87019ba12ad9d60ed
3
+ metadata.gz: 4c1af309fb9a9b4b95c7ec4e7d41cc9e1f69a21bfbf2b7267649f50b7d87bffe
4
+ data.tar.gz: 06caabaaed4da6c9951f37491e0d8e31817ec2998b3662bb09186d024a52ce52
5
5
  SHA512:
6
- metadata.gz: 6ecb2bf5bdfaad1a377466e14d8c9cf39cf7d761144c0fa4c203e42ecfdeb46b5495005a029274c6bfe1baabf0e2bb526de080b1e2170a35f9ea3c5e973439a9
7
- data.tar.gz: 45da18a37f6878de89bab06f3c9d87fa0ab52cb8ef767a796689d8ca8b9fd6511e9a9672b4095eba5220d93a8105b035a949a418e530f9fe73d0d4dc187defd1
6
+ metadata.gz: b46018e140022030f7aa573e02d9ac213fd8acd28c3d31b24ac4f06d079deade64f60a39455476e337ff34499eb6921449d4f73024d579eb61fe9aabfba0008c
7
+ data.tar.gz: 821f576e5a389a6cd6f988e667e6440e3aecdc025443caf56a572773065d7142110f298331140b7555fe35867e11ebcfc26a16ab74a4656f4e28413b7a7d2aab
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 0.5.33
2
+
3
+ * quby_proxy: fixes for optgroups.
4
+
5
+ # 0.5.32
6
+
7
+ * quby2.json: Add label to optgroups.
8
+
1
9
  # 0.5.31
2
10
 
3
11
  * Fix validator not looking inside optgroups.
@@ -248,6 +248,7 @@ module Quby
248
248
  if child.is_a?(Quby::Compiler::Entities::QuestionOptgroup)
249
249
  { type: 'optgroup',
250
250
  key: child.key,
251
+ label: child.label,
251
252
  options: child.options.map { option_as_json(_1) }
252
253
  }
253
254
  elsif child.inner_title
@@ -39,13 +39,13 @@ module Quby
39
39
  handle_scale(question, question_titles, d_qtypes, vars)
40
40
  when :select
41
41
  d_qtypes[question.key.to_s] = { type: :discrete }
42
- for option in question.options
42
+ for option in question.all_options
43
43
  d_qtypes[question.key.to_s][option.value.to_s] = strip_p_tag(option.context_free_description || option.description || "") unless option.placeholder
44
44
  end
45
45
  update_hidden_questions_for(question)
46
46
  when :check_box
47
47
  d_qtypes[question.key.to_s] = { type: :check_box }
48
- question.options.each do |option|
48
+ question.all_options.each do |option|
49
49
  next if option.inner_title
50
50
  vars << option.key.to_s
51
51
  if question.hidden
@@ -82,7 +82,7 @@ module Quby
82
82
  else
83
83
  no_keys = true
84
84
  values = []
85
- question.options.each do |option|
85
+ question.all_options.each do |option|
86
86
  if option.value # scale or radio
87
87
  vars << question.key.to_s unless vars.include? question.key.to_s
88
88
  next if option.inner_title
@@ -150,7 +150,7 @@ module Quby
150
150
  end
151
151
 
152
152
  def update_hidden_questions_for(question, for_checkbox: false)
153
- shows = question.options.each_with_object({}) do |option, shows|
153
+ shows = question.all_options.each_with_object({}) do |option, shows|
154
154
  next if option.inner_title
155
155
  for key in option.shows_questions
156
156
  skey = key.to_s
@@ -255,7 +255,7 @@ module Quby
255
255
  d_qtypes[quest.key.to_s] = { type: :scale }
256
256
  d_qtypes[quest.key.to_s][:depends] = { values: values, variable: key } unless options[:without_depends]
257
257
  quests[quest.key.to_s] = strip_tags(quest.context_free_title || quest.title || "")
258
- for option in quest.options
258
+ for option in quest.all_options
259
259
  next if option.inner_title
260
260
  d_qtypes[quest.key.to_s][option.value.to_s] = strip_p_tag(option.context_free_description || option.description || "")
261
261
  end
@@ -276,7 +276,7 @@ module Quby
276
276
  d_qtypes[question.key.to_s] = { type: :scale }
277
277
  values = []
278
278
  update_hidden_questions_for(question)
279
- for option in question.options
279
+ for option in question.all_options
280
280
  next if option.inner_title
281
281
  d_qtypes[question.key.to_s][option.value.to_s] = strip_p_tag(option.context_free_description || option.description || "")
282
282
  values << option.value.to_s
@@ -1,5 +1,5 @@
1
1
  module Quby
2
2
  module Compiler
3
- VERSION = "0.5.31"
3
+ VERSION = "0.5.33"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quby-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.31
4
+ version: 0.5.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis