Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quby-compiler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
RoQua
quby-compiler
Commits
1f0b6186
Commit
1f0b6186
authored
3 years ago
by
Jorn van de Beek
Browse files
Options
Downloads
Patches
Plain Diff
Assume definitions supply keys in the dirname instead of filename
parent
ffef01d3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!17
CLI: Assume definitions supply keys in the dirname instead of filename
Pipeline
#85347
passed
3 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
exe/quby-compile
+2
-3
2 additions, 3 deletions
exe/quby-compile
lib/quby/compiler/instance.rb
+1
-1
1 addition, 1 deletion
lib/quby/compiler/instance.rb
with
3 additions
and
4 deletions
exe/quby-compile
+
2
−
3
View file @
1f0b6186
...
...
@@ -21,7 +21,7 @@ OptionParser.new do |opts|
end
opts
.
on
(
"--seeds=INPUT"
)
do
|
value
|
seeds_path
=
value
puts
'--seeds is a deprecated option, questionnaire definitions should use seed_patches to conserve seed tweaks'
end
end
.
parse!
...
...
@@ -38,7 +38,7 @@ lookup_tables = Quby::Compiler::Entities::LookupTables.new(lookup_tables_path)
paths
.
each
do
|
path
|
puts
"Compiling
#{
path
}
"
key
=
File
.
basename
(
path
,
File
.
ext
name
(
path
))
key
=
File
.
basename
(
File
.
dir
name
(
path
))
sourcecode
=
File
.
read
(
path
)
last_update
=
File
.
mtime
(
path
)
seed_path
=
File
.
join
(
seeds_path
,
"
#{
key
}
.yml"
)
...
...
@@ -46,7 +46,6 @@ paths.each do |path|
compiled
=
Quby
::
Compiler
.
compile
(
key
,
sourcecode
,
path:
path
,
seeds:
seeds
,
lookup_tables:
lookup_tables
,
last_update:
last_update
)
FileUtils
.
mkdir_p
(
File
.
join
(
output_path
,
key
))
compiled
[
:outputs
].
each
do
|
type
,
output
|
next
unless
output
File
.
open
(
File
.
join
(
output_path
,
key
,
output
.
filename
),
'w'
)
do
|
file
|
...
...
This diff is collapsed.
Click to expand it.
lib/quby/compiler/instance.rb
+
1
−
1
View file @
1f0b6186
...
...
@@ -11,7 +11,7 @@ module Quby
if
block
# defined in block for tests
questionnaire
=
DSL
.
build
(
key
,
path:
path
,
&
block
)
else
# sourcecode given as string
tempfile
=
Tempfile
.
new
(
key
)
tempfile
=
Tempfile
.
new
(
[
key
,
'.rb'
]
)
questionnaire
=
Entities
::
Questionnaire
.
new
(
key
,
last_update:
last_update
)
Thread
.
current
[
"quby-questionnaire-loading"
]
=
Quby
::
Compiler
::
DSL
::
QuestionnaireBuilder
.
new
(
questionnaire
,
lookup_tables:
lookup_tables
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment