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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f72188a69457d2cf82445867f2b726dd621d63e82d79c7e56b01241e0d15ec84
4
- data.tar.gz: 402135ddb2bf31953c21f6166c859c6b5f67d24d1a9e18e8369eb3646a413381
3
+ metadata.gz: 898a161f5d3fba30a3dd3021dc15aaa847caba9cbfd65e0e999dba964bffecca
4
+ data.tar.gz: d30e8bdb048aff5b2644e96770412135196e3cf5e2a369b5cdffbd14a7f64c6d
5
5
  SHA512:
6
- metadata.gz: d07e5279b6c0d983d1ba1384ef3579aa3d493fba0520aedadfd97ac11a42bfca1fd2e96e621e6551e8dd22bef52e30136779cdf88e8bbe81e611b762e1efa3cd
7
- data.tar.gz: 20e402c37d1506fd86c4ded5fac0bb010dc58d3cdda8efcf3e92cd287ec8025331375310b7e40093741af136aaaf4f61d78a44456fe59b2d75dffe5e1d57568b
6
+ metadata.gz: 893325a9b6f5f3e2607dc0cfb6f7ffdd2efd1f6d34b7d38221bfbffdfb7fd8973af67ded3461a1670d7c0a4a55d10540f3a72d06de16503fc2eed3eaf3206342
7
+ data.tar.gz: 258179e87ee9815a677a294a09ce08d131a6068931c21bdcf883cf2e2862cf91dd9ef9efba787131bd73b31578d8697ed316e4398a1062cb5eb64edd1647e0c6
@@ -24,7 +24,7 @@ module Lutaml
24
24
  }.freeze
25
25
 
26
26
  PARSE_HANDLERS = {
27
- 'lutaml' => ->(path) { Lutaml::Lml.parse(File.new(path)) },
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Lml
5
- VERSION = "0.1.4"
5
+ VERSION = "0.1.5"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-lml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.