quby-compiler 0.5.17 → 0.5.19
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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/quby/compiler/dsl/questionnaire_builder.rb +4 -0
- data/lib/quby/compiler/entities/questionnaire.rb +1 -0
- data/lib/quby/compiler/entities/sexp_variables.rb +1 -1
- data/lib/quby/compiler/outputs/quby_frontend_v2_serializer.rb +6 -5
- data/lib/quby/compiler/version.rb +1 -1
- metadata +2 -3
- data/lib/quby/compiler/dsl/merge(values(:v_1, :v_2), values(v_4).rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17f81efe58813638140bea17b261bfd5145556b8641ed56792058e6e5cfe2e9c
|
4
|
+
data.tar.gz: b28acaf67f88390312252210a18a2c2bb878dae86887fb4ce0bfad433bcb98a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df24763f87fec0e7dc98d7c14aeb1b21923574684b1c7dba9da22ca6c9ab58f410625094fc6bb934e182e7733072b296f1c32298ab08c32a0963397ab66f7450
|
7
|
+
data.tar.gz: 55adee69bb962303f1a12415037845b5a4a1675cd8b9d88b0a701258bcf8513ea4b528add011fe8c96f16fc71d6032481b82567b13b6a4717ee20688638e6c32
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# 0.5.19
|
2
|
+
|
3
|
+
* quby2: Make the key for inner title predictable, so the json doesn't change each time, making Roqua think the questionnaire has changed.
|
4
|
+
|
5
|
+
# 0.5.18
|
6
|
+
|
7
|
+
* add footer (quby2 only)
|
8
|
+
* fix sexp_variable, op needs to be number for float/integer scalars
|
9
|
+
|
1
10
|
# 0.5.17
|
2
11
|
|
3
12
|
* Add option#label.
|
@@ -18,6 +18,7 @@ module Quby
|
|
18
18
|
language: language || "nl",
|
19
19
|
description: description,
|
20
20
|
shortDescription: short_description,
|
21
|
+
footer: footer,
|
21
22
|
defaultAnswerValue: Services::TransformQuby1ValuesIntoQuby2Values.run!(@questionnaire, default_answer_value),
|
22
23
|
panels: panels.map { panel(_1) },
|
23
24
|
questions: questions,
|
@@ -26,7 +27,7 @@ module Quby
|
|
26
27
|
visibilityRules: visibility_rules.as_json,
|
27
28
|
sexpVariables: sexp_variables,
|
28
29
|
cssVars: css_vars,
|
29
|
-
}
|
30
|
+
}.compact
|
30
31
|
end
|
31
32
|
|
32
33
|
def panel(panel)
|
@@ -193,9 +194,9 @@ module Quby
|
|
193
194
|
end
|
194
195
|
|
195
196
|
def children(question)
|
196
|
-
question.options.map { |child|
|
197
|
+
question.options.map.with_index { |child, idx|
|
197
198
|
if child.inner_title
|
198
|
-
inner_title_as_json(child)
|
199
|
+
inner_title_as_json(child, idx)
|
199
200
|
elsif child.placeholder
|
200
201
|
nil # placeholder attr on question.
|
201
202
|
else
|
@@ -204,10 +205,10 @@ module Quby
|
|
204
205
|
}.compact
|
205
206
|
end
|
206
207
|
|
207
|
-
def inner_title_as_json(option)
|
208
|
+
def inner_title_as_json(option, idx)
|
208
209
|
{
|
209
210
|
type: 'html',
|
210
|
-
key:
|
211
|
+
key: "i-t-#{idx}",
|
211
212
|
html: handle_html(option.description)
|
212
213
|
}
|
213
214
|
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.
|
4
|
+
version: 0.5.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Veldthuis
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-05-06 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: activemodel
|
@@ -150,7 +150,6 @@ files:
|
|
150
150
|
- lib/quby/compiler/dsl/charting/overview_chart_builder.rb
|
151
151
|
- lib/quby/compiler/dsl/charting/radar_chart_builder.rb
|
152
152
|
- lib/quby/compiler/dsl/helpers.rb
|
153
|
-
- lib/quby/compiler/dsl/merge(values(:v_1, :v_2), values(v_4).rb
|
154
153
|
- lib/quby/compiler/dsl/panel_builder.rb
|
155
154
|
- lib/quby/compiler/dsl/question_builder.rb
|
156
155
|
- lib/quby/compiler/dsl/questionnaire_builder.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
merge(values(:v_1, :v_2), values(v_4).recode(1 => 3)).sum
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
divide(value(:v_2), multiply(value(:v_1), value(:v_1)))
|
6
|
-
|
7
|
-
w / l * l
|
8
|
-
|
9
|
-
|
10
|
-
sexp_variable :key1 do
|
11
|
-
foo = values(:v_1, :v_2)
|
12
|
-
bar = recode(foo, 1 => 3)
|
13
|
-
bla = merge(foo, bar)
|
14
|
-
sum(bla)
|
15
|
-
|
16
|
-
end
|