quby-compiler 0.5.38 → 0.5.39
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: 2279e5f134b33df182ad29e5ef668b690ec78bf64a155943da2572d5427e9515
|
|
4
|
+
data.tar.gz: e57c0a3a82e23aaa73230141439b3787df75f1143cd2a4192749d6ebb4ae783b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 174970b103cd572b7d9920c4f135069672339dcfdc8e212dad1209476db4a0cff4fb744a2033b4c39ac12a4745a01344f2ebefad3c61c4b7ab1beb47fe8dba12
|
|
7
|
+
data.tar.gz: 22374d446918b0b6a04732ac0c024c98c2ffca0ee831f1121e8035285fc5706d967dcf44a074007a5635ccb9d6a6c262b31a29a92576376e7ba8f5108b00a2b7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
# 0.5.39
|
|
2
|
+
|
|
3
|
+
* Remove ostruct dependency (next ruby version requires a gem for this). Make tags simple array and only export to roqua.json.
|
|
4
|
+
* Remove unneeded attributes from frontend v1 json.
|
|
5
|
+
|
|
1
6
|
# 0.5.38
|
|
2
7
|
|
|
3
8
|
* Fail when using unsupported features in layout_version :v2
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'ostruct'
|
|
4
3
|
require 'active_model'
|
|
5
4
|
require 'quby/settings'
|
|
6
5
|
require 'quby/compiler/entities/flag'
|
|
@@ -46,7 +45,7 @@ module Quby
|
|
|
46
45
|
@textvars = {}.with_indifferent_access
|
|
47
46
|
@language = :nl
|
|
48
47
|
@respondent_types = []
|
|
49
|
-
@tags =
|
|
48
|
+
@tags = []
|
|
50
49
|
@check_key_clashes = true
|
|
51
50
|
@validate_html = true
|
|
52
51
|
@score_schemas = {}.with_indifferent_access
|
|
@@ -96,7 +95,6 @@ module Quby
|
|
|
96
95
|
# If false, we don't check html for validity (for mate1 and mate1_pre)
|
|
97
96
|
attr_accessor :validate_html
|
|
98
97
|
|
|
99
|
-
attr_accessor :last_author
|
|
100
98
|
attr_writer :allow_hotkeys # allow hotkeys for :all views, just :bulk views (default), or :none for never
|
|
101
99
|
|
|
102
100
|
attr_accessor :charts
|
|
@@ -116,9 +114,7 @@ module Quby
|
|
|
116
114
|
delegate :question_hash, :input_keys, :answer_keys, :expand_input_keys, to: :fields
|
|
117
115
|
|
|
118
116
|
def tags=(tags)
|
|
119
|
-
tags
|
|
120
|
-
@tags[tag] = true
|
|
121
|
-
end
|
|
117
|
+
@tags = @tags.union(tags)
|
|
122
118
|
end
|
|
123
119
|
|
|
124
120
|
def leave_page_alert
|
|
@@ -233,45 +233,6 @@ module Quby
|
|
|
233
233
|
end
|
|
234
234
|
end
|
|
235
235
|
|
|
236
|
-
def charts
|
|
237
|
-
{
|
|
238
|
-
overview: questionnaire.charts.overview && {
|
|
239
|
-
subscore: questionnaire.charts.overview.subscore,
|
|
240
|
-
y_max: questionnaire.charts.overview.y_max,
|
|
241
|
-
},
|
|
242
|
-
others: questionnaire.charts.map do |chart|
|
|
243
|
-
case chart
|
|
244
|
-
when Quby::Compiler::Entities::Charting::LineChart
|
|
245
|
-
{
|
|
246
|
-
y_label: chart.y_label,
|
|
247
|
-
tonality: chart.tonality,
|
|
248
|
-
baseline: YAML.dump(chart.baseline),
|
|
249
|
-
clinically_relevant_change: chart.clinically_relevant_change,
|
|
250
|
-
}
|
|
251
|
-
when Quby::Compiler::Entities::Charting::OverviewChart
|
|
252
|
-
{
|
|
253
|
-
subscore: chart.subscore,
|
|
254
|
-
y_max: chart.y_max,
|
|
255
|
-
}
|
|
256
|
-
else
|
|
257
|
-
{}
|
|
258
|
-
end.merge(
|
|
259
|
-
key: chart.key,
|
|
260
|
-
type: chart.type,
|
|
261
|
-
title: chart.title,
|
|
262
|
-
plottables: chart.plottables,
|
|
263
|
-
y_categories: chart.y_categories,
|
|
264
|
-
y_range_categories: chart.y_range_categories,
|
|
265
|
-
chart_type: chart.chart_type,
|
|
266
|
-
y_range: range_as_json(chart.y_range),
|
|
267
|
-
tick_interval: chart.tick_interval,
|
|
268
|
-
plotbands: chart.plotbands,
|
|
269
|
-
plotlines: chart.plotlines
|
|
270
|
-
)
|
|
271
|
-
end
|
|
272
|
-
}
|
|
273
|
-
end
|
|
274
|
-
|
|
275
236
|
def flags
|
|
276
237
|
questionnaire.flags.transform_values do |flag|
|
|
277
238
|
{
|
|
@@ -305,35 +266,16 @@ module Quby
|
|
|
305
266
|
YAML.dump(questionnaire.lookup_tables)
|
|
306
267
|
end
|
|
307
268
|
|
|
308
|
-
def outcome_tables
|
|
309
|
-
# TODO DOes not seem to be used in definitions?
|
|
310
|
-
questionnaire.outcome_tables.map do |outcome_table|
|
|
311
|
-
{
|
|
312
|
-
key: outcome_table.key,
|
|
313
|
-
score_keys: outcome_table.score_keys,
|
|
314
|
-
subscore_keys: outcome_table.subscore_keys,
|
|
315
|
-
name: outcome_table.name,
|
|
316
|
-
default_collapsed: outcome_table.default_collapsed,
|
|
317
|
-
}
|
|
318
|
-
end
|
|
319
|
-
end
|
|
320
|
-
|
|
321
269
|
def as_json(options = {})
|
|
322
270
|
{
|
|
323
271
|
key: questionnaire.key,
|
|
324
272
|
title: questionnaire.title,
|
|
325
|
-
description: questionnaire.description,
|
|
326
|
-
outcome_description: questionnaire.outcome_description,
|
|
327
|
-
short_description: questionnaire.short_description,
|
|
328
273
|
abortable: questionnaire.abortable,
|
|
329
274
|
enable_previous_questionnaire_button: questionnaire.enable_previous_questionnaire_button,
|
|
330
275
|
default_answer_value: questionnaire.default_answer_value,
|
|
331
276
|
leave_page_alert: questionnaire.leave_page_alert,
|
|
332
277
|
allow_hotkeys: questionnaire.allow_hotkeys,
|
|
333
|
-
license: questionnaire.license,
|
|
334
|
-
licensor: questionnaire.licensor,
|
|
335
278
|
language: questionnaire.language,
|
|
336
|
-
last_author: questionnaire.last_author,
|
|
337
279
|
extra_css: questionnaire.extra_css,
|
|
338
280
|
|
|
339
281
|
panels: panels,
|
|
@@ -342,17 +284,6 @@ module Quby
|
|
|
342
284
|
flags: flags,
|
|
343
285
|
textvars: textvars,
|
|
344
286
|
lookup_tables: lookup_tables,
|
|
345
|
-
|
|
346
|
-
# belong to roqua domain, but for now they're here too:
|
|
347
|
-
roqua_keys: questionnaire.roqua_keys,
|
|
348
|
-
sbg_key: questionnaire.sbg_key,
|
|
349
|
-
sbg_domains: questionnaire.sbg_domains,
|
|
350
|
-
outcome_regeneration_requested_at: questionnaire.outcome_regeneration_requested_at,
|
|
351
|
-
deactivate_answers_requested_at: questionnaire.deactivate_answers_requested_at,
|
|
352
|
-
respondent_types: questionnaire.respondent_types,
|
|
353
|
-
tags: questionnaire.tags.to_h.keys,
|
|
354
|
-
charts: charts,
|
|
355
|
-
outcome_tables: outcome_tables,
|
|
356
287
|
}
|
|
357
288
|
end
|
|
358
289
|
|
|
@@ -32,7 +32,7 @@ module Quby
|
|
|
32
32
|
outcome_regeneration_requested_at: questionnaire.outcome_regeneration_requested_at,
|
|
33
33
|
deactivate_answers_requested_at: questionnaire.deactivate_answers_requested_at,
|
|
34
34
|
respondent_types: questionnaire.respondent_types,
|
|
35
|
-
tags: questionnaire.tags
|
|
35
|
+
tags: questionnaire.tags,
|
|
36
36
|
charts: charts,
|
|
37
37
|
outcome_tables_schema: outcome_tables_schema,
|
|
38
38
|
outcome_description: questionnaire.outcome_description,
|
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.39
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marten Veldthuis
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activemodel
|
|
@@ -51,6 +51,20 @@ dependencies:
|
|
|
51
51
|
- - ">="
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
53
|
version: '5.0'
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: csv
|
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - ">="
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '3.0'
|
|
61
|
+
type: :runtime
|
|
62
|
+
prerelease: false
|
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - ">="
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '3.0'
|
|
54
68
|
- !ruby/object:Gem::Dependency
|
|
55
69
|
name: dry-struct
|
|
56
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -250,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
250
264
|
- !ruby/object:Gem::Version
|
|
251
265
|
version: '0'
|
|
252
266
|
requirements: []
|
|
253
|
-
rubygems_version: 3.6.
|
|
267
|
+
rubygems_version: 3.6.9
|
|
254
268
|
specification_version: 4
|
|
255
269
|
summary: Quby::Compiler compiles a DSL for questionnaires to JSON
|
|
256
270
|
test_files: []
|