lutaml 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Rakefile +1 -1
- data/lib/lutaml.rb +1 -0
- data/lib/lutaml/lutaml_path/document_wrapper.rb +26 -0
- data/lib/lutaml/version.rb +1 -1
- data/lutaml.gemspec +4 -2
- metadata +35 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd52cb5d4a4e29687299339e3cd9af05720f81348d5a307ae1d07bf2514bd022
|
4
|
+
data.tar.gz: 373158747e92e76c14efd7bbfc6d42a9ecebe164ebb5d14f035840a85666ce5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad0a113798e024375f25c0f580c09b8e17f1b8d8ea60ab1edc67dbfb5250ae9cb6151b44a4f6cd090159d177d08c40361c7b536a1832053f01a5784d580f91da
|
7
|
+
data.tar.gz: 6f0e0043a0c0a240763c95d0041ff6ccb462fb81773ecc1f4c5d4dc376942fdebe39f6c9fc5c30df96e8a95a061147cfa2b139dda968aabd6161abeb216f7a66
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
data/lib/lutaml.rb
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
require "jmespath"
|
2
|
+
|
3
|
+
module Lutaml
|
4
|
+
module LutamlPath
|
5
|
+
class DocumentWrapper
|
6
|
+
attr_reader :serialized_document
|
7
|
+
|
8
|
+
def initialize(document)
|
9
|
+
@serialized_document = serialize_document(document)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Method for traversing document` structure
|
13
|
+
# example for lutaml: wrapper.find('//#main-doc/main-class/nested-class')
|
14
|
+
# Need to return descendant of Lutaml::LutamlPath::EntryWrapper
|
15
|
+
def find(path)
|
16
|
+
JMESPath.search(path, serialized_document)
|
17
|
+
end
|
18
|
+
|
19
|
+
protected
|
20
|
+
|
21
|
+
def serialize_document(_path)
|
22
|
+
raise ArgumentError, "implement #serialize_document!"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/lutaml/version.rb
CHANGED
data/lutaml.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require_relative
|
1
|
+
require_relative "lib/lutaml/version"
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "lutaml"
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
|
18
18
|
# Specify which files should be added to the gem when it is released.
|
19
19
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
20
|
-
spec.files
|
20
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
21
21
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
22
|
end
|
23
23
|
spec.bindir = "exe"
|
@@ -28,10 +28,12 @@ Gem::Specification.new do |spec|
|
|
28
28
|
# spec.add_runtime_dependency "activesupport", "~> 5.0"
|
29
29
|
# spec.add_runtime_dependency "lutaml-uml"
|
30
30
|
# spec.add_runtime_dependency "lutaml-sysml"
|
31
|
+
spec.add_development_dependency "jmespath", "~> 1.4"
|
31
32
|
spec.add_development_dependency "nokogiri", "~> 1.10"
|
32
33
|
|
33
34
|
spec.add_development_dependency "bundler", "~> 2.0"
|
34
35
|
spec.add_development_dependency "pry", "~> 0.12.2"
|
35
36
|
spec.add_development_dependency "rake", "~> 10.0"
|
36
37
|
spec.add_development_dependency "rspec", "~> 3.0"
|
38
|
+
spec.add_development_dependency "rubocop", "~> 0.54.0"
|
37
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lutaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jmespath
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.4'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.4'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: nokogiri
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +108,20 @@ dependencies:
|
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '3.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.54.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.54.0
|
97
125
|
description: 'LutaML: data models in textual form'
|
98
126
|
email:
|
99
127
|
- open.source@ribose.com'
|
@@ -111,6 +139,7 @@ files:
|
|
111
139
|
- bin/console
|
112
140
|
- bin/setup
|
113
141
|
- lib/lutaml.rb
|
142
|
+
- lib/lutaml/lutaml_path/document_wrapper.rb
|
114
143
|
- lib/lutaml/version.rb
|
115
144
|
- lutaml.gemspec
|
116
145
|
homepage: https://github.com/lutaml/lutaml
|
@@ -120,7 +149,7 @@ metadata:
|
|
120
149
|
homepage_uri: https://github.com/lutaml/lutaml
|
121
150
|
source_code_uri: https://github.com/lutaml/lutaml
|
122
151
|
changelog_uri: https://github.com/lutaml/lutaml/releases
|
123
|
-
post_install_message:
|
152
|
+
post_install_message:
|
124
153
|
rdoc_options: []
|
125
154
|
require_paths:
|
126
155
|
- lib
|
@@ -135,8 +164,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
164
|
- !ruby/object:Gem::Version
|
136
165
|
version: '0'
|
137
166
|
requirements: []
|
138
|
-
rubygems_version: 3.0.
|
139
|
-
signing_key:
|
167
|
+
rubygems_version: 3.0.6
|
168
|
+
signing_key:
|
140
169
|
specification_version: 4
|
141
170
|
summary: 'LutaML: data models in textual form'
|
142
171
|
test_files: []
|