metanorma-plugin-lutaml 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d99e7b02bf3bfbddcf2d2f81d47e0a83e33abdc0617a9032a106e6930cb05f30
4
- data.tar.gz: bfc083ccb6fbd3e7824805e90515340812a1a44ba9522485d5b7a9969c36de2a
3
+ metadata.gz: bfe1f241f558def33ef0fc13446d842d50aac1b1003cade580fa3b62e730b722
4
+ data.tar.gz: 2d12efe1688915194f16cd857e6ca4deaf9852b98407112363bf106dcf3e60a9
5
5
  SHA512:
6
- metadata.gz: 4f4f9659c0cc4b62cfdd16e43d771eda047ff29c9731d9b397d186a6f0d214681c9c05f7a09f5ccfc70382fcfafae7df0ff833966d8454be2f947ca3ced9e376
7
- data.tar.gz: dc4de40cee4c6ea453936fe4097f732bea18aa5c92ecedbf9789a9719a994edb4afd0088d9b13fffdfc811b960be391c4272282cb39c063685c46e8865fad2b6
6
+ metadata.gz: d6c46b1d885bc2cb06ea76c4dd5ff057e2b2944579403c8582b43e8a66fe5cb67046b49c1d00526410aba63c0f1614900d3a65e681d67e5f75a3d9b66fc18fd9
7
+ data.tar.gz: 3da558c2e348387e60bdc1d0b079150c032e11dcf60731b8083b766dc129b10322c9e3f06892bfc06b8524df1ad453ed1d519153b19f55c7b34734ed20e4f614
@@ -4,7 +4,7 @@ name: rake
4
4
 
5
5
  on:
6
6
  push:
7
- branches: [ master, main ]
7
+ branches: [ master, main ]
8
8
  tags: [ v* ]
9
9
  pull_request:
10
10
 
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@master
34
24
 
@@ -49,5 +39,5 @@ jobs:
49
39
  with:
50
40
  token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
51
41
  repository: ${{ github.repository }}
52
- event-type: notify
42
+ event-type: tests-passed
53
43
  client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
data/.hound.yml ADDED
@@ -0,0 +1,5 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ ruby:
4
+ enabled: true
5
+ config_file: .rubocop.yml
data/.rubocop.yml ADDED
@@ -0,0 +1,10 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ inherit_from:
4
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
5
+
6
+ # local repo-specific modifications
7
+ # ...
8
+
9
+ AllCops:
10
+ TargetRubyVersion: 2.5
@@ -27,7 +27,7 @@ module Metanorma
27
27
  end
28
28
 
29
29
  def process(parent, reader, attrs)
30
- uml_document = ::Lutaml::Uml::Parsers::Dsl.parse(lutaml_temp(reader))
30
+ uml_document = ::Lutaml::Uml::Parsers::Dsl.parse(lutaml_temp(parent.document, reader))
31
31
  filename = generate_file(parent, reader, uml_document)
32
32
  through_attrs = generate_attrs(attrs)
33
33
  through_attrs["target"] = filename
@@ -39,8 +39,8 @@ module Metanorma
39
39
 
40
40
  private
41
41
 
42
- def lutaml_temp(reader)
43
- temp_file = Tempfile.new(["lutaml", ".lutaml"])
42
+ def lutaml_temp(document, reader)
43
+ temp_file = Tempfile.new(["lutaml", ".lutaml"], Utils.relative_file_path(document, ''))
44
44
  temp_file.puts(reader.read)
45
45
  temp_file.rewind
46
46
  temp_file
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.4.1".freeze
4
+ VERSION = "0.4.2".freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plugin-lutaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-05 00:00:00.000000000 Z
11
+ date: 2021-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -243,6 +243,8 @@ extra_rdoc_files: []
243
243
  files:
244
244
  - ".github/workflows/rake.yml"
245
245
  - ".gitignore"
246
+ - ".hound.yml"
247
+ - ".rubocop.yml"
246
248
  - CODE_OF_CONDUCT.md
247
249
  - Dockerfile
248
250
  - Gemfile