quby-compiler 0.6.4 → 0.6.6
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 96a88dc734b7b4dcec4c90b1a296ce1daa1db155b7c07c6e8211f510d6f6d6a8
|
|
4
|
+
data.tar.gz: d7f5255fc362997ed992b3a8fa5b3b7419e6944d5ec33275c968e8fa41eed6e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be0139d2d2fb49f4d282fe2ff0bf8eecfcfadf0e54ac5a5f7ed5c05b1797e687690666bba7cc8cd4504bff8860d3c4353b23fa99fc7296e6763758a5d603ee17
|
|
7
|
+
data.tar.gz: cc9c0bea2deb15f53da4a299f63117a93cce53326e333cba11e1ce08d5047ad968eb0d91cc1393b4620adfa945affc93f1049cfb2f18a5f9aa9a471260318da3
|
data/CHANGELOG.md
CHANGED
|
@@ -24,6 +24,9 @@ module Quby
|
|
|
24
24
|
|
|
25
25
|
# What kind of question is this?
|
|
26
26
|
attr_accessor :type
|
|
27
|
+
# More specific type, useful for outcome pages and api users.
|
|
28
|
+
attr_accessor :subtype
|
|
29
|
+
validates :subtype, inclusion: {in: [nil, :iso_country_number]}
|
|
27
30
|
|
|
28
31
|
# How should we display this question
|
|
29
32
|
attr_accessor :as
|
|
@@ -147,6 +150,7 @@ module Quby
|
|
|
147
150
|
@key = key
|
|
148
151
|
@sbg_key = options[:sbg_key]
|
|
149
152
|
@type = options[:type]
|
|
153
|
+
@subtype = options[:subtype]
|
|
150
154
|
@as = options[:as]
|
|
151
155
|
@title = options[:title]
|
|
152
156
|
@context_free_title = options[:context_free_title]
|
|
@@ -206,6 +206,7 @@ module Quby
|
|
|
206
206
|
key: question.key,
|
|
207
207
|
sbg_key: question.sbg_key,
|
|
208
208
|
type: QUBY_TYPE_TO_ROQUA_TYPE.fetch(question.type),
|
|
209
|
+
subtype: question.subtype,
|
|
209
210
|
title: parse_markdown_and_strip_tags(question.title),
|
|
210
211
|
context_free_title: question.context_free_title,
|
|
211
212
|
unit: question.unit,
|
|
@@ -401,9 +401,9 @@ scores_schema tables to the resulting seed."
|
|
|
401
401
|
return unless questionnaire.check_checkbox_options_start_with_question_key
|
|
402
402
|
|
|
403
403
|
question.options.each do |option|
|
|
404
|
-
next if option.key.to_s.start_with?(question.key.to_s)
|
|
404
|
+
next if option.inner_title || option.key.to_s.start_with?(question.key.to_s)
|
|
405
405
|
|
|
406
|
-
fail "Question
|
|
406
|
+
fail "Question :#{question.key} has an invalid option key :#{option.key}"
|
|
407
407
|
end
|
|
408
408
|
end
|
|
409
409
|
|