relaton-plateau 1.19.1 → 1.19.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +3 -3
- data/{grammar → grammars}/biblio.rng +3 -1
- data/lib/relaton/plateau/bibitem.rb +5 -5
- data/lib/relaton/plateau/parser.rb +14 -1
- data/lib/relaton/plateau/version.rb +1 -1
- metadata +8 -8
- /data/{grammar → grammars}/basicdoc.rng +0 -0
- /data/{grammar → grammars}/biblio-standoc.rng +0 -0
- /data/{grammar → grammars}/relaton-plateau-compile.rng +0 -0
- /data/{grammar → grammars}/relaton-plateau.rng +0 -0
- /data/{relaton-plateau.gemspec → relaton_plateau.gemspec} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 564c9b97d0c81b9479fe0c6bd4fcff8004b61821efffd19beda099fba6e72cbb
|
4
|
+
data.tar.gz: 3e80de9a63e4a4c4e9439ec5b3ab9ce05b57710ffea486b6e8b669fb167bf7be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89c7bea4e9de29a64b9436f8c824cd8364a82658f2250fd882c31cc560a3c674ff402db657046e4cb7a4cedeba10a1fff6fd689285e40cc979c416b9402cb41e
|
7
|
+
data.tar.gz: 68b6f8bf152cad146f811458f8e421beb7a22772e4999623f10e3a2a39a03d89689178c905e02c13f516910b7a2acc6796f5f7288b006aa335ac92fa8af26137
|
data/README.adoc
CHANGED
@@ -6,11 +6,11 @@ image:https://github.com/relaton/relaton-plateau/workflows/windows/badge.svg["Bu
|
|
6
6
|
image:https://github.com/relaton/relaton-plateau/workflows/ubuntu/badge.svg["Build Status (Ubuntu)", link="https://github.com/relaton/relaton-plateau/actions?workflow=ubuntu"]
|
7
7
|
image:https://codeclimate.com/github/relaton/relaton-plateau/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/relaton-plateau"]
|
8
8
|
image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-plateau.svg["Pull Requests", link="https://github.com/relaton/relaton-plateau/pulls"]
|
9
|
-
image:https://img.shields.io/github/commits-since/relaton/relaton/latest.svg["Commits since latest",link="https://github.com/relaton/relaton/releases"]
|
9
|
+
image:https://img.shields.io/github/commits-since/relaton/relaton/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-plateau/releases"]
|
10
10
|
|
11
|
-
RelatonPlateau is a Ruby gem that implements the https://github.com/metanorma/metanorma-model-plateau#iso-bibliographic-item[
|
11
|
+
RelatonPlateau is a Ruby gem that implements the https://github.com/metanorma/metanorma-model-plateau#iso-bibliographic-item[BibliographicItem model].
|
12
12
|
|
13
|
-
You can use it to retrieve metadata of
|
13
|
+
You can use it to retrieve metadata of Plateau Standards from GitHub repositori, and access such metadata through the `BibliographicItem` object.
|
14
14
|
|
15
15
|
== Installation
|
16
16
|
|
@@ -4,13 +4,13 @@ require_relative "stagename"
|
|
4
4
|
module Relaton
|
5
5
|
module Plateau
|
6
6
|
class BibItem < RelatonBib::BibliographicItem
|
7
|
-
# @return [Relaton::Plateau::Cover]
|
7
|
+
# @return [Relaton::Plateau::Cover, nil]
|
8
8
|
attr_reader :cover
|
9
9
|
|
10
|
-
# @return [Relaton::Plateau::Stagename]
|
10
|
+
# @return [Relaton::Plateau::Stagename, nil]
|
11
11
|
attr_reader :stagename
|
12
12
|
|
13
|
-
# @return [Integer]
|
13
|
+
# @return [Integer, nil]
|
14
14
|
attr_reader :filesize
|
15
15
|
|
16
16
|
def initialize(**args)
|
@@ -44,8 +44,8 @@ module Relaton
|
|
44
44
|
ics.each { |i| b.ics i }
|
45
45
|
structuredidentifier&.to_xml b
|
46
46
|
stagename&.to_xml b
|
47
|
-
cover
|
48
|
-
b.filesize filesize
|
47
|
+
cover&.to_xml b
|
48
|
+
b.filesize filesize if filesize
|
49
49
|
end
|
50
50
|
ext["schema-version"] = ext_schema if !opts[:embedded] && respond_to?(:ext_schema) && ext_schema
|
51
51
|
end
|
@@ -2,7 +2,7 @@ module Relaton
|
|
2
2
|
module Plateau
|
3
3
|
class Parser
|
4
4
|
ATTRIS = %i[docid title abstract cover edition type doctype subdoctype
|
5
|
-
date link filesize keyword structuredidentifier].freeze
|
5
|
+
date link contributor filesize keyword structuredidentifier].freeze
|
6
6
|
|
7
7
|
def initialize(item)
|
8
8
|
@item = item
|
@@ -53,6 +53,19 @@ module Relaton
|
|
53
53
|
def parse_date; [] end
|
54
54
|
def parse_link; [] end
|
55
55
|
|
56
|
+
def parse_contributor
|
57
|
+
name = [
|
58
|
+
{ content: "国土交通省", language: "ja", script: "Jpan" },
|
59
|
+
{
|
60
|
+
content: "Japanese Ministry of Land, Infrastructure, Transport and Tourism",
|
61
|
+
language: "en",
|
62
|
+
script: "Latn"
|
63
|
+
}
|
64
|
+
]
|
65
|
+
org = RelatonBib::Organization.new(name: name, abbreviation: "MLIT")
|
66
|
+
[RelatonBib::ContributionInfo.new(entity: org, role: [type: "publisher"])]
|
67
|
+
end
|
68
|
+
|
56
69
|
def create_date(date, type = "published")
|
57
70
|
RelatonBib::BibliographicDate.new(type: type, on: date)
|
58
71
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-plateau
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.19.
|
4
|
+
version: 1.19.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|
@@ -84,11 +84,11 @@ files:
|
|
84
84
|
- Rakefile
|
85
85
|
- bin/console
|
86
86
|
- bin/setup
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
90
|
-
-
|
91
|
-
-
|
87
|
+
- grammars/basicdoc.rng
|
88
|
+
- grammars/biblio-standoc.rng
|
89
|
+
- grammars/biblio.rng
|
90
|
+
- grammars/relaton-plateau-compile.rng
|
91
|
+
- grammars/relaton-plateau.rng
|
92
92
|
- lib/relaton/plateau.rb
|
93
93
|
- lib/relaton/plateau/bibitem.rb
|
94
94
|
- lib/relaton/plateau/bibliography.rb
|
@@ -104,7 +104,7 @@ files:
|
|
104
104
|
- lib/relaton/plateau/util.rb
|
105
105
|
- lib/relaton/plateau/version.rb
|
106
106
|
- lib/relaton/plateau/xml_parser.rb
|
107
|
-
-
|
107
|
+
- relaton_plateau.gemspec
|
108
108
|
- sig/relaton/plateau.rbs
|
109
109
|
homepage: https://github.com/relaton/relaton-plateau
|
110
110
|
licenses:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|