relaton-bsi 1.8.2 → 1.8.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 +7 -7
- data/lib/relaton_bsi/bsi_bibliography.rb +5 -10
- data/lib/relaton_bsi/processor.rb +1 -1
- data/lib/relaton_bsi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84f6c2293e2c3e5fce33f142ae0e5055f000c0066a19a030dc67e29f360424b6
|
4
|
+
data.tar.gz: 2c70d908fc92fc700695c967087f0eb4d9217e660ed997b270688269422fa58a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b7e2d420bd3bb4b9da454e7b69cc78ec1d262b3918ba23b565ce43824e4092f5b6793dd7a5b7dc3ffc0d8f11fdc9d75012fac62dd0defa0f201da4c4e7016be
|
7
|
+
data.tar.gz: 2f11789f4274ff43ef07c8ddf44b141e6b524d76cd9fd53b996c6c1d6b22c17e31d649469a424b0b3e385caf1342a1c53fe5fb73e3b752106c591c9b3aa4163e
|
data/README.adoc
CHANGED
@@ -33,7 +33,7 @@ Or install it yourself as:
|
|
33
33
|
----
|
34
34
|
require 'relaton_bsi'
|
35
35
|
|
36
|
-
hit_collection = RelatonBsi::BsiBibliography.search("
|
36
|
+
hit_collection = RelatonBsi::BsiBibliography.search("BS EN ISO 8848")
|
37
37
|
=> <RelatonBsi::HitCollection:0x007fead49fe1f8 @ref=BS EN ISO 8848 @fetched=false>
|
38
38
|
|
39
39
|
item = hit_collection[1].fetch
|
@@ -118,15 +118,15 @@ item.to_xml bibdata: true
|
|
118
118
|
[source,ruby]
|
119
119
|
----
|
120
120
|
RelatonBsi::BsiBibliographicItem RelatonBsi::BsiBibliography
|
121
|
-
[7] pry(main)> RelatonBsi::BsiBibliography.get "
|
122
|
-
[relaton-bsi] ("
|
123
|
-
[relaton-bsi] ("
|
121
|
+
[7] pry(main)> RelatonBsi::BsiBibliography.get "BS EN ISO 8848:2021"
|
122
|
+
[relaton-bsi] ("BS EN ISO 8848:2021") fetching...
|
123
|
+
[relaton-bsi] ("BS EN ISO 8848:2021") found BS EN ISO 8848:2021
|
124
124
|
=> #<RelatonBsi::BsiBibliographicItem:0x007feb14814ca8
|
125
125
|
...
|
126
126
|
|
127
|
-
RelatonBsi::BsiBibliography.get "
|
128
|
-
[relaton-bsi] ("
|
129
|
-
[relaton-bsi] ("
|
127
|
+
RelatonBsi::BsiBibliography.get "BS EN ISO 8848", "2021"
|
128
|
+
[relaton-bsi] ("BS EN ISO 8848") fetching...
|
129
|
+
[relaton-bsi] ("BS EN ISO 8848") found BS EN ISO 8848:2021
|
130
130
|
=> #<RelatonBsi::BsiBibliographicItem:0x007feaf59188a8
|
131
131
|
...
|
132
132
|
----
|
@@ -29,15 +29,9 @@ module RelatonBsi
|
|
29
29
|
# @param opts [Hash] options; restricted to :all_parts if all-parts reference is required
|
30
30
|
# @return [String] Relaton XML serialisation of reference
|
31
31
|
def get(code, year = nil, opts = {}) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
# code = code1
|
36
|
-
# year = year1
|
37
|
-
# end
|
38
|
-
# end
|
39
|
-
|
40
|
-
ret = bib_get1(code, year, opts)
|
32
|
+
c, y = code.split ':'
|
33
|
+
year ||= y
|
34
|
+
ret = bib_get1(c, year, opts)
|
41
35
|
return nil if ret.nil?
|
42
36
|
|
43
37
|
# ret = ret.to_most_recent_reference unless year || opts[:keep_year]
|
@@ -67,7 +61,8 @@ module RelatonBsi
|
|
67
61
|
end
|
68
62
|
|
69
63
|
def search_filter(code) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
|
70
|
-
%r{^BSI\s(?<code1>[^:]+)} =~ code
|
64
|
+
# %r{^BSI\s(?<code1>[^:]+)} =~ code
|
65
|
+
code1 = code.sub(/^BSI\s/, "")
|
71
66
|
warn "[relaton-bsi] (\"#{code}\") fetching..."
|
72
67
|
return [] unless code1
|
73
68
|
|
data/lib/relaton_bsi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-bsi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.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: 2021-06-
|
11
|
+
date: 2021-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|