quby-compiler 0.3.6 → 0.4.2

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: a56013c91225af82fd15a27e8195ca88b22dcb3ea94354ab2ef62cef50532bf2
4
- data.tar.gz: 6412e7e3ef45dd548dc10eea9e2b72da4b7cc64d94d9de2a3ede13db70c5be25
3
+ metadata.gz: '0693e46b261fa2268bf3a406811a27d3782bf34c9c6cb6de4e968206f4d1ab43'
4
+ data.tar.gz: 7fc5013a7ca5893db68d1276ececc4996d0f72e75737bc8c7a7912d622c3d873
5
5
  SHA512:
6
- metadata.gz: 67d746a71ccbd1c0780a836579000efdf50e825a10906a10992abaf3612340039e9670320814d6cb7f6baf3eb041e85c3872496e4d95a70ed4195d61632b969a
7
- data.tar.gz: 51151607042665ecbdd7f4b9448e24a220350cd132ec1e5ef509dfd71b5abca5668686de5231cfd40a27e43ecead4003e1f41ab04e01f952fae95ecc3f96a7cf
6
+ metadata.gz: 743ea4cc3c41f908806d6937aed62dac028d9684246d61f951846fb1657582f8a300dcc3f32bc590630425a254a3ef69543805f67ad0f0ebd271cd1219440f55
7
+ data.tar.gz: af49465555957283e67aa518bf0fdeed8250b3888f98f0d68b1e7a19d8158792718a958f91d4b9e99077319125d26eb6e69ee3a232280c4c0d98ba05a062e7cb
data/CHANGELOG.md CHANGED
@@ -1,7 +1,24 @@
1
+ # 0.4.2
2
+
3
+ * quby2: Added labels to slider questions.
4
+
5
+ # 0.4.1
6
+
7
+ * seeds: Fix depends: :present rule being overridden.
8
+
9
+ # 0.4.0
10
+
11
+ * rename flag visibilty rule value to trigger_on
12
+ * Don't parse select option descriptions as markdown.
13
+
14
+ # 0.3.7
15
+
16
+ * Remove last_update
17
+
1
18
  # 0.3.6
2
19
 
3
20
  * `outcome_table` panel dsl method now exports the given outcome table definition to `roqua.json`
4
- This can't be used in combination with the `outcome_table: ` attibute in score schemas.
21
+ This can't be used in combination with the `outcome_table: ` attribute in score schemas.
5
22
 
6
23
  # 0.3.5
7
24
 
data/exe/quby-compile CHANGED
@@ -8,7 +8,6 @@ require "quby/compiler"
8
8
 
9
9
  output_path = "output"
10
10
  lookup_tables_path = "lookup_tables"
11
- seeds_path = "seeds"
12
11
 
13
12
  OptionParser.new do |opts|
14
13
  opts.banner = "Usage: quby-compile FILE_OR_DIRS [options]"
@@ -19,10 +18,6 @@ OptionParser.new do |opts|
19
18
  opts.on("--lookup-tables=INPUT") do |value|
20
19
  lookup_tables_path = value
21
20
  end
22
-
23
- opts.on("--seeds=INPUT") do |value|
24
- puts '--seeds is a deprecated option, questionnaire definitions should use seed_patches to conserve seed tweaks'
25
- end
26
21
  end.parse!
27
22
 
28
23
  paths = ARGV.flat_map do |file_or_dir|
@@ -40,10 +35,7 @@ paths.each do |path|
40
35
 
41
36
  key = File.basename(File.dirname(path))
42
37
  sourcecode = File.read(path)
43
- last_update = File.mtime(path)
44
- seed_path = File.join(seeds_path, "#{key}.yml")
45
- seeds = File.exist?(seed_path) ? YAML.load(File.read(seed_path)) : nil
46
- compiled = Quby::Compiler.compile(key, sourcecode, path: path, seeds: seeds, lookup_tables: lookup_tables, last_update: last_update)
38
+ compiled = Quby::Compiler.compile(key, sourcecode, path: path, lookup_tables: lookup_tables)
47
39
 
48
40
  FileUtils.mkdir_p(File.join(output_path, key))
49
41
  compiled[:outputs].each do |type, output|
@@ -9,15 +9,15 @@ module Quby
9
9
  module Compiler
10
10
  module DSL
11
11
  def self.build_from_definition(definition)
12
- Entities::Questionnaire.new(definition.key, last_update: definition.timestamp).tap do |questionnaire|
12
+ Entities::Questionnaire.new(definition.key).tap do |questionnaire|
13
13
  builder = QuestionnaireBuilder.new(questionnaire, lookup_tables: definition.lookup_tables)
14
14
  builder.instance_eval(definition.sourcecode, definition.path) if definition.sourcecode
15
15
  questionnaire.callback_after_dsl_enhance_on_questions
16
16
  end
17
17
  end
18
18
 
19
- def self.build(key, sourcecode = nil, path: nil, timestamp: nil, lookup_tables: {}, &block)
20
- Entities::Questionnaire.new(key, last_update: timestamp).tap do |questionnaire|
19
+ def self.build(key, sourcecode = nil, path: nil, lookup_tables: {}, &block)
20
+ Entities::Questionnaire.new(key).tap do |questionnaire|
21
21
  builder = QuestionnaireBuilder.new(questionnaire, lookup_tables: lookup_tables)
22
22
  builder.instance_eval(sourcecode, path || key) if sourcecode
23
23
  builder.instance_eval(&block) if block
@@ -89,7 +89,7 @@ module Quby
89
89
  end
90
90
 
91
91
  def as_json
92
- question_hash
92
+ question_hash.as_json
93
93
  end
94
94
 
95
95
  private
@@ -231,7 +231,6 @@ module Quby
231
231
  title: Quby::MarkdownParser.new(title).to_html,
232
232
  description: Quby::MarkdownParser.new(description).to_html,
233
233
  type: type,
234
- unit: unit,
235
234
  size: size,
236
235
  hidden: hidden?,
237
236
  displayModes: display_modes,
@@ -243,7 +242,10 @@ module Quby
243
242
  presentation: presentation,
244
243
  as: as,
245
244
  questionGroup: question_group
246
- )
245
+ ).tap do |json|
246
+ json[:unit] = unit if %i[integer float string].include?(type) && as != :slider
247
+ json[:labels] = labels if as == :slider
248
+ end
247
249
  end
248
250
 
249
251
  # Returns all keys belonging to html inputs generated by this question.
@@ -57,8 +57,12 @@ module Quby
57
57
  {
58
58
  key: key,
59
59
  value: value,
60
- description: Quby::MarkdownParser.new(description).to_html,
61
- context_free_description: Quby::MarkdownParser.new(context_free_description).to_html,
60
+ description: question.type == :select \
61
+ ? description
62
+ : Quby::MarkdownParser.new(description).to_html,
63
+ context_free_description: question.type == :select \
64
+ ? context_free_description
65
+ : Quby::MarkdownParser.new(context_free_description).to_html,
62
66
  questions: questions,
63
67
  innerTitle: inner_title,
64
68
  hidesQuestions: hides_questions,
@@ -29,10 +29,9 @@ module Quby
29
29
 
30
30
  RESPONDENT_TYPES = %i( profess patient parent second_parent teacher caregiver )
31
31
 
32
- def initialize(key, last_update: Time.now)
32
+ def initialize(key)
33
33
  @key = key
34
34
  @sbg_domains = []
35
- @last_update = Time.at(last_update.to_i)
36
35
  @score_calculations = {}.with_indifferent_access
37
36
  @charts = Charting::Charts.new
38
37
  @fields = Fields.new(self)
@@ -92,7 +91,6 @@ module Quby
92
91
 
93
92
  attr_accessor :last_author
94
93
  attr_accessor :allow_hotkeys # allow hotkeys for :all views, just :bulk views (default), or :none for never
95
- attr_accessor :last_update
96
94
 
97
95
  attr_accessor :charts
98
96
 
@@ -195,7 +193,7 @@ module Quby
195
193
  outcomeDescription: outcome_description,
196
194
  shortDescription: short_description,
197
195
  panels: panels,
198
- fields: fields,
196
+ fields: fields.as_json,
199
197
  flags: flags,
200
198
  textvars: textvars,
201
199
  validations: validations,
@@ -39,7 +39,7 @@ module Quby
39
39
  end
40
40
 
41
41
  def self.from_flag(flag)
42
- condition = { type: "flag_equal", flag_key: flag.key, value: flag.trigger_on }
42
+ condition = { type: "flag_equal", flag_key: flag.key, trigger_on: flag.trigger_on }
43
43
 
44
44
  [].tap do |rules|
45
45
  flag.shows_questions.each do |question_key|
@@ -7,12 +7,12 @@ module Quby
7
7
  @lookup_tables = lookup_tables
8
8
  end
9
9
 
10
- def compile(key:, sourcecode:, seeds:, path: nil, last_update: nil, &block)
10
+ def compile(key:, sourcecode:, path: nil, &block)
11
11
  if block # defined in block for tests
12
12
  questionnaire = DSL.build(key, path: path, &block)
13
13
  else # sourcecode given as string
14
14
  tempfile = Tempfile.new([key, '.rb'])
15
- questionnaire = Entities::Questionnaire.new(key, last_update: last_update)
15
+ questionnaire = Entities::Questionnaire.new(key)
16
16
  Thread.current["quby-questionnaire-loading"] = Quby::Compiler::DSL::QuestionnaireBuilder.new(questionnaire, lookup_tables: lookup_tables)
17
17
 
18
18
  tempfile.puts "Thread.current['quby-questionnaire-loading'].instance_eval do"
@@ -41,7 +41,7 @@ module Quby
41
41
  seeds: Output.new(
42
42
  key: :seeds,
43
43
  filename: "seeds.yml",
44
- content: YAML.dump(Outputs::SeedSerializer.new(questionnaire, seeds).generate),
44
+ content: YAML.dump(Outputs::SeedSerializer.new(questionnaire).generate),
45
45
  ),
46
46
  quby_frontend_v1: Output.new(
47
47
  key: :quby_frontend_v1,
@@ -322,7 +322,6 @@ module Quby
322
322
  licensor: questionnaire.licensor,
323
323
  language: questionnaire.language,
324
324
  renderer_version: questionnaire.renderer_version,
325
- last_update: questionnaire.last_update,
326
325
  last_author: questionnaire.last_author,
327
326
  extra_css: questionnaire.extra_css,
328
327
  allow_switch_to_bulk: questionnaire.allow_switch_to_bulk,
@@ -7,23 +7,19 @@ module Quby
7
7
  attr_reader :questionnaire
8
8
  attr_reader :seeds
9
9
 
10
- def initialize(questionnaire, seeds)
10
+ def initialize(questionnaire)
11
11
  @questionnaire = questionnaire
12
12
  @seeds = seeds || []
13
13
  end
14
14
 
15
15
  def generate
16
- roqua_keys = seeds.present? ? seeds.map { |seed| seed["key"] } : questionnaire.roqua_keys
17
-
18
- roqua_keys.map do |roqua_key|
19
- seed = seeds.find { |seed| seed["key"] == roqua_key } || {}
20
-
16
+ questionnaire.roqua_keys.map do |roqua_key|
21
17
  new_seed = Services::QubyProxy.new(
22
18
  questionnaire,
23
19
  quby_key: questionnaire.key,
24
20
  roqua_key: roqua_key,
25
21
  skip_score_keys_consistency_check: true
26
- ).generate(seed)
22
+ ).generate
27
23
 
28
24
  Services::SeedDiff.new.apply_patch(new_seed, questionnaire.seeds_patch[roqua_key])
29
25
  end
@@ -15,8 +15,8 @@ module Quby
15
15
 
16
16
  def validate(definition)
17
17
  questionnaire = DSL.build_from_definition(definition)
18
+ validate_metadata(questionnaire)
18
19
  validate_fields(questionnaire)
19
- validate_title(questionnaire)
20
20
  validate_questions(questionnaire)
21
21
  validate_scores(questionnaire)
22
22
  validate_table_edgecases(questionnaire)
@@ -32,6 +32,20 @@ module Quby
32
32
  backtrace: exception.backtrace[0..20]})
33
33
  end
34
34
 
35
+ def validate_metadata(questionnaire)
36
+ if questionnaire.title.blank?
37
+ fail "Questionnaire title is missing."
38
+ end
39
+
40
+ if questionnaire.short_description && questionnaire.short_description.size > 255
41
+ fail "Questionnaire short_description is too long."
42
+ end
43
+
44
+ if questionnaire.description && questionnaire.description.size > 255
45
+ fail "Questionnaire description is too long."
46
+ end
47
+ end
48
+
35
49
  def validate_fields(questionnaire)
36
50
  questionnaire.fields.input_keys
37
51
  .find { |k| !k.is_a?(Symbol) }
@@ -41,12 +55,6 @@ module Quby
41
55
  &.tap { |k| fail "Answer key #{k} is not a symbol" }
42
56
  end
43
57
 
44
- def validate_title(questionnaire)
45
- if questionnaire.title.blank?
46
- fail "Questionnaire title is missing."
47
- end
48
- end
49
-
50
58
  def validate_questions(questionnaire)
51
59
  questionnaire.answer_keys.each do |key|
52
60
  validate_key_format(key)
@@ -22,16 +22,14 @@ module Quby
22
22
  @options = options
23
23
  end
24
24
 
25
- def generate(seed)
25
+ def generate
26
+ seed = {}
26
27
  question_titles = generate_question_titles
27
28
  d_qtypes = {}
28
29
  vars = []
29
30
  @hidden_questions = {} # hash containing questions hidden by other questions
30
31
 
31
32
  for question in questions_flat
32
- if question.hidden && question.type != :check_box
33
- d_qtypes[question.key.to_s] = { depends: :present } unless options[:without_depends]
34
- end
35
33
  unless question.hidden && (question.type == :check_box || question.type == :hidden)
36
34
  vars << question.key.to_s
37
35
  end
@@ -183,6 +181,9 @@ module Quby
183
181
  if hidden = @hidden_questions[question.key.to_s]
184
182
  d_qtypes[question.key.to_s][:depends] ||= hidden unless options[:without_depends]
185
183
  end
184
+ if question.hidden && question.type != :check_box
185
+ d_qtypes[question.key.to_s][:depends] = :present unless options[:without_depends]
186
+ end
186
187
  end
187
188
 
188
189
  def generate_question_titles
@@ -1,5 +1,5 @@
1
1
  module Quby
2
2
  module Compiler
3
- VERSION = "0.3.6"
3
+ VERSION = "0.4.2"
4
4
  end
5
5
  end
data/lib/quby/compiler.rb CHANGED
@@ -29,13 +29,11 @@ require 'quby/compiler/outputs'
29
29
 
30
30
  module Quby
31
31
  module Compiler
32
- def self.compile(key, sourcecode, path: nil, seeds:, lookup_tables:, last_update: nil, &block)
32
+ def self.compile(key, sourcecode, path: nil, lookup_tables:, &block)
33
33
  Quby::Compiler::Instance.new(lookup_tables: lookup_tables).compile(
34
34
  key: key,
35
35
  sourcecode: sourcecode,
36
36
  path: path,
37
- seeds: seeds,
38
- last_update: last_update,
39
37
  &block
40
38
  )
41
39
  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.3.6
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2021-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -136,7 +136,7 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
- description:
139
+ description:
140
140
  email:
141
141
  - marten@veldthuis.com
142
142
  executables:
@@ -144,21 +144,10 @@ executables:
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
- - ".gitignore"
148
- - ".gitlab-ci.yml"
149
- - ".rspec"
150
- - ".ruby-version"
151
147
  - CHANGELOG.md
152
- - CODE_OF_CONDUCT.md
153
- - Dockerfile
154
- - Gemfile
155
- - Gemfile.lock
156
148
  - LICENSE.txt
157
149
  - README.md
158
150
  - Rakefile
159
- - bin/console
160
- - bin/rspec
161
- - bin/setup
162
151
  - config/locales/de.yml
163
152
  - config/locales/en.yml
164
153
  - config/locales/nl.yml
@@ -167,7 +156,6 @@ files:
167
156
  - config/locales/rails-i18n/en.yml
168
157
  - config/locales/rails-i18n/nl.yml
169
158
  - exe/quby-compile
170
- - lib/quby/.DS_Store
171
159
  - lib/quby/array_attribute_valid_validator.rb
172
160
  - lib/quby/attribute_valid_validator.rb
173
161
  - lib/quby/compiler.rb
@@ -250,13 +238,12 @@ files:
250
238
  - lib/quby/settings.rb
251
239
  - lib/quby/text_transformation.rb
252
240
  - lib/quby/type_validator.rb
253
- - quby-compiler.gemspec
254
241
  homepage: https://gitlab.roqua.nl/roqua/quby-compiler
255
242
  licenses:
256
243
  - MIT
257
244
  metadata:
258
245
  homepage_uri: https://gitlab.roqua.nl/roqua/quby-compiler
259
- post_install_message:
246
+ post_install_message:
260
247
  rdoc_options: []
261
248
  require_paths:
262
249
  - lib
@@ -272,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
272
259
  version: '0'
273
260
  requirements: []
274
261
  rubygems_version: 3.1.4
275
- signing_key:
262
+ signing_key:
276
263
  specification_version: 4
277
264
  summary: Quby::Compiler compiles a DSL for questionnaires to JSON
278
265
  test_files: []
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- .DS_Store
2
- /.bundle/
3
- /.yardoc
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- /output/
11
-
12
- # rspec failure tracking
13
- .rspec_status
data/.gitlab-ci.yml DELETED
@@ -1,5 +0,0 @@
1
- test:
2
- image: docker
3
- script:
4
- - docker build . --tag quby-compiler-$CI_COMMIT_SHA
5
- - docker run quby-compiler-$CI_COMMIT_SHA bundle exec rspec
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.7.2
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at marten@veldthuis.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [https://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: https://contributor-covenant.org
74
- [version]: https://contributor-covenant.org/version/1/4/
data/Dockerfile DELETED
@@ -1,11 +0,0 @@
1
- FROM ruby:2.7-alpine
2
-
3
- RUN apk update && apk add docker git g++ make
4
-
5
- RUN gem update --system
6
- RUN gem install bundler
7
-
8
- WORKDIR /app
9
-
10
- ADD . /app
11
- RUN bundle install
data/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in quby-compiler.gemspec
4
- gemspec
5
-
6
- gem "rake", "~> 12.0"
7
- gem "rspec", "~> 3.0"
8
- gem 'pry'
data/Gemfile.lock DELETED
@@ -1,130 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- quby-compiler (0.3.5)
5
- actionview (>= 5.0)
6
- activemodel (>= 5.0)
7
- activesupport (>= 5.0)
8
- dry-struct (>= 1.3.0)
9
- method_source
10
- nokogiri (>= 1.8)
11
- nokogumbo
12
- redcarpet (~> 3.5)
13
- roqua-support
14
-
15
- GEM
16
- remote: https://rubygems.org/
17
- specs:
18
- actionview (6.0.4)
19
- activesupport (= 6.0.4)
20
- builder (~> 3.1)
21
- erubi (~> 1.4)
22
- rails-dom-testing (~> 2.0)
23
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
- active_interaction (4.0.2)
25
- activemodel (>= 5, < 7)
26
- activemodel (6.0.4)
27
- activesupport (= 6.0.4)
28
- activerecord (6.0.4)
29
- activemodel (= 6.0.4)
30
- activesupport (= 6.0.4)
31
- activesupport (6.0.4)
32
- concurrent-ruby (~> 1.0, >= 1.0.2)
33
- i18n (>= 0.7, < 2)
34
- minitest (~> 5.1)
35
- tzinfo (~> 1.1)
36
- zeitwerk (~> 2.2, >= 2.2.2)
37
- appsignal (3.0.8)
38
- rack
39
- builder (3.2.4)
40
- coderay (1.1.3)
41
- concurrent-ruby (1.1.9)
42
- crass (1.0.6)
43
- diff-lcs (1.4.4)
44
- dry-configurable (0.12.1)
45
- concurrent-ruby (~> 1.0)
46
- dry-core (~> 0.5, >= 0.5.0)
47
- dry-container (0.8.0)
48
- concurrent-ruby (~> 1.0)
49
- dry-configurable (~> 0.1, >= 0.1.3)
50
- dry-core (0.6.0)
51
- concurrent-ruby (~> 1.0)
52
- dry-inflector (0.2.0)
53
- dry-logic (1.2.0)
54
- concurrent-ruby (~> 1.0)
55
- dry-core (~> 0.5, >= 0.5)
56
- dry-struct (1.4.0)
57
- dry-core (~> 0.5, >= 0.5)
58
- dry-types (~> 1.5)
59
- ice_nine (~> 0.11)
60
- dry-types (1.5.1)
61
- concurrent-ruby (~> 1.0)
62
- dry-container (~> 0.3)
63
- dry-core (~> 0.5, >= 0.5)
64
- dry-inflector (~> 0.1, >= 0.1.2)
65
- dry-logic (~> 1.0, >= 1.0.2)
66
- erubi (1.10.0)
67
- i18n (1.8.10)
68
- concurrent-ruby (~> 1.0)
69
- ice_nine (0.11.2)
70
- loofah (2.10.0)
71
- crass (~> 1.0.2)
72
- nokogiri (>= 1.5.9)
73
- method_source (1.0.0)
74
- mini_portile2 (2.5.3)
75
- minitest (5.14.4)
76
- naught (1.1.0)
77
- nokogiri (1.11.7)
78
- mini_portile2 (~> 2.5.0)
79
- racc (~> 1.4)
80
- nokogumbo (2.0.5)
81
- nokogiri (~> 1.8, >= 1.8.4)
82
- pry (0.13.1)
83
- coderay (~> 1.1)
84
- method_source (~> 1.0)
85
- racc (1.5.2)
86
- rack (2.2.3)
87
- rails-dom-testing (2.0.3)
88
- activesupport (>= 4.2.0)
89
- nokogiri (>= 1.6)
90
- rails-html-sanitizer (1.3.0)
91
- loofah (~> 2.3)
92
- rake (12.3.3)
93
- redcarpet (3.5.1)
94
- roqua-support (0.4.0)
95
- active_interaction (>= 3.0, < 5.0)
96
- activesupport (>= 5.2, < 6.2)
97
- appsignal (>= 2.9, < 3.1)
98
- naught (~> 1.0)
99
- with_advisory_lock (~> 3.2)
100
- rspec (3.9.0)
101
- rspec-core (~> 3.9.0)
102
- rspec-expectations (~> 3.9.0)
103
- rspec-mocks (~> 3.9.0)
104
- rspec-core (3.9.3)
105
- rspec-support (~> 3.9.3)
106
- rspec-expectations (3.9.2)
107
- diff-lcs (>= 1.2.0, < 2.0)
108
- rspec-support (~> 3.9.0)
109
- rspec-mocks (3.9.1)
110
- diff-lcs (>= 1.2.0, < 2.0)
111
- rspec-support (~> 3.9.0)
112
- rspec-support (3.9.3)
113
- thread_safe (0.3.6)
114
- tzinfo (1.2.9)
115
- thread_safe (~> 0.1)
116
- with_advisory_lock (3.2.0)
117
- activerecord (>= 3.2)
118
- zeitwerk (2.4.2)
119
-
120
- PLATFORMS
121
- ruby
122
-
123
- DEPENDENCIES
124
- pry
125
- quby-compiler!
126
- rake (~> 12.0)
127
- rspec (~> 3.0)
128
-
129
- BUNDLED WITH
130
- 2.1.4
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "quby/compiler"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/rspec DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rspec' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("rspec-core", "rspec")
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/lib/quby/.DS_Store DELETED
Binary file
@@ -1,39 +0,0 @@
1
- require_relative 'lib/quby/compiler/version'
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = "quby-compiler"
5
- spec.version = Quby::Compiler::VERSION
6
- spec.authors = ["Marten Veldthuis"]
7
- spec.email = ["marten@veldthuis.com"]
8
-
9
- spec.summary = %q{Quby::Compiler compiles a DSL for questionnaires to JSON}
10
- #spec.description = %q{TODO: Write a longer description or delete this line.}
11
- spec.homepage = "https://gitlab.roqua.nl/roqua/quby-compiler"
12
- spec.license = "MIT"
13
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
14
-
15
- #spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
16
-
17
- spec.metadata["homepage_uri"] = spec.homepage
18
- #spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
19
- #spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
20
-
21
- # Specify which files should be added to the gem when it is released.
22
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
24
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
- end
26
- spec.bindir = "exe"
27
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
- spec.require_paths = ["lib"]
29
-
30
- spec.add_dependency "activemodel", ">= 5.0"
31
- spec.add_dependency "actionview", ">= 5.0"
32
- spec.add_dependency "activesupport", ">= 5.0"
33
- spec.add_dependency 'dry-struct', '>= 1.3.0'
34
- spec.add_dependency 'nokogiri', '>= 1.8'
35
- spec.add_dependency 'nokogumbo'
36
- spec.add_dependency "redcarpet", '~> 3.5'
37
- spec.add_dependency "method_source"
38
- spec.add_dependency "roqua-support"
39
- end