quby-compiler 0.4.16 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b37ba70c10be5b93150a219396c5af20cac6c9b1ec2d18e0afa2acdd8c6f7b4
4
- data.tar.gz: c0782d3d8cc1fb6dbdcd21e0613811e941254dbd68edfc10bbe71084cf3c872c
3
+ metadata.gz: c114222ce815660bdbff3a284c6893b8dc809760818d1839193fec984a1027e3
4
+ data.tar.gz: 8b7938ae820807e963178a251313a3f6a237a3103e0d9aab92539eb5a534cd51
5
5
  SHA512:
6
- metadata.gz: ed384ce1f96bac8d3159d26111ad7ad96dc17471e849aaf495877482eb5f587d521c7698f053e7f3bcafc320417f6d164e756ac8b0ede495d33072bbf318d17d
7
- data.tar.gz: cfbc1079c4a8603a16499c2b180ecc1c416d2d2338899aaf5839376cae32dffb42cfa0d2a38cc5e8b4ce570f55dfc38c657a2d8716dd1b4e8e255e9095f3f642
6
+ metadata.gz: 65bba6e155ee6722e836054f584c8df708c1ef9e8a87d9cb560d8020c8c16b3dadfb17b59da4ec0df128f9236f4ff20a69705af6f456c11204f8195a3cb01c36
7
+ data.tar.gz: b9f974a3ab3e6da317397726cad05b3913cc12f81b912ef928fcec50ed9b994196a7404e99f18754abcf4632fab19aad5656e354021ce3573d6735d1a42b1af5
data/CHANGELOG.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # 0.5.0
2
2
 
3
3
  * quby2.json BREAKING CHANGES!:
4
+ * Renamed: Questionnaire#fields to Questionnaire#questions
4
5
  * Removed: Question#options
5
6
  * Removed: Option#innerTitle and Option#placeholder
6
7
  * Removed: Option#context_free_title
@@ -80,15 +80,10 @@ module Quby
80
80
  description: question.type == :select \
81
81
  ? description
82
82
  : Quby::MarkdownParser.new(description).to_html,
83
- context_free_description: question.type == :select \
84
- ? context_free_description
85
- : Quby::MarkdownParser.new(context_free_description).to_html,
86
83
  questions: questions,
87
- innerTitle: inner_title, # deprecated, removed in 0.5.0
88
84
  hidesQuestions: hides_questions,
89
85
  showsQuestions: shows_questions,
90
86
  hidden: hidden,
91
- placeholder: placeholder, # deprecated, removed in 0.5.0
92
87
  viewId: view_id
93
88
  }
94
89
  end
@@ -208,7 +208,7 @@ module Quby
208
208
  outcomeDescription: outcome_description,
209
209
  shortDescription: short_description,
210
210
  panels: panels,
211
- fields: fields.as_json,
211
+ questions: fields.question_hash.as_json,
212
212
  flags: flags,
213
213
  textvars: textvars,
214
214
  visibilityRules: visibility_rules
@@ -67,7 +67,7 @@ module Quby
67
67
  end
68
68
 
69
69
  def as_json(options = {})
70
- super.merge(children: @options.as_json, options: @options.map(&:option_as_json))
70
+ super.merge(children: @options.as_json)
71
71
  end
72
72
  end
73
73
  end
@@ -6,7 +6,7 @@ module Quby
6
6
  module Questions
7
7
  class RadioQuestion < Question
8
8
  def as_json(options = {})
9
- super.merge(children: @options.as_json, options: @options.map(&:option_as_json))
9
+ super.merge(children: @options.as_json)
10
10
  end
11
11
  end
12
12
  end
@@ -8,7 +8,6 @@ module Quby
8
8
  def as_json(options = {})
9
9
  super.merge(
10
10
  children: @options.as_json.compact, # for now just options, but we'll add optgroups later.
11
- options: @options.map(&:option_as_json), # deprecated, removed in 0.5
12
11
  placeholder: @options.find { _1.placeholder }&.description # nil for no placeholder
13
12
  )
14
13
  end
@@ -1,5 +1,5 @@
1
1
  module Quby
2
2
  module Compiler
3
- VERSION = "0.4.16"
3
+ VERSION = "0.5.0"
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.4.16
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-11 00:00:00.000000000 Z
11
+ date: 2022-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel