lutaml-express 0.2.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +7 -29
- data/Gemfile +1 -7
- data/README.adoc +3 -52
- data/Rakefile +0 -5
- data/lutaml-express.gemspec +23 -33
- metadata +15 -114
- data/.github/workflows/rake.yml +0 -49
- data/.gitignore +0 -3
- data/CODE_OF_CONDUCT.md +0 -74
- data/bin/console +0 -15
- data/bin/setup +0 -8
- data/lib/lutaml/express/parsers/exp.rb +0 -21
- data/lib/lutaml/express/version.rb +0 -7
- data/lib/lutaml/express.rb +0 -9
- data/spec/express/express_spec.rb +0 -7
- data/spec/express/parsers/exp_spec.rb +0 -30
- data/spec/fixtures/test.exp +0 -121
- data/spec/spec_helper.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91d7cd1c9634b093ddddd3c4e3d68fb3ff4d871a1532b698c615d5560a9d9b8f
|
4
|
+
data.tar.gz: e69b84ac378ff60e42ff7e2322f2ed049862ddae7d3210a87eebcbba3477a3d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7574eb248c9b5def23c1e90727dbd55056bf1f0e63767abc4f1d399b2abec446e8a9a6abefc5aa17b7ec6326adb06b6c674ed01e232ac311830fdc71c60fd44
|
7
|
+
data.tar.gz: 5326dff652505fd99bef6abc2aee8e14547bbc8bf17a5733813c9d65fd6bb14e22e1c32663655d37bca99fe10350e18366e0a1f22822f8c269a40257be630251
|
@@ -7,38 +7,16 @@ on:
|
|
7
7
|
description: |
|
8
8
|
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
9
9
|
required: true
|
10
|
-
default: '
|
10
|
+
default: 'skip'
|
11
11
|
push:
|
12
12
|
tags: [ v* ]
|
13
13
|
|
14
14
|
jobs:
|
15
15
|
release:
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
|
17
|
+
with:
|
18
|
+
next_version: ${{ github.event.inputs.next_version }}
|
19
|
+
secrets:
|
20
|
+
rubygems-api-key: ${{ secrets.LUTAML_CI_RUBYGEMS_API_KEY }}
|
21
|
+
pat_token: ${{ secrets.LUTAML_CI_PAT_TOKEN }}
|
19
22
|
|
20
|
-
- uses: ruby/setup-ruby@v1
|
21
|
-
with:
|
22
|
-
ruby-version: 3.1
|
23
|
-
bundler-cache: true
|
24
|
-
|
25
|
-
- run: gem install gem-release
|
26
|
-
|
27
|
-
- if: github.event_name == 'workflow_dispatch' && github.event.inputs.next_version != 'skip'
|
28
|
-
run: |
|
29
|
-
git config user.name github-actions
|
30
|
-
git config user.email github-actions@github.com
|
31
|
-
gem bump --version ${{ github.event.inputs.next_version }} --tag --push
|
32
|
-
|
33
|
-
- name: publish to rubygems.org
|
34
|
-
env:
|
35
|
-
RUBYGEMS_API_KEY: ${{ secrets.LUTAML_CI_RUBYGEMS_API_KEY }}
|
36
|
-
run: |
|
37
|
-
gem install gem-release
|
38
|
-
mkdir -p ~/.gem
|
39
|
-
cat > ~/.gem/credentials << EOF
|
40
|
-
---
|
41
|
-
:rubygems_api_key: ${RUBYGEMS_API_KEY}
|
42
|
-
EOF
|
43
|
-
chmod 0600 ~/.gem/credentials
|
44
|
-
gem release
|
data/Gemfile
CHANGED
data/README.adoc
CHANGED
@@ -1,55 +1,6 @@
|
|
1
|
-
image:https://img.shields.io/gem/v/lutaml-express.svg["Gem Version", link="https://rubygems.org/gems/lutaml-express"]
|
2
|
-
// image:https://codeclimate.com/github/lutaml/lutaml-express/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/lutaml/lutaml-express"]
|
3
|
-
image:https://github.com/lutaml/lutaml-express/workflows/rake/badge.svg["Build Status", link="https://github.com/lutaml/lutaml-express/actions?workflow=rake"]
|
4
|
-
|
5
1
|
= lutaml-express
|
6
2
|
|
7
|
-
|
8
|
-
|
9
|
-
Gem-extention for lutaml, works with EXPRESS files
|
10
|
-
|
11
|
-
=== Installation
|
12
|
-
|
13
|
-
With bundler:
|
14
|
-
|
15
|
-
[source,ruby]
|
16
|
-
----
|
17
|
-
# Gemfile
|
18
|
-
gem "lutaml-express"
|
19
|
-
----
|
20
|
-
|
21
|
-
Then in console:
|
22
|
-
|
23
|
-
[source,console]
|
24
|
-
----
|
25
|
-
$ bundle
|
26
|
-
----
|
27
|
-
|
28
|
-
With RubyGems:
|
29
|
-
|
30
|
-
[source,console]
|
31
|
-
----
|
32
|
-
$ gem install lutaml-express
|
33
|
-
----
|
34
|
-
|
35
|
-
=== Usage
|
36
|
-
|
37
|
-
[source,ruby]
|
38
|
-
----
|
39
|
-
Lutaml::Express::Parsers::Exp.parse(File.new('/path/to/file.exp')) # => Expressir::Model::Repository
|
40
|
-
----
|
41
|
-
|
42
|
-
== Development
|
43
|
-
|
44
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
45
|
-
|
46
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
47
|
-
|
48
|
-
## Contributing
|
49
|
-
|
50
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lutaml-express. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/lutaml-express/blob/master/CODE_OF_CONDUCT.md).
|
51
|
-
|
52
|
-
|
53
|
-
== Code of Conduct
|
3
|
+
This repository has been merged into LutaML. See:
|
54
4
|
|
55
|
-
|
5
|
+
* https://github.com/lutaml/lutaml/
|
6
|
+
* https://github.com/lutaml/lutaml/tree/main/lib/lutaml/express
|
data/Rakefile
CHANGED
data/lutaml-express.gemspec
CHANGED
@@ -1,34 +1,24 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
spec.require_paths = ["lib"]
|
25
|
-
|
26
|
-
spec.add_runtime_dependency "expressir", "~> 1.2"
|
27
|
-
|
28
|
-
spec.add_development_dependency "byebug"
|
29
|
-
spec.add_development_dependency "nokogiri", "~> 1.10"
|
30
|
-
spec.add_development_dependency "rubocop", "~> 0.54.0"
|
31
|
-
spec.add_development_dependency "bundler", "~> 2.0"
|
32
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
33
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = "lutaml-express"
|
5
|
+
s.version = "1.0.0"
|
6
|
+
s.authors = ["Ribose Inc."]
|
7
|
+
s.email = ["open.source@ribose.com"]
|
8
|
+
|
9
|
+
s.homepage = "http://github.com/lutaml/lutaml"
|
10
|
+
s.summary = "Lutaml stub gem for lutaml-express"
|
11
|
+
s.description = "Lutaml stub gem for lutaml-express"
|
12
|
+
s.license = "BSD-2-Clause"
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- exe/*`.split("\n").map do |f|
|
17
|
+
File.basename(f)
|
18
|
+
end
|
19
|
+
s.bindir = "exe"
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
22
|
+
|
23
|
+
s.add_dependency "lutaml", "> 0.7.7"
|
34
24
|
end
|
metadata
CHANGED
@@ -1,144 +1,45 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lutaml-express
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: lutaml
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.7.7
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
-
|
28
|
-
name: byebug
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: nokogiri
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '1.10'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '1.10'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rubocop
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 0.54.0
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 0.54.0
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: bundler
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '2.0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '2.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rake
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '10.0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '10.0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rspec
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '3.0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '3.0'
|
111
|
-
description: EXPRESS model module for LutaML.
|
26
|
+
version: 0.7.7
|
27
|
+
description: Lutaml stub gem for lutaml-express
|
112
28
|
email:
|
113
|
-
- open.source@ribose.com
|
29
|
+
- open.source@ribose.com
|
114
30
|
executables: []
|
115
31
|
extensions: []
|
116
32
|
extra_rdoc_files: []
|
117
33
|
files:
|
118
|
-
- ".github/workflows/rake.yml"
|
119
34
|
- ".github/workflows/release.yml"
|
120
|
-
- ".gitignore"
|
121
|
-
- CODE_OF_CONDUCT.md
|
122
35
|
- Gemfile
|
123
36
|
- README.adoc
|
124
37
|
- Rakefile
|
125
|
-
- bin/console
|
126
|
-
- bin/setup
|
127
|
-
- lib/lutaml/express.rb
|
128
|
-
- lib/lutaml/express/parsers/exp.rb
|
129
|
-
- lib/lutaml/express/version.rb
|
130
38
|
- lutaml-express.gemspec
|
131
|
-
|
132
|
-
- spec/express/parsers/exp_spec.rb
|
133
|
-
- spec/fixtures/test.exp
|
134
|
-
- spec/spec_helper.rb
|
135
|
-
homepage: https://github.com/lutaml/lutaml-express
|
39
|
+
homepage: http://github.com/lutaml/lutaml
|
136
40
|
licenses:
|
137
|
-
-
|
138
|
-
metadata:
|
139
|
-
homepage_uri: https://github.com/lutaml/lutaml-express
|
140
|
-
source_code_uri: https://github.com/lutaml/lutaml-express
|
141
|
-
changelog_uri: https://github.com/lutaml/lutaml-express/releases
|
41
|
+
- BSD-2-Clause
|
42
|
+
metadata: {}
|
142
43
|
post_install_message:
|
143
44
|
rdoc_options: []
|
144
45
|
require_paths:
|
@@ -147,15 +48,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
48
|
requirements:
|
148
49
|
- - ">="
|
149
50
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
51
|
+
version: 2.7.0
|
151
52
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
53
|
requirements:
|
153
54
|
- - ">="
|
154
55
|
- !ruby/object:Gem::Version
|
155
56
|
version: '0'
|
156
57
|
requirements: []
|
157
|
-
rubygems_version: 3.3.
|
58
|
+
rubygems_version: 3.3.27
|
158
59
|
signing_key:
|
159
60
|
specification_version: 4
|
160
|
-
summary:
|
61
|
+
summary: Lutaml stub gem for lutaml-express
|
161
62
|
test_files: []
|
data/.github/workflows/rake.yml
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
name: rake
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches: [ master, main ]
|
6
|
-
tags: [ v* ]
|
7
|
-
pull_request:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
rake:
|
11
|
-
name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
|
12
|
-
runs-on: ${{ matrix.os }}
|
13
|
-
continue-on-error: ${{ matrix.experimental }}
|
14
|
-
strategy:
|
15
|
-
fail-fast: false
|
16
|
-
matrix:
|
17
|
-
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
|
18
|
-
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
19
|
-
experimental: [ false ]
|
20
|
-
include:
|
21
|
-
- ruby: '3.0'
|
22
|
-
os: 'ubuntu-latest'
|
23
|
-
experimental: true
|
24
|
-
- ruby: '3.0'
|
25
|
-
os: 'windows-latest'
|
26
|
-
experimental: true
|
27
|
-
- ruby: '3.0'
|
28
|
-
os: 'macos-latest'
|
29
|
-
experimental: true
|
30
|
-
steps:
|
31
|
-
- uses: actions/checkout@master
|
32
|
-
|
33
|
-
- uses: ruby/setup-ruby@v1
|
34
|
-
with:
|
35
|
-
ruby-version: ${{ matrix.ruby }}
|
36
|
-
bundler-cache: true
|
37
|
-
|
38
|
-
- run: bundle exec rake
|
39
|
-
|
40
|
-
tests-passed:
|
41
|
-
needs: rake
|
42
|
-
runs-on: ubuntu-latest
|
43
|
-
steps:
|
44
|
-
- uses: peter-evans/repository-dispatch@v1
|
45
|
-
with:
|
46
|
-
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
47
|
-
repository: ${{ github.repository }}
|
48
|
-
event-type: notify
|
49
|
-
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
data/.gitignore
DELETED
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 ronald.tse@ribose.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/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "bundler/setup"
|
5
|
-
require "lutaml/express"
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require "irb"
|
15
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'expressir'
|
4
|
-
require 'expressir/express/parser'
|
5
|
-
|
6
|
-
module Lutaml
|
7
|
-
module Express
|
8
|
-
module Parsers
|
9
|
-
# Class for parsing .exp schema files into Expressir::Model::Repository
|
10
|
-
class Exp
|
11
|
-
# @param [String] io - file object with path to .exp file
|
12
|
-
# [Hash] options - options for parsing
|
13
|
-
#
|
14
|
-
# @return [Expressir::Model::Repository]
|
15
|
-
def self.parse(io, options = {})
|
16
|
-
Expressir::Express::Parser.from_file(io.path)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/lib/lutaml/express.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "spec_helper"
|
4
|
-
|
5
|
-
RSpec.describe Lutaml::Express::Parsers::Exp do
|
6
|
-
describe ".parse" do
|
7
|
-
subject(:parse) { described_class.parse(content) }
|
8
|
-
|
9
|
-
context "when simple diagram without attributes" do
|
10
|
-
let(:content) do
|
11
|
-
File.new(fixtures_path("test.exp"))
|
12
|
-
end
|
13
|
-
|
14
|
-
it "creates Expressir::Model::Repository object from supplied exp file" do
|
15
|
-
expect(parse).to be_instance_of(Expressir::Model::Repository)
|
16
|
-
end
|
17
|
-
|
18
|
-
it "correctly reads schema attributes" do
|
19
|
-
expect(parse.schemas.first.id).to(eq('annotated_3d_model_data_quality_criteria_schema'))
|
20
|
-
expect(parse.schemas.first.entities.map(&:id))
|
21
|
-
.to(eq(["a3m_data_quality_criteria_representation",
|
22
|
-
"a3m_data_quality_criterion",
|
23
|
-
"a3m_data_quality_criterion_specific_applied_value",
|
24
|
-
"a3m_data_quality_target_accuracy_association",
|
25
|
-
"a3m_detailed_report_request",
|
26
|
-
"a3m_summary_report_request_with_representative_value"]))
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
data/spec/fixtures/test.exp
DELETED
@@ -1,121 +0,0 @@
|
|
1
|
-
(*
|
2
|
-
$Id: test.exp,v 1.3 2020/07/30 05:18:54 ftanaka Exp $
|
3
|
-
ISO 10303 TC184/SC4/WG12 N10658
|
4
|
-
|
5
|
-
EXPRESS Source:
|
6
|
-
ISO 10303-59 ed3 Quality of product shape data - Annotated 3d model data quality criteria schema
|
7
|
-
|
8
|
-
The following permission notice and disclaimer shall be included in all copies of this EXPRESS schema ("the Schema"),
|
9
|
-
and derivations of the Schema:
|
10
|
-
|
11
|
-
Copyright ISO 2020 All rights reserved
|
12
|
-
Permission is hereby granted, free of charge in perpetuity, to any person obtaining a copy of the Schema,
|
13
|
-
to use, copy, modify, merge and distribute free of charge, copies of the Schema for the purposes of developing,
|
14
|
-
implementing, installing and using software based on the Schema, and to permit persons to whom the Schema is furnished to do so,
|
15
|
-
subject to the following conditions:
|
16
|
-
|
17
|
-
THE SCHEMA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
18
|
-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
20
|
-
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
21
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SCHEMA OR THE
|
22
|
-
USE OR OTHER DEALINGS IN THE SCHEMA.
|
23
|
-
|
24
|
-
In addition, any modified copy of the Schema shall include the following notice:
|
25
|
-
|
26
|
-
THIS SCHEMA HAS BEEN MODIFIED FROM THE SCHEMA DEFINED IN
|
27
|
-
ISO 10303-59 ed3 Quality of product shape data - Annotated 3d model data quality criteria schema
|
28
|
-
AND SHOULD NOT BE INTERPRETED AS COMPLYING WITH THAT STANDARD
|
29
|
-
*)
|
30
|
-
|
31
|
-
SCHEMA annotated_3d_model_data_quality_criteria_schema '{iso standard 10303 part(59) version(3) object(1) annotated_3d_model_data_quality_criteria_schema(6)}';
|
32
|
-
|
33
|
-
(* Need select eleemnts for measure_value *)
|
34
|
-
REFERENCE FROM measure_schema
|
35
|
-
(measure_value);
|
36
|
-
|
37
|
-
REFERENCE FROM product_data_quality_criteria_schema
|
38
|
-
(data_quality_criteria_representation,
|
39
|
-
data_quality_criterion,
|
40
|
-
data_quality_measurement_requirement,
|
41
|
-
detailed_report_request_with_number_of_data,
|
42
|
-
summary_report_request);
|
43
|
-
|
44
|
-
REFERENCE FROM representation_schema
|
45
|
-
(representation,
|
46
|
-
representation_item);
|
47
|
-
|
48
|
-
REFERENCE FROM shape_data_quality_criteria_schema
|
49
|
-
(shape_data_quality_assessment_specification_select,
|
50
|
-
shape_measurement_accuracy);
|
51
|
-
|
52
|
-
REFERENCE FROM support_resource_schema
|
53
|
-
(identifier,
|
54
|
-
label,
|
55
|
-
text);
|
56
|
-
|
57
|
-
TYPE a3m_accuracy_associated_target_select = EXTENSIBLE SELECT;
|
58
|
-
END_TYPE;
|
59
|
-
|
60
|
-
TYPE a3m_data_quality_accuracy_type_name = EXTENSIBLE ENUMERATION;
|
61
|
-
END_TYPE;
|
62
|
-
|
63
|
-
TYPE a3m_data_quality_inspected_element_type_name = EXTENSIBLE ENUMERATION;
|
64
|
-
END_TYPE;
|
65
|
-
|
66
|
-
TYPE a3m_data_quality_measured_data_type_name = EXTENSIBLE ENUMERATION;
|
67
|
-
END_TYPE;
|
68
|
-
|
69
|
-
TYPE a3m_data_quality_type_name_for_location_of_extreme_value = EXTENSIBLE ENUMERATION;
|
70
|
-
END_TYPE;
|
71
|
-
|
72
|
-
TYPE summary_stats_value_type = ENUMERATION OF
|
73
|
-
(average_value,
|
74
|
-
max_value,
|
75
|
-
min_value);
|
76
|
-
END_TYPE;
|
77
|
-
|
78
|
-
ENTITY a3m_data_quality_criteria_representation
|
79
|
-
SUBTYPE OF (data_quality_criteria_representation);
|
80
|
-
WHERE
|
81
|
-
WR1: SIZEOF( QUERY( q <* SELF\representation.items|
|
82
|
-
'ANNOTATED_3D_MODEL_DATA_QUALITY_CRITERIA_SCHEMA.' +
|
83
|
-
'A3M_DATA_QUALITY_CRITERION' IN TYPEOF(q))) > 0;
|
84
|
-
END_ENTITY;
|
85
|
-
|
86
|
-
ENTITY a3m_data_quality_criterion
|
87
|
-
ABSTRACT SUPERTYPE
|
88
|
-
SUBTYPE OF(data_quality_criterion, data_quality_measurement_requirement);
|
89
|
-
assessment_specification : shape_data_quality_assessment_specification_select;
|
90
|
-
measured_data_type : a3m_data_quality_measured_data_type_name;
|
91
|
-
inspected_elements_types: LIST[1:?] OF a3m_data_quality_inspected_element_type_name;
|
92
|
-
accuracy_types : LIST [0:?] OF a3m_data_quality_accuracy_type_name;
|
93
|
-
location_of_extreme_value_types: LIST[0:?] OF a3m_data_quality_type_name_for_location_of_extreme_value;
|
94
|
-
END_ENTITY;
|
95
|
-
|
96
|
-
ENTITY a3m_data_quality_criterion_specific_applied_value
|
97
|
-
ABSTRACT SUPERTYPE
|
98
|
-
SUBTYPE OF(representation_item);
|
99
|
-
criterion_to_assign_the_value: a3m_data_quality_criterion;
|
100
|
-
applied_value : measure_value;
|
101
|
-
END_ENTITY;
|
102
|
-
|
103
|
-
ENTITY a3m_data_quality_target_accuracy_association;
|
104
|
-
id : identifier;
|
105
|
-
name : label;
|
106
|
-
description : OPTIONAL text;
|
107
|
-
accuracy_specification : shape_measurement_accuracy;
|
108
|
-
target_to_associate : a3m_accuracy_associated_target_select;
|
109
|
-
END_ENTITY;
|
110
|
-
|
111
|
-
ENTITY a3m_detailed_report_request
|
112
|
-
SUBTYPE OF(detailed_report_request_with_number_of_data);
|
113
|
-
value_type_requested : summary_stats_value_type;
|
114
|
-
END_ENTITY;
|
115
|
-
|
116
|
-
ENTITY a3m_summary_report_request_with_representative_value
|
117
|
-
SUBTYPE OF(summary_report_request);
|
118
|
-
value_type_requested : summary_stats_value_type;
|
119
|
-
END_ENTITY;
|
120
|
-
|
121
|
-
END_SCHEMA;
|
data/spec/spec_helper.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "lutaml/express"
|
5
|
-
require "byebug"
|
6
|
-
|
7
|
-
RSpec.configure do |config|
|
8
|
-
# Enable flags like --only-failures and --next-failure
|
9
|
-
config.example_status_persistence_file_path = ".rspec_status"
|
10
|
-
|
11
|
-
# Disable RSpec exposing methods globally on `Module` and `main`
|
12
|
-
config.disable_monkey_patching!
|
13
|
-
|
14
|
-
config.expect_with :rspec do |c|
|
15
|
-
c.syntax = :expect
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def fixtures_path(path)
|
20
|
-
File.join(File.expand_path("./fixtures", __dir__), path)
|
21
|
-
end
|