quby-compiler 0.5.9 → 0.5.10

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: 392bac29f2cc7b4b00ce1344f010b39941148e96e5e529d6487f8e0d49a5a5fe
4
- data.tar.gz: 7c0538c6243f30481c3f282bfc2892874494454b64f5eb0013b0a0a4aa56e0c8
3
+ metadata.gz: 82298997f758c4ea2df21fe0c773a16ae92d25ac1074bf1a5b28481d5f9df91c
4
+ data.tar.gz: 20f134c1d21d928ff998066c776470dd4b15b3b74c337d8a8b1ff4cecca570ac
5
5
  SHA512:
6
- metadata.gz: 8360a9fd3ec70b80766ece8d51bbbc301067ae7eb8c441515c06dc8c8003205527290c10b1249948deb5b4fab798a1e61ba56e03594f1e5188f5a43d3fbffa9f
7
- data.tar.gz: 16b077a6db915f93dd30f6c6bb8f411c5c21e8cd2adc3ba279abbc11596a34598bd3e80dbea4527b431e7f1719f5eecb78c39f1c1252011c7d71a2332b576331
6
+ metadata.gz: 178feed69dac1d95d8a8323d783f09abb134cffd870d857e1fc709b1044992016985242c77d35a72ce4c6b4e36f4f3dea8110d7f7e5bc47ccc275f491f611823
7
+ data.tar.gz: e2d3e142e77b3806c2c407eff25fb71513f7fedacbce04a97c2d89c5352b9dca3aa45210ba67e2f79fb81290a1eb11377ae669f900b8266fa37c8f458299c616
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.5.10
2
+
3
+ * Removed only_for_export flag. No longer used and did not do what people expected it to do.
4
+
1
5
  # 0.5.9
2
6
 
3
7
  * added `require 'ostruct'` since running quby-compile suddenly fails on this.
@@ -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, :default_in_interface)
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
- default_in_interface: flag.default_in_interface,
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
- default_in_interface: flag.default_in_interface
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
- hash = {
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)
@@ -1,5 +1,5 @@
1
1
  module Quby
2
2
  module Compiler
3
- VERSION = "0.5.9"
3
+ VERSION = "0.5.10"
4
4
  end
5
5
  end
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.9
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-04-05 00:00:00.000000000 Z
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.7
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