relaton-iso 1.15.6 → 1.16.1

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: fadb60d3f225174438b872a27c8632fcb9dcb685b66ef67071b7ab16dd78f052
4
- data.tar.gz: b53c685d0adf0856851f31d1808654f59f16d0ccd8db70b2ef818b22126e505e
3
+ metadata.gz: 45b4a081a62ab5a5f0a4e6f2c2cffb4950861f09e838401a68aa2208731d65ec
4
+ data.tar.gz: 01521bd3e1fa7853145a390461390b7a07dfc20e1efb02c2d6d90372d03a8664
5
5
  SHA512:
6
- metadata.gz: a10856c01099b1590b99ab0c2102aaf6dee654bd3fdf0b6a7f0717d3f85881bc58999219168e6ba707846cbd3fc785fbc9951003d7c21ad6c134af2a0fb0d4ea
7
- data.tar.gz: a9a4b7a79acf34a0a42218f28979ec06a41c0b6305fcfbb77ebec0cf4881e2b806548ae5603112122420f1c4ed0d365d9be50a2c291fb4d5a00fe68534f2311b
6
+ metadata.gz: 0e72371e46e2d03875fce213861ab9f087fdafca4abe748436f8ccc217ee2d82b5a089c20d73062d2a022366b79294ac7b1a16f0b3f59593f79d673800286877
7
+ data.tar.gz: c6fa8308f8feb86cc08ae3a1fde9e267169c5bf8b5292a6c97f4dbf7f28668b56ac111e3dc03411dfa537ce83905e87a273d866b275f376cef402a3f641a59b6
data/README.adoc CHANGED
@@ -72,14 +72,14 @@ item.docidentifier.detect { |di| di.type == "URN" }.id
72
72
  [source,ruby]
73
73
  ----
74
74
  item = RelatonIso::IsoBibliography.get "ISO 19115:2003"
75
- [relaton-iso] ("ISO 19115:2003") fetching from ISO...
76
- [relaton-iso] ("ISO 19115:2003") Found exact match.
75
+ [relaton-iso] (ISO 19115:2003) Fetching from iso.org ...
76
+ [relaton-iso] (ISO 19115:2003) Found: `ISO 19115:2003`
77
77
  => #<RelatonIsoBib::IsoBibliographicItem:0x00007f8c83429e30
78
78
  ...
79
79
 
80
80
  item = RelatonIso::IsoBibliography.get "ISO 19115", "2003"
81
- [relaton-iso] ("ISO 19115:2003") Fetching from ISO...
82
- [relaton-iso] ("ISO 19115:2003") Found ("ISO 19115:2003").
81
+ [relaton-iso] (ISO 19115:2003) Fetching from iso.org ...
82
+ [relaton-iso] (ISO 19115:2003) Found: `ISO 19115:2003`
83
83
  => #<RelatonIsoBib::IsoBibliographicItem:0x0000000112c9ca80
84
84
  ...
85
85
 
@@ -92,8 +92,8 @@ item.docidentifier[0].id
92
92
  [source,ruby]
93
93
  ----
94
94
  item = RelatonIso::IsoBibliography.get "ISO 19115"
95
- [relaton-iso] ("ISO 19115") fetching from ISO...
96
- [relaton-iso] ("ISO 19115") Found ("ISO 19115:2003").
95
+ [relaton-iso] (ISO 19115) Fetching from iso.org ...
96
+ [relaton-iso] (ISO 19115) Found: `ISO 19115:2003`
97
97
  => #<RelatonIsoBib::IsoBibliographicItem:0x00007f8c830275a8
98
98
  ...
99
99
 
@@ -106,8 +106,8 @@ item.docidentifier[0].id
106
106
  [source,ruby]
107
107
  ----
108
108
  item = RelatonIso::IsoBibliography.get "ISO 19115-1"
109
- [relaton-iso] ("ISO 19115-1") fetching from ISO...
110
- [relaton-iso] ("ISO 19115-1") Found ("ISO 19115-1:2014").
109
+ [relaton-iso] (ISO 19115-1) Fetching from iso.org ...
110
+ [relaton-iso] (ISO 19115-1) Found: `ISO 19115-1:2014`
111
111
  => #<RelatonIsoBib::IsoBibliographicItem:0x00007f8c83408af0
112
112
  ...
113
113
 
@@ -120,14 +120,14 @@ item.docidentifier[0].id
120
120
  [source,ruby]
121
121
  ----
122
122
  item = RelatonIso::IsoBibliography.get "ISO 19115 (all parts)"
123
- [relaton-iso] ("ISO 19115") Fetching from ISO...
124
- [relaton-iso] ("ISO 19115") Found ("ISO 19115").
123
+ [relaton-iso] (ISO 19115) Fetching from iso.org ...
124
+ [relaton-iso] (ISO 19115) Found: `ISO 19115`
125
125
  => #<RelatonIsoBib::IsoBibliographicItem:0x00007f8ca216e118
126
126
  ...
127
127
 
128
128
  item = RelatonIso::IsoBibliography.get "ISO 19115", nil, all_parts: true
129
- [relaton-iso] ("ISO 19115") Fetching from ISO...
130
- [relaton-iso] ("ISO 19115") Found ("ISO 19115").
129
+ [relaton-iso] (ISO 19115) Fetching from iso.org ...
130
+ [relaton-iso] (ISO 19115) Found: `ISO 19115`
131
131
  => #<RelatonIsoBib::IsoBibliographicItem:0x00007f8c830f3d38
132
132
  ...
133
133
 
@@ -135,13 +135,13 @@ item.docidentifier[0].id
135
135
  => "ISO 19115 (all parts)"
136
136
 
137
137
  item = RelatonIso::IsoBibliography.get "ISO 19115-1 (all parts)"
138
- [relaton-iso] ("ISO 19115") Fetching from ISO...
139
- [relaton-iso] ("ISO 19115") Found ("ISO 19115").
138
+ [relaton-iso] (ISO 19115) Fetching from iso.org ...
139
+ [relaton-iso] (ISO 19115) Found: `ISO 19115`
140
140
  => #<RelatonIsoBib::IsoBibliographicItem:0x00007f8c8290e5a0
141
141
 
142
142
  item = RelatonIso::IsoBibliography.get "ISO 19115-1", nil, all_parts: true
143
- [relaton-iso] ("ISO 19115") Fetching from ISO...
144
- [relaton-iso] ("ISO 19115") Found ("ISO 19115").
143
+ [relaton-iso] (ISO 19115) Fetching from iso.org ...
144
+ [relaton-iso] (ISO 19115) Found: `ISO 19115`
145
145
  => #<RelatonIsoBib::IsoBibliographicItem:0x00007f8c925355b8
146
146
  ...
147
147
 
@@ -234,8 +234,8 @@ item.title lang: 'fr'
234
234
  @type="main">]>
235
235
 
236
236
  item = RelatonIso::IsoBibliography.get "ISO 19115:2003"
237
- [relaton-iso] ("ISO 19115:2003") Fetching from ISO...
238
- [relaton-iso] ("ISO 19115:2003") Found ("ISO 19115:2003").
237
+ [relaton-iso] (ISO 19115:2003) Fetching from iso.org ...
238
+ [relaton-iso] (ISO 19115:2003) Found: `ISO 19115:2003`
239
239
  => #<RelatonIsoBib::IsoBibliographicItem:0x00007fa8870b69e0
240
240
 
241
241
  item.abstract lang: 'en'
@@ -42,8 +42,9 @@ module RelatonIso
42
42
  # @return [Pubid::Iso::Identifier]
43
43
  def pubid
44
44
  @pubid ||= Pubid::Iso::Identifier.parse_from_title(hit[:title])
45
- rescue Pubid::Iso::Errors::WrongTypeError, Pubid::Iso::Errors::ParseError => e
46
- Util.warn "unable to find an identifier in `#{hit[:title]}`."
45
+ rescue Pubid::Iso::Errors::WrongTypeError,
46
+ Pubid::Iso::Errors::ParseError => e
47
+ Util.warn "Unable to find an identifier in: `#{hit[:title]}`."
47
48
  Util.warn e.message
48
49
  end
49
50
  end
@@ -34,7 +34,7 @@ module RelatonIso
34
34
  formattedref: RelatonBib::FormattedRef.new(content: hi.pubid.to_s),
35
35
  )
36
36
  all_parts_item.relation << RelatonBib::DocumentRelation.new(
37
- type: "instance", bibitem: isobib,
37
+ type: "instanceOf", bibitem: isobib,
38
38
  )
39
39
  end
40
40
  all_parts_item
@@ -38,7 +38,7 @@ module RelatonIso
38
38
  query_pubid = Pubid::Iso::Identifier.parse(code)
39
39
  query_pubid.year = year if year
40
40
  query_pubid.part = nil if opts[:all_parts]
41
- Util.warn "(#{query_pubid}) Fetching from ISO..."
41
+ Util.warn "(#{query_pubid}) Fetching from iso.org ..."
42
42
 
43
43
  hits, missed_year_ids = isobib_search_filter(query_pubid, opts)
44
44
  tip_ids = look_up_with_any_types_stages(hits, ref, opts)
@@ -54,7 +54,7 @@ module RelatonIso
54
54
  response_docid = ret.docidentifier.first.id.sub(" (all parts)", "")
55
55
  response_pubid = Pubid::Iso::Identifier.parse(response_docid)
56
56
 
57
- Util.warn "(#{query_pubid}) Found `#{response_pubid}`."
57
+ Util.warn "(#{query_pubid}) Found: `#{response_pubid}`"
58
58
 
59
59
  get_all = (
60
60
  (query_pubid.year && opts[:keep_year].nil?) ||
@@ -65,7 +65,7 @@ module RelatonIso
65
65
 
66
66
  ret.to_most_recent_reference
67
67
  rescue Pubid::Core::Errors::ParseError
68
- Util.warn "(#{code}) is not recognized as a standards identifier."
68
+ Util.warn "(#{code}) Is not recognized as a standards identifier."
69
69
  nil
70
70
  end
71
71
 
@@ -179,7 +179,8 @@ module RelatonIso
179
179
  hit_collection = search(query_pubid_without_year.to_s)
180
180
 
181
181
  # filter only matching hits
182
- filter_hits hit_collection, query_pubid, opts[:all_parts], any_types_stages
182
+ filter_hits hit_collection, query_pubid, opts[:all_parts],
183
+ any_types_stages
183
184
  end
184
185
 
185
186
  #
@@ -196,7 +197,8 @@ module RelatonIso
196
197
  # filter out
197
198
  result = hit_collection.select do |i|
198
199
  hit_pubid = i.pubid
199
- matches_base?(query_pubid, hit_pubid, any_types_stages: any_stypes_tages) &&
200
+ matches_base?(query_pubid, hit_pubid,
201
+ any_types_stages: any_stypes_tages) &&
200
202
  matches_parts?(query_pubid, hit_pubid, all_parts: all_parts) &&
201
203
  query_pubid.corrigendums == hit_pubid.corrigendums &&
202
204
  query_pubid.amendments == hit_pubid.amendments
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonIso
4
- VERSION = "1.15.6"
4
+ VERSION = "1.16.1"
5
5
  end
data/relaton_iso.gemspec CHANGED
@@ -28,6 +28,5 @@ Gem::Specification.new do |spec|
28
28
 
29
29
  spec.add_dependency "algolia", "~> 2.3.0"
30
30
  spec.add_dependency "pubid-iso", "~> 0.6.0"
31
- spec.add_dependency "relaton-bib", "~> 1.14.13"
32
- spec.add_dependency "relaton-iso-bib", "~> 1.14.0"
31
+ spec.add_dependency "relaton-iso-bib", "~> 1.16.0"
33
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.6
4
+ version: 1.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-09 00:00:00.000000000 Z
11
+ date: 2023-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: algolia
@@ -38,34 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.6.0
41
- - !ruby/object:Gem::Dependency
42
- name: relaton-bib
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 1.14.13
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 1.14.13
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: relaton-iso-bib
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: 1.14.0
47
+ version: 1.16.0
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: 1.14.0
54
+ version: 1.16.0
69
55
  description: 'RelatonIso: retrieve ISO Standards for bibliographic use using the IsoBibliographicItem
70
56
  model'
71
57
  email: