quby-compiler 0.3.4 → 0.4.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: 0a1a654ea10bed63b7487aaaa16c663efdd89d3a034e52574ea0f05aa08c3845
4
- data.tar.gz: 2e6adaba2286e5400de5bebd944fceb3c71b62d32fea9abd9462cc98a9000084
3
+ metadata.gz: feb162904faed7446d9fae791dcf0a03872121a4a0e4ddb5bcb01de6d936e44c
4
+ data.tar.gz: 04ca9df119e3f7aca8a6724d762f59edc2da56b95649aaef4642c3dc4e72d45a
5
5
  SHA512:
6
- metadata.gz: 17b23528f435db0eee2157915f3540b4bce2e1cd23adc1247a019a18740588d15ca3d93ce78612f57d0213f54d3156aaa222f8b997f8c7ff4dc9c616dbd89ca9
7
- data.tar.gz: 381bc8a3debabde57309e9ae19ba4a46bf1ed7e91a9975314a12bb8784e46ca44c1538c1c6970ae2b142b67b66a00e970f241f91b4c8130c87286fa497a9f8f6
6
+ metadata.gz: ef6516baf27276cdc608583257f48a26c171e4930d8cb4dca035d1c35faf9ef35584f0fcabb4845807901e0f47e2fa81d49e5df280c99acdd13bdad5b63b4040
7
+ data.tar.gz: 4b1cd0e9fa3eeacff0e2e6684ce3d3a74460cd7db9723d176bd3c471efb441f509b36d7fe35310479139af7de31346dca1fc807ff7ac1199a83973e39a951792
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ # 0.4.0
2
+
3
+ * rename flag visibilty rule value to trigger_on
4
+ * Don't parse select option descriptions as markdown.
5
+
6
+ # 0.3.7
7
+
8
+ * Remove last_update
9
+
10
+ # 0.3.6
11
+
12
+ * `outcome_table` panel dsl method now exports the given outcome table definition to `roqua.json`
13
+ This can't be used in combination with the `outcome_table: ` attribute in score schemas.
14
+
15
+ # 0.3.5
16
+
17
+ * Allow score_schema's outcome_table to be set to nil to hide values from outcome tables
18
+
1
19
  # 0.3.4
2
20
 
3
21
  * Added preliminary support for sliders to the v2 output.
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
@@ -15,6 +15,7 @@ module Quby
15
15
  validates :score_keys, :subscore_keys, :questionnaire, :key, presence: true
16
16
  validates :name, presence: true, if: proc { |table| table.default_collapsed }
17
17
  validate :references_existing_score_keys
18
+ validate :no_outcome_tables_defined_in_score_schemas
18
19
 
19
20
  def references_existing_score_keys
20
21
  (score_keys - questionnaire.score_schemas.values.map(&:key)).each do |missing_key|
@@ -25,6 +26,17 @@ module Quby
25
26
  errors.add :subscore_keys, "#{missing_key.inspect} not found in subscore schemas"
26
27
  end
27
28
  end
29
+
30
+ def no_outcome_tables_defined_in_score_schemas
31
+ if questionnaire.score_schemas.values.any? do |schema|
32
+ schema.subscore_schemas.any? do |subscore|
33
+ subscore.outcome_table != :main
34
+ end
35
+ end
36
+ errors.add :score_schemas,
37
+ "Outcome table associations defined in score schemas should not be combined with explicit outcome tables"
38
+ end
39
+ end
28
40
  end
29
41
  end
30
42
  end
@@ -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
 
@@ -16,7 +16,8 @@ module Quby
16
16
  attribute :calculation_key?, Types::Symbol
17
17
  # [Optional argument] The name of the outcome table where this subscore should be shown. Used for cases where scores
18
18
  # differ in subscores too much to be shown as one table. By default, all scores end up in the `:main` table.
19
- attribute :outcome_table, Types::Symbol.default(:main).meta(omittable: true)
19
+ # When outcome_table is explicitly nil, the value should not be shown in outcome tables
20
+ attribute :outcome_table, Types::Symbol.optional.default(:main)
20
21
  end
21
22
  end
22
23
  end
@@ -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,
@@ -84,19 +84,56 @@ module Quby
84
84
  # <subscore_key:Symbol>: <subscore.label:String> # headers for each subscore key for all tables.
85
85
 
86
86
  def outcome_tables_schema
87
+ if questionnaire.outcome_tables.present?
88
+ outcome_tables_from_definition
89
+ else
90
+ outcome_tables_from_score_schemas
91
+ end
92
+ end
93
+
94
+ def outcome_tables_from_definition
95
+ # hash of tables, with the score keys (rows) and subscore keys (columns) used for each
96
+ tables = {}
97
+ # hash of `subscore_key: subscore_label` pairs used in tables
98
+ headers = {}
99
+
100
+ questionnaire.outcome_tables.each do |table|
101
+ tables[table.key] = {name: table.name,
102
+ default_collapsed: table.default_collapsed,
103
+ score_keys: table.score_keys,
104
+ subscore_keys: table.subscore_keys}.compact
105
+
106
+ table.subscore_keys.each do |subscore_key|
107
+ table.score_keys.find do |score_key|
108
+ subschema = questionnaire.score_schemas[score_key].subscore_schemas.find do |subschema|
109
+ subschema.key == subscore_key
110
+ end
111
+ headers[subscore_key] = subschema&.label
112
+ end
113
+ end
114
+ end
115
+
116
+ {
117
+ headers: headers,
118
+ tables: tables,
119
+ }
120
+ end
121
+
122
+ def outcome_tables_from_score_schemas
87
123
  # hash of tables, with the score keys (rows) and subscore keys (columns) used for each
88
124
  tables = Hash.new{ |hash, key| hash[key] = {score_keys: Set.new, subscore_keys: Set.new } }
89
125
  # hash of `subscore_key: subscore_label` pairs used in tables
90
126
  headers = {}
91
-
127
+
92
128
  questionnaire.score_schemas.values.each do |schema|
93
129
  schema.subscore_schemas.each do |subschema|
130
+ next if subschema.outcome_table.blank?
94
131
  tables[subschema.outcome_table][:subscore_keys] << subschema.key
95
132
  tables[subschema.outcome_table][:score_keys] << schema.key
96
133
  headers[subschema.key] = subschema.label
97
134
  end
98
135
  end
99
-
136
+
100
137
  {
101
138
  headers: headers,
102
139
  tables: tables,
@@ -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,7 +22,8 @@ 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 = []
@@ -1,5 +1,5 @@
1
1
  module Quby
2
2
  module Compiler
3
- VERSION = "0.3.4"
3
+ VERSION = "0.4.0"
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.4
4
+ version: 0.4.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: 2021-06-22 00:00:00.000000000 Z
11
+ date: 2021-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -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,7 +238,6 @@ 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
@@ -271,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
271
258
  - !ruby/object:Gem::Version
272
259
  version: '0'
273
260
  requirements: []
274
- rubygems_version: 3.1.2
261
+ rubygems_version: 3.1.4
275
262
  signing_key:
276
263
  specification_version: 4
277
264
  summary: Quby::Compiler compiles a DSL for questionnaires to JSON
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.1
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.4)
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 (3.8.3)
25
- activemodel (>= 4, < 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 (2.10.12)
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.7.2)
48
- concurrent-ruby (~> 1.0)
49
- dry-configurable (~> 0.1, >= 0.1.3)
50
- dry-core (0.5.0)
51
- concurrent-ruby (~> 1.0)
52
- dry-inflector (0.2.0)
53
- dry-logic (1.1.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.3.5)
95
- active_interaction (~> 3.0)
96
- activesupport (>= 5.1, < 6.1)
97
- appsignal (>= 2.9, < 2.11)
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