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: 4b37685d77944279d81caccc69c96eaddd83f72124539bc76e90c416666e1d20
4
- data.tar.gz: 0bf896a36737a35995f550a9834c0f95f83297dcc32df9b10d8a9dfa1dc8ce8f
3
+ metadata.gz: 96a88dc734b7b4dcec4c90b1a296ce1daa1db155b7c07c6e8211f510d6f6d6a8
4
+ data.tar.gz: d7f5255fc362997ed992b3a8fa5b3b7419e6944d5ec33275c968e8fa41eed6e8
5
5
  SHA512:
6
- metadata.gz: 6e1c0c9179ff093046c488a289f752945c94bae2341c797b4c5962cb522cf848c41bf3e982814745e07d4b702ab676d50963fa47630393fed8e022618ac106d1
7
- data.tar.gz: 9b6c051c7ce03721392d62b41feec077034ba281b54746393d2bf5bd0fdc1634eb6fec40c0ba53c41b701ea0715d69780c8ea6a557bd3e7b62de743d1c6ef77c
6
+ metadata.gz: be0139d2d2fb49f4d282fe2ff0bf8eecfcfadf0e54ac5a5f7ed5c05b1797e687690666bba7cc8cd4504bff8860d3c4353b23fa99fc7296e6763758a5d603ee17
7
+ data.tar.gz: cc9c0bea2deb15f53da4a299f63117a93cce53326e333cba11e1ce08d5047ad968eb0d91cc1393b4620adfa945affc93f1049cfb2f18a5f9aa9a471260318da3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # 0.6.6
2
+
3
+ * dsl: Add Question#subtype (iso_country_number).
4
+ * roqua.json: Add Question#subtype.
5
+
6
+ # 0.6.5
7
+
8
+ * Fix issue with key prefix checking of check_boxes with inner_titles.
9
+
1
10
  # 0.6.4
2
11
 
3
12
  * Add panel titles to translations.
@@ -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 with key :#{question.key} has one or more invalid option keys: #{question.options.map(&:key)}"
406
+ fail "Question :#{question.key} has an invalid option key :#{option.key}"
407
407
  end
408
408
  end
409
409
 
@@ -1,5 +1,5 @@
1
1
  module Quby
2
2
  module Compiler
3
- VERSION = "0.6.4"
3
+ VERSION = "0.6.6"
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.6.4
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis