relaton 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c281ae3a9f26d58a6dcbbcaf72695e12d82b94d21fac9e2d9f48c22f45dde8ba
4
- data.tar.gz: 5be14c74aa6e9c82f07f93965893b007dea86ee11618627226464ae4b0664062
3
+ metadata.gz: 461a1144fc2a8bcad638809bba2487dc86a28e0ec7faacd552a63c81228ac109
4
+ data.tar.gz: b87e444bdbbd5a16ae12269fa9feb2fecb957175f1fffc29b4959944ee523e83
5
5
  SHA512:
6
- metadata.gz: c8cab9858a0b366fb02a8f4c29e3a915c654a8b52f6942e25023ba0b85fe8a804cfa6e076af356f9325e0cb685dcde8dddcce26677bc70b091fd9ca9ee3ddf73
7
- data.tar.gz: 94feed4599a25d9aa374c834a351d93263dd4ac11e37a3643daa244ee9229869b1aa48c4048b3a5a1dc83fe44ba38dec57224f190b270edb6b57b8daa0e1f92d
6
+ metadata.gz: 22f6aa0825ee61196b772b6a225711fd2164110f89135ae2f3922ed88f4db3230eea7221cf3324bee869708176919a3cf6b01117b309b4a80b9e63c1ffc57ab4
7
+ data.tar.gz: 44d21285d3569156d2364eadab4c42781c88c95cbbd2f1220e5b988a26d6212496a8b61013e53ca745755859119ee9d6c59ceb43bf55771a48185bbb508feb0e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- relaton (0.1.5)
4
+ relaton (0.1.6)
5
5
  algoliasearch
6
6
  gbbib (~> 0.2.1)
7
7
  iso-bib-item (~> 0.2.3)
@@ -16,7 +16,7 @@ GEM
16
16
  json (>= 1.5.1)
17
17
  ast (2.4.0)
18
18
  byebug (9.1.0)
19
- cnccs (0.1.2)
19
+ cnccs (0.1.3)
20
20
  coderay (1.1.2)
21
21
  diff-lcs (1.3)
22
22
  docile (1.3.1)
@@ -25,7 +25,7 @@ GEM
25
25
  ffi (1.9.25)
26
26
  formatador (0.2.5)
27
27
  gb-agencies (0.0.3)
28
- gbbib (0.2.2)
28
+ gbbib (0.2.3)
29
29
  cnccs (~> 0.1.1)
30
30
  gb-agencies (~> 0.0.1)
31
31
  iso-bib-item (~> 0.2)
@@ -44,14 +44,14 @@ GEM
44
44
  guard-compat (~> 1.1)
45
45
  rspec (>= 2.99.0, < 4.0)
46
46
  httpclient (2.8.3)
47
- iso-bib-item (0.2.4)
47
+ iso-bib-item (0.2.5)
48
48
  isoics (~> 0.1.6)
49
49
  nokogiri (~> 1.8.4)
50
50
  ruby_deep_clone (~> 0.8.0)
51
- isobib (0.2.2)
51
+ isobib (0.2.5)
52
52
  algoliasearch
53
- iso-bib-item (~> 0.2.3)
54
- isoics (0.1.6)
53
+ iso-bib-item (~> 0.2.4)
54
+ isoics (0.1.7)
55
55
  jaro_winkler (1.5.1)
56
56
  json (2.1.0)
57
57
  listen (3.1.5)
data/README.adoc CHANGED
@@ -27,6 +27,15 @@ The gem can be extended to use other standards-specific gems. Standards-specific
27
27
  * `@short`, the name of the gem
28
28
  * `@prefix`, the regex constraining the standards code to be processed
29
29
  * `get(code, date, opts)`, which takes a standards code, a year, and a hash of options, and returns an iso-bib-item bibliographic entry
30
+ ** `date == nil`: an ISO reference is treated as a generic reference to the latest available version of the reference. The latest
31
+ version retrieved has its date of publicatipn stripped. The dated reference is retained as an `instanceOf` relation to the reference.
32
+ e.g. `get("ISO 19115-1", nil)` is transformed from a reference to `ISO 19115-1:2014` (the latest available online) to an undated reference
33
+ to `ISO 19115-1`.
34
+ ** `opts[:keep_date] == true`: undoes the behaviour of `date == nil`: the most recent dated instance of the reference is retrieved.
35
+ e.g. `get("ISO 19115-1", nil, keep_date: true)` returns a reference to `ISO 19115-1:2014`
36
+ ** `opts[:all_parts] == true`: an ISO reference for a specific document part is transformed into a reference to all parts of the document
37
+ (which does not have a distinct web page). The reference to the specific document part is retained as a `partOf` relation to the reference.
38
+ e.g. `get("ISO 19115-1", "2014", all_parts: true)` is transformed into a reference to `ISO 19115 (all parts)`.
30
39
 
31
40
  == Behaviours
32
41
 
data/lib/relaton/db.rb CHANGED
@@ -78,7 +78,7 @@ module Relaton
78
78
 
79
79
  def standard_class(code)
80
80
  @registry.processors.each do |name, processor|
81
- processor.prefix.match?(code) and return name
81
+ return name if processor.prefix.match(code)
82
82
  end
83
83
  allowed = @registry.processors.reduce([]) do |m, (_k, v)|
84
84
  m << v.prefix.inspect
@@ -120,7 +120,7 @@ module Relaton
120
120
  end
121
121
  end
122
122
 
123
- # hash uses => , because the hash is imported from JSONo
123
+ # hash uses => , because the hash is imported from JSON
124
124
  # @param code [String]
125
125
  # @param year [String]
126
126
  # @param opts [Hash]
@@ -1,3 +1,3 @@
1
1
  module Relaton
2
- VERSION = "0.1.5".freeze
2
+ VERSION = "0.1.6".freeze
3
3
  end
Binary file
Binary file
Binary file
@@ -1,8 +1,8 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <documents>
3
3
  <bibitem type="international-standard" id="ISO19115-1">
4
- <title format="text/plain" language="en" script="Latn">[ -- ]</title>
5
- <title format="text/plain" language="fr" script="Latn">[ -- ]</title>
4
+ <title format="text/plain" language="en" script="Latn">Geographic information -- Metadata -- Part 1: Fundamentals</title>
5
+ <title format="text/plain" language="fr" script="Latn">Information géographique -- Métadonnées -- Partie 1: Principes de base</title>
6
6
  <uri type="src">https://www.iso.org/standard/53798.html</uri>
7
7
  <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:53798:en</uri>
8
8
  <uri type="rss">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</uri>
@@ -48,8 +48,8 @@
48
48
  </relation>
49
49
  <relation type="instance">
50
50
  <bibitem type="international-standard">
51
- <title format="text/plain" language="en" script="Latn">[ -- ]</title>
52
- <title format="text/plain" language="fr" script="Latn">[ -- ]</title>
51
+ <title format="text/plain" language="en" script="Latn">Geographic information -- Metadata -- Part 1: Fundamentals</title>
52
+ <title format="text/plain" language="fr" script="Latn">Information géographique -- Métadonnées -- Partie 1: Principes de base</title>
53
53
  <uri type="src">https://www.iso.org/standard/53798.html</uri>
54
54
  <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:53798:en</uri>
55
55
  <uri type="rss">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</uri>
@@ -99,7 +99,7 @@
99
99
  </bibitem>
100
100
  </relation>
101
101
  <editorialgroup>
102
- <technical_committee number="211" type="technicalCommittee">ISO/TC 211Geographic information/Geomatics</technical_committee>
102
+ <technical_committee number="211" type="TC">ISO/TC 211Geographic information/Geomatics</technical_committee>
103
103
  </editorialgroup>
104
104
  <ics>
105
105
  <code>35.240.70</code>
@@ -108,7 +108,7 @@
108
108
  </bibitem>
109
109
  </relation>
110
110
  <editorialgroup>
111
- <technical_committee number="211" type="technicalCommittee">ISO/TC 211Geographic information/Geomatics</technical_committee>
111
+ <technical_committee number="211" type="TC">ISO/TC 211Geographic information/Geomatics</technical_committee>
112
112
  </editorialgroup>
113
113
  <ics>
114
114
  <code>35.240.70</code>
@@ -116,8 +116,8 @@
116
116
  </ics>
117
117
  </bibitem>
118
118
  <bibitem type="international-standard" id="ISO19115-2">
119
- <title format="text/plain" language="en" script="Latn">[ -- ]</title>
120
- <title format="text/plain" language="fr" script="Latn">[ -- ]</title>
119
+ <title format="text/plain" language="en" script="Latn">Geographic information -- Metadata -- Part 2: Extensions for imagery and gridded data</title>
120
+ <title format="text/plain" language="fr" script="Latn">Information géographique -- Métadonnées -- Partie 2: Extensions pour les images et les matrices</title>
121
121
  <uri type="src">https://www.iso.org/standard/39229.html</uri>
122
122
  <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:39229:en</uri>
123
123
  <uri type="rss">https://www.iso.org/contents/data/standard/03/92/39229.detail.rss</uri>
@@ -153,8 +153,8 @@
153
153
  </relation>
154
154
  <relation type="instance">
155
155
  <bibitem type="international-standard">
156
- <title format="text/plain" language="en" script="Latn">[ -- ]</title>
157
- <title format="text/plain" language="fr" script="Latn">[ -- ]</title>
156
+ <title format="text/plain" language="en" script="Latn">Geographic information -- Metadata -- Part 2: Extensions for imagery and gridded data</title>
157
+ <title format="text/plain" language="fr" script="Latn">Information géographique -- Métadonnées -- Partie 2: Extensions pour les images et les matrices</title>
158
158
  <uri type="src">https://www.iso.org/standard/39229.html</uri>
159
159
  <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:39229:en</uri>
160
160
  <uri type="rss">https://www.iso.org/contents/data/standard/03/92/39229.detail.rss</uri>
@@ -194,7 +194,7 @@
194
194
  </bibitem>
195
195
  </relation>
196
196
  <editorialgroup>
197
- <technical_committee number="211" type="technicalCommittee">ISO/TC 211Geographic information/Geomatics</technical_committee>
197
+ <technical_committee number="211" type="TC">ISO/TC 211Geographic information/Geomatics</technical_committee>
198
198
  </editorialgroup>
199
199
  <ics>
200
200
  <code>35.240.70</code>
@@ -203,7 +203,7 @@
203
203
  </bibitem>
204
204
  </relation>
205
205
  <editorialgroup>
206
- <technical_committee number="211" type="technicalCommittee">ISO/TC 211Geographic information/Geomatics</technical_committee>
206
+ <technical_committee number="211" type="TC">ISO/TC 211Geographic information/Geomatics</technical_committee>
207
207
  </editorialgroup>
208
208
  <ics>
209
209
  <code>35.240.70</code>
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-08 00:00:00.000000000 Z
11
+ date: 2018-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: algoliasearch