lutaml-lml 0.1.4 → 0.1.5
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 +4 -4
- data/lib/lutaml/lml/cli.rb +4 -1
- data/lib/lutaml/lml/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 898a161f5d3fba30a3dd3021dc15aaa847caba9cbfd65e0e999dba964bffecca
|
|
4
|
+
data.tar.gz: d30e8bdb048aff5b2644e96770412135196e3cf5e2a369b5cdffbd14a7f64c6d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 893325a9b6f5f3e2607dc0cfb6f7ffdd2efd1f6d34b7d38221bfbffdfb7fd8973af67ded3461a1670d7c0a4a55d10540f3a72d06de16503fc2eed3eaf3206342
|
|
7
|
+
data.tar.gz: 258179e87ee9815a677a294a09ce08d131a6068931c21bdcf883cf2e2862cf91dd9ef9efba787131bd73b31578d8697ed316e4398a1062cb5eb64edd1647e0c6
|
data/lib/lutaml/lml/cli.rb
CHANGED
|
@@ -24,7 +24,7 @@ module Lutaml
|
|
|
24
24
|
}.freeze
|
|
25
25
|
|
|
26
26
|
PARSE_HANDLERS = {
|
|
27
|
-
'lutaml' => ->(path) { Lutaml::Lml.parse(
|
|
27
|
+
'lutaml' => ->(path) { File.open(path) { |f| Lutaml::Lml.parse(f) } },
|
|
28
28
|
'yaml' => ->(path) { Lutaml::Lml::YamlParser.parse(path.to_s) },
|
|
29
29
|
'yml' => ->(path) { Lutaml::Lml::YamlParser.parse(path.to_s) },
|
|
30
30
|
'exp' => lambda { |path|
|
|
@@ -94,8 +94,11 @@ module Lutaml
|
|
|
94
94
|
|
|
95
95
|
lutaml lml validate model.lutaml project.lutaml
|
|
96
96
|
DESC
|
|
97
|
+
method_option :input_format, type: :string, aliases: '-i',
|
|
98
|
+
desc: 'Input format (lutaml, yaml, exp)'
|
|
97
99
|
def validate(*paths)
|
|
98
100
|
assert_input_paths(paths)
|
|
101
|
+
@input_format = options[:input_format] || DEFAULT_INPUT_FORMAT
|
|
99
102
|
errors = paths.map { |p| validate_single_file(p) }.compact
|
|
100
103
|
report_validation(errors)
|
|
101
104
|
end
|
data/lib/lutaml/lml/version.rb
CHANGED