quby-compiler 0.5.9 → 0.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/quby/compiler/entities/flag.rb +3 -2
- data/lib/quby/compiler/entities/subscore_schema.rb +0 -2
- data/lib/quby/compiler/outputs/quby_frontend_v1_serializer.rb +1 -2
- data/lib/quby/compiler/outputs/roqua_serializer.rb +2 -2
- data/lib/quby/compiler/services/quby_proxy.rb +1 -6
- data/lib/quby/compiler/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82298997f758c4ea2df21fe0c773a16ae92d25ac1074bf1a5b28481d5f9df91c
|
4
|
+
data.tar.gz: 20f134c1d21d928ff998066c776470dd4b15b3b74c337d8a8b1ff4cecca570ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 178feed69dac1d95d8a8323d783f09abb134cffd870d857e1fc709b1044992016985242c77d35a72ce4c6b4e36f4f3dea8110d7f7e5bc47ccc275f491f611823
|
7
|
+
data.tar.gz: e2d3e142e77b3806c2c407eff25fb71513f7fedacbce04a97c2d89c5352b9dca3aa45210ba67e2f79fb81290a1eb11377ae669f900b8266fa37c8f458299c616
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,7 @@ module Quby
|
|
4
4
|
module Compiler
|
5
5
|
module Entities
|
6
6
|
class Flag < Struct.new(:key, :description_true, :description_false, :description, :internal, :trigger_on,
|
7
|
-
:shows_questions, :hides_questions, :depends_on, :
|
7
|
+
:shows_questions, :hides_questions, :depends_on, :default)
|
8
8
|
# rubocop:disable ParameterLists
|
9
9
|
def initialize(key:,
|
10
10
|
description_true: nil,
|
@@ -15,10 +15,11 @@ module Quby
|
|
15
15
|
shows_questions: [],
|
16
16
|
hides_questions: [],
|
17
17
|
depends_on: [], # used in interface to hide this flag unless the depended on flag is set to true
|
18
|
+
default: nil,
|
18
19
|
default_in_interface: nil) # used in interface to set a default for the flag state,
|
19
20
|
# does not have an effect outside of the interface
|
20
21
|
super(key, description_true, description_false, description, internal, trigger_on, shows_questions,
|
21
|
-
hides_questions, Array.wrap(depends_on).map(&:to_s), default_in_interface)
|
22
|
+
hides_questions, Array.wrap(depends_on).map(&:to_s), (default.nil? ? default_in_interface : default))
|
22
23
|
end
|
23
24
|
# rubocop:enable ParameterLists
|
24
25
|
|
@@ -10,8 +10,6 @@ module Quby
|
|
10
10
|
# The shortened key that will used as the field/column name for csv and oru exports,
|
11
11
|
# excluding the questionnaire key part
|
12
12
|
attribute :export_key, Types::Symbol
|
13
|
-
# [Optional] Whether this score will only be exported through oru/api/data exports, but not shown in interfaces
|
14
|
-
attribute :only_for_export?, Types::Bool
|
15
13
|
# [Optional] The key of the variable definition used to calculate the subscore result.
|
16
14
|
attribute :calculation_key?, Types::Symbol
|
17
15
|
# [Optional argument] The name of the outcome table where this subscore should be shown. Used for cases where scores
|
@@ -225,7 +225,6 @@ module Quby
|
|
225
225
|
key: subschema.key,
|
226
226
|
label: subschema.label,
|
227
227
|
export_key: subschema.export_key,
|
228
|
-
only_for_export: subschema.only_for_export
|
229
228
|
}
|
230
229
|
end
|
231
230
|
}
|
@@ -283,7 +282,7 @@ module Quby
|
|
283
282
|
shows_questions: flag.shows_questions,
|
284
283
|
hides_questions: flag.hides_questions,
|
285
284
|
depends_on: flag.depends_on,
|
286
|
-
|
285
|
+
default: flag.default,
|
287
286
|
}
|
288
287
|
end
|
289
288
|
end
|
@@ -261,7 +261,6 @@ module Quby
|
|
261
261
|
key: subscore.key,
|
262
262
|
label: subscore.label,
|
263
263
|
export_key: subscore.export_key,
|
264
|
-
only_for_export: subscore.only_for_export.presence,
|
265
264
|
type: subscore.type
|
266
265
|
}.compact
|
267
266
|
}
|
@@ -279,7 +278,8 @@ module Quby
|
|
279
278
|
shows_questions: flag.shows_questions,
|
280
279
|
hides_questions: flag.hides_questions,
|
281
280
|
depends_on: flag.depends_on,
|
282
|
-
|
281
|
+
default: flag.default,
|
282
|
+
default_in_interface: flag.default # TODO: Remove this when Roqua supports default natively
|
283
283
|
}
|
284
284
|
end
|
285
285
|
end
|
@@ -315,15 +315,10 @@ module Quby
|
|
315
315
|
questionnaire.score_schemas.values.each do |score_schema|
|
316
316
|
score_labels << score_schema.label
|
317
317
|
score_keys << score_schema.subscore_schemas.map do |subschema|
|
318
|
-
|
318
|
+
{
|
319
319
|
key: subschema.key,
|
320
320
|
header: subschema.export_key.to_s # a shortened key used as PART OF the csv export column headers
|
321
321
|
}
|
322
|
-
if subschema.only_for_export
|
323
|
-
hash.merge(hidden: true)
|
324
|
-
else
|
325
|
-
hash
|
326
|
-
end
|
327
322
|
end
|
328
323
|
|
329
324
|
headers = score_schema.subscore_schemas.map(&:label)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Veldthuis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
245
|
- !ruby/object:Gem::Version
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
|
-
rubygems_version: 3.5.
|
248
|
+
rubygems_version: 3.5.3
|
249
249
|
signing_key:
|
250
250
|
specification_version: 4
|
251
251
|
summary: Quby::Compiler compiles a DSL for questionnaires to JSON
|