quby-compiler 0.5.30 → 0.5.31

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: 8a6a65058f64b3e68de9d841447cb82483d112ebf3bb79ea081b8d70369568af
4
- data.tar.gz: '03487522a9cfe65ffeeddab48f4edb64b6c3f8fa08c5e2b1d5563bcad1ec4de2'
3
+ metadata.gz: a6013111357cf3e8e7e55045da2b06aeec8040b66034709091357ed43fb2eff6
4
+ data.tar.gz: eac3c3ce3e2d961336fe7b230d9f299a3fc0065cac2695e87019ba12ad9d60ed
5
5
  SHA512:
6
- metadata.gz: 916e3ba77d76eac79f56c7c6ebf785fac439e12decfbdc3a9b8b60649fa5759cf1dc41df999cf30f122c6a0287800b7f33f309e7bc761eb9fab81ab2a1f63476
7
- data.tar.gz: 5c010854d019d877a7c9e85986e022229fe78b85f45721cd1adaa535b8023bd73926fd804e927aa19d825262bef8952811d2a7a4aa82988d4cf49e0286711f09
6
+ metadata.gz: 6ecb2bf5bdfaad1a377466e14d8c9cf39cf7d761144c0fa4c203e42ecfdeb46b5495005a029274c6bfe1baabf0e2bb526de080b1e2170a35f9ea3c5e973439a9
7
+ data.tar.gz: 45da18a37f6878de89bab06f3c9d87fa0ab52cb8ef767a796689d8ca8b9fd6511e9a9672b4095eba5220d93a8105b035a949a418e530f9fe73d0d4dc187defd1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.5.31
2
+
3
+ * Fix validator not looking inside optgroups.
4
+
1
5
  # 0.5.30
2
6
 
3
7
  * Added support for optgroups under select questions for quby2 (flattened for roqua/quby jsons)
@@ -106,7 +106,7 @@ module Quby
106
106
  end
107
107
 
108
108
  def validate_question_options(questionnaire, question)
109
- question.options.each do |option|
109
+ question.all_options.each do |option|
110
110
  validate_item(option)
111
111
  to_be_hidden_questions_exist_and_not_subquestion?(questionnaire, option, msg_base: option.path_str)
112
112
  to_be_shown_questions_exist_and_not_subquestion?(questionnaire, option, msg_base: option.path_str)
@@ -296,7 +296,7 @@ scores_schema tables to the resulting seed."
296
296
 
297
297
  def validate_subquestion_absence_in_select(question)
298
298
  return unless question.type == :select
299
- question.options.each do |option|
299
+ question.all_options.each do |option|
300
300
  unless option.questions.empty?
301
301
  fail "Question '#{question.key}' of type ':select' may not include other questions."
302
302
  end
@@ -304,7 +304,7 @@ scores_schema tables to the resulting seed."
304
304
  end
305
305
 
306
306
  def validate_placeholder_options_nil_values(question)
307
- question.options.each do |question_option|
307
+ question.all_options.each do |question_option|
308
308
  if question_option.placeholder && question_option.value.present?
309
309
  fail "#{question.key}:#{question_option.key}: Placeholder options should not have values defined."
310
310
  end
@@ -314,7 +314,7 @@ scores_schema tables to the resulting seed."
314
314
  def validate_values_unique(question)
315
315
  return if question.type == :check_box || question.allow_duplicate_option_values
316
316
 
317
- question.options.each_with_object([]) do |question_option, seen_values|
317
+ question.all_options.each_with_object([]) do |question_option, seen_values|
318
318
  next if question_option.placeholder || question_option.inner_title
319
319
 
320
320
  fail "#{question.key}:#{question_option.key}: Has no option value defined." if question_option.value.blank?
@@ -344,7 +344,7 @@ scores_schema tables to the resulting seed."
344
344
  questionnaire.questions.each do |question|
345
345
  Entities::Question::MARKDOWN_ATTRIBUTES.each do |attr|
346
346
  validate_markdown(question.send(attr), "#{question.key}.#{attr}")
347
- question.options.each do |option|
347
+ question.all_options.each do |option|
348
348
  Entities::QuestionOption::MARKDOWN_ATTRIBUTES.each do |option_attr|
349
349
  validate_markdown(option.send(option_attr), "#{question.key}:#{option.key}.#{option_attr}")
350
350
  end
@@ -1,5 +1,5 @@
1
1
  module Quby
2
2
  module Compiler
3
- VERSION = "0.5.30"
3
+ VERSION = "0.5.31"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quby-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.30
4
+ version: 0.5.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-09-15 00:00:00.000000000 Z
10
+ date: 2025-09-17 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activemodel