lutaml-express 0.1.3 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +49 -0
- data/.github/workflows/release.yml +44 -0
- data/README.adoc +5 -1
- data/lib/lutaml/express/parsers/exp.rb +2 -2
- data/lib/lutaml/express/version.rb +1 -1
- data/lutaml-express.gemspec +1 -1
- metadata +10 -12
- data/.github/workflows/macos.yml +0 -36
- data/.github/workflows/ubuntu.yml +0 -38
- data/.github/workflows/windows.yml +0 -41
- data/spec/express/lutaml_path/document_wrapper_spec.rb +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f906481afddb9c9085a4535620f2ff581fa42a16c97ed1fa705e9c8fc332c2ca
|
4
|
+
data.tar.gz: 6fb1505d73f21fa1bb2fbc5e420a7c47e111d74f28ba2352870d3220084d8e5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a1ac13bcc97392717dff56f5b89912021a84c990955ab8282d2188e75047cd1b908d7770ed8318d1344ed7446ebe3b59c1e54775098e56bc07cbe885eee678a
|
7
|
+
data.tar.gz: 3b6e2c5273006d2f5de466d751e50e9b324f84f4bba7bacf35213ece41fc148c363e41e3b3e5280c953c4a7706619064a4efee9302757867037bcca33b519c04
|
@@ -0,0 +1,49 @@
|
|
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 }}"}'
|
@@ -0,0 +1,44 @@
|
|
1
|
+
name: release
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_dispatch:
|
5
|
+
inputs:
|
6
|
+
next_version:
|
7
|
+
description: |
|
8
|
+
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
9
|
+
required: true
|
10
|
+
default: 'patch'
|
11
|
+
push:
|
12
|
+
tags: [ v* ]
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
release:
|
16
|
+
runs-on: ubuntu-latest
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
|
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/README.adoc
CHANGED
@@ -1,3 +1,7 @@
|
|
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
|
+
|
1
5
|
= lutaml-express
|
2
6
|
|
3
7
|
== Functionality
|
@@ -48,4 +52,4 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
|
|
48
52
|
|
49
53
|
== Code of Conduct
|
50
54
|
|
51
|
-
Everyone interacting in the Lutaml::Uml project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lutaml-express/blob/master/CODE_OF_CONDUCT.md).
|
55
|
+
Everyone interacting in the Lutaml::Uml project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lutaml-express/blob/master/CODE_OF_CONDUCT.md).
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'expressir'
|
4
|
-
require 'expressir/
|
4
|
+
require 'expressir/express/parser'
|
5
5
|
|
6
6
|
module Lutaml
|
7
7
|
module Express
|
@@ -13,7 +13,7 @@ module Lutaml
|
|
13
13
|
#
|
14
14
|
# @return [Expressir::Model::Repository]
|
15
15
|
def self.parse(io, options = {})
|
16
|
-
Expressir::
|
16
|
+
Expressir::Express::Parser.from_file(io.path)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
data/lutaml-express.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.bindir = "exe"
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
|
-
spec.add_runtime_dependency "expressir", "~>
|
26
|
+
spec.add_runtime_dependency "expressir", "~> 1.2"
|
27
27
|
|
28
28
|
spec.add_development_dependency "byebug"
|
29
29
|
spec.add_development_dependency "nokogiri", "~> 1.10"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lutaml-express
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
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:
|
11
|
+
date: 2022-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: expressir
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '1.2'
|
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:
|
26
|
+
version: '1.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,9 +115,8 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
-
- ".github/workflows/
|
119
|
-
- ".github/workflows/
|
120
|
-
- ".github/workflows/windows.yml"
|
118
|
+
- ".github/workflows/rake.yml"
|
119
|
+
- ".github/workflows/release.yml"
|
121
120
|
- ".gitignore"
|
122
121
|
- CODE_OF_CONDUCT.md
|
123
122
|
- Gemfile
|
@@ -130,7 +129,6 @@ files:
|
|
130
129
|
- lib/lutaml/express/version.rb
|
131
130
|
- lutaml-express.gemspec
|
132
131
|
- spec/express/express_spec.rb
|
133
|
-
- spec/express/lutaml_path/document_wrapper_spec.rb
|
134
132
|
- spec/express/parsers/exp_spec.rb
|
135
133
|
- spec/fixtures/test.exp
|
136
134
|
- spec/spec_helper.rb
|
@@ -141,7 +139,7 @@ metadata:
|
|
141
139
|
homepage_uri: https://github.com/lutaml/lutaml-express
|
142
140
|
source_code_uri: https://github.com/lutaml/lutaml-express
|
143
141
|
changelog_uri: https://github.com/lutaml/lutaml-express/releases
|
144
|
-
post_install_message:
|
142
|
+
post_install_message:
|
145
143
|
rdoc_options: []
|
146
144
|
require_paths:
|
147
145
|
- lib
|
@@ -156,8 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
154
|
- !ruby/object:Gem::Version
|
157
155
|
version: '0'
|
158
156
|
requirements: []
|
159
|
-
rubygems_version: 3.
|
160
|
-
signing_key:
|
157
|
+
rubygems_version: 3.3.7
|
158
|
+
signing_key:
|
161
159
|
specification_version: 4
|
162
160
|
summary: EXPRESS model module for LutaML.
|
163
161
|
test_files: []
|
data/.github/workflows/macos.yml
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
name: macos
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches: [ master ]
|
6
|
-
pull_request:
|
7
|
-
paths-ignore:
|
8
|
-
- .github/workflows/ubuntu.yml
|
9
|
-
- .github/workflows/windows.yml
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
test-macos:
|
13
|
-
name: Test on Ruby ${{ matrix.ruby }} macOS
|
14
|
-
runs-on: macos-latest
|
15
|
-
continue-on-error: ${{ matrix.experimental }}
|
16
|
-
strategy:
|
17
|
-
fail-fast: false
|
18
|
-
matrix:
|
19
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
20
|
-
experimental: [false]
|
21
|
-
include:
|
22
|
-
- ruby: '2.7'
|
23
|
-
experimental: true
|
24
|
-
steps:
|
25
|
-
- uses: actions/checkout@master
|
26
|
-
- name: Use Ruby
|
27
|
-
uses: actions/setup-ruby@v1
|
28
|
-
with:
|
29
|
-
ruby-version: ${{ matrix.ruby }}
|
30
|
-
- name: Update gems
|
31
|
-
run: |
|
32
|
-
sudo gem install bundler --force
|
33
|
-
bundle install --jobs 4 --retry 3
|
34
|
-
- name: Run specs
|
35
|
-
run: |
|
36
|
-
bundle exec rake
|
@@ -1,38 +0,0 @@
|
|
1
|
-
name: ubuntu
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches: [ master ]
|
6
|
-
tags:
|
7
|
-
- '*'
|
8
|
-
pull_request:
|
9
|
-
paths-ignore:
|
10
|
-
- .github/workflows/macos.yml
|
11
|
-
- .github/workflows/windows.yml
|
12
|
-
|
13
|
-
jobs:
|
14
|
-
test-linux:
|
15
|
-
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
16
|
-
runs-on: ubuntu-latest
|
17
|
-
continue-on-error: ${{ matrix.experimental }}
|
18
|
-
strategy:
|
19
|
-
fail-fast: false
|
20
|
-
matrix:
|
21
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
-
experimental: [false]
|
23
|
-
include:
|
24
|
-
- ruby: '2.7'
|
25
|
-
experimental: true
|
26
|
-
steps:
|
27
|
-
- uses: actions/checkout@master
|
28
|
-
- name: Use Ruby
|
29
|
-
uses: actions/setup-ruby@v1
|
30
|
-
with:
|
31
|
-
ruby-version: ${{ matrix.ruby }}
|
32
|
-
- name: Update gems
|
33
|
-
run: |
|
34
|
-
gem install bundler
|
35
|
-
bundle install --jobs 4 --retry 3
|
36
|
-
- name: Run specs
|
37
|
-
run: |
|
38
|
-
bundle exec rake
|
@@ -1,41 +0,0 @@
|
|
1
|
-
name: windows
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches: [ master ]
|
6
|
-
pull_request:
|
7
|
-
paths-ignore:
|
8
|
-
- .github/workflows/macos.yml
|
9
|
-
- .github/workflows/ubuntu.yml
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
test-windows:
|
13
|
-
name: Test on Ruby ${{ matrix.ruby }} Windows
|
14
|
-
runs-on: windows-latest
|
15
|
-
continue-on-error: ${{ matrix.experimental }}
|
16
|
-
strategy:
|
17
|
-
fail-fast: false
|
18
|
-
matrix:
|
19
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
20
|
-
experimental: [false]
|
21
|
-
# Does not supported yet:
|
22
|
-
# Ruby (< 2.7.dev, >= 2.3), which is required by gem 'nokogiri (~> 1.10)', is not
|
23
|
-
# available in the local ruby installation
|
24
|
-
# include:
|
25
|
-
# - ruby: '2.7'
|
26
|
-
# experimental: true
|
27
|
-
steps:
|
28
|
-
- uses: actions/checkout@master
|
29
|
-
- name: Use Ruby
|
30
|
-
uses: actions/setup-ruby@v1
|
31
|
-
with:
|
32
|
-
ruby-version: ${{ matrix.ruby }}
|
33
|
-
- name: Update gems
|
34
|
-
shell: pwsh
|
35
|
-
run: |
|
36
|
-
gem install bundler
|
37
|
-
bundle config --local path vendor/bundle
|
38
|
-
bundle install --jobs 4 --retry 3
|
39
|
-
- name: Run specs
|
40
|
-
run: |
|
41
|
-
bundle exec rake
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "spec_helper"
|
4
|
-
|
5
|
-
RSpec.describe Lutaml::Express::LutamlPath::DocumentWrapper do
|
6
|
-
describe ".parse" do
|
7
|
-
subject(:lutaml_path) { described_class.new(repository) }
|
8
|
-
subject(:serialized_document) do
|
9
|
-
lutaml_path.serialized_document
|
10
|
-
end
|
11
|
-
|
12
|
-
context "when simple diagram without attributes" do
|
13
|
-
let(:repository) do
|
14
|
-
Lutaml::Express::Parsers::Exp.parse(File.new(fixtures_path("test.exp")))
|
15
|
-
end
|
16
|
-
let(:schema) { 'annotated_3d_model_data_quality_criteria_schema' }
|
17
|
-
let(:entities_names) do
|
18
|
-
%w[
|
19
|
-
a3m_data_quality_criteria_representation
|
20
|
-
a3m_data_quality_criterion
|
21
|
-
a3m_data_quality_criterion_specific_applied_value
|
22
|
-
a3m_data_quality_target_accuracy_association
|
23
|
-
a3m_detailed_report_request
|
24
|
-
a3m_summary_report_request_with_representative_value]
|
25
|
-
end
|
26
|
-
|
27
|
-
it "serializes repository attributes" do
|
28
|
-
expect(serialized_document.keys).to(eq(['schemas', schema]))
|
29
|
-
expect(serialized_document['schemas'].map {|n| n['id'] }).to(eq([schema]))
|
30
|
-
end
|
31
|
-
|
32
|
-
it "correctly finds elements by jmespath expression" do
|
33
|
-
expect(serialized_document['schemas'].first['entities']
|
34
|
-
.map {|n| n['id'] }).to(eq(entities_names))
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|