relaton 0.2.2 → 0.2.3
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 +4 -4
- data/Gemfile.lock +11 -8
- data/lib/relaton/db.rb +4 -4
- data/lib/relaton/version.rb +1 -1
- data/relaton.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1fa5d8a5c2c633c1f8c28c1b9edd31b52964afade16ef80a1a294842b5dedfda
|
|
4
|
+
data.tar.gz: 1f050291e3b4c6b64226db77440cdd640669f578e16bc50db62654b0cb57010d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2cb28ec07668eb2cea8c02e1084404765dee1e642da1b820b58c4158817a184ff1a69de1963162a3dccf21f95fb56a8569f2d40ac8dc908e394df938b7a0c4e6
|
|
7
|
+
data.tar.gz: a673ab75765ccc1ba423832fadf54cf185ee9d26d6e1a41f7cba11fceff12ba15b9375e814ca5d9ae9db2ff05b043aad34812fdd5c9ecb8d65d532719c0a8646
|
data/Gemfile.lock
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
relaton (0.2.
|
|
4
|
+
relaton (0.2.2)
|
|
5
5
|
algoliasearch
|
|
6
|
-
gbbib (~> 0.3.
|
|
7
|
-
|
|
6
|
+
gbbib (~> 0.3.1)
|
|
7
|
+
iecbib (~> 0.1.1)
|
|
8
|
+
ietfbib (~> 0.4.1)
|
|
8
9
|
iso-bib-item (~> 0.3.0)
|
|
9
|
-
isobib (~> 0.3.
|
|
10
|
+
isobib (~> 0.3.1)
|
|
10
11
|
|
|
11
12
|
GEM
|
|
12
13
|
remote: https://rubygems.org/
|
|
@@ -25,7 +26,7 @@ GEM
|
|
|
25
26
|
ffi (1.9.25)
|
|
26
27
|
formatador (0.2.5)
|
|
27
28
|
gb-agencies (0.0.3)
|
|
28
|
-
gbbib (0.3.
|
|
29
|
+
gbbib (0.3.1)
|
|
29
30
|
cnccs (~> 0.1.1)
|
|
30
31
|
gb-agencies (~> 0.0.1)
|
|
31
32
|
iso-bib-item (~> 0.3.0)
|
|
@@ -44,13 +45,15 @@ GEM
|
|
|
44
45
|
guard-compat (~> 1.1)
|
|
45
46
|
rspec (>= 2.99.0, < 4.0)
|
|
46
47
|
httpclient (2.8.3)
|
|
47
|
-
|
|
48
|
+
iecbib (0.1.1)
|
|
49
|
+
iso-bib-item (~> 0.3.0)
|
|
50
|
+
ietfbib (0.4.1)
|
|
48
51
|
iso-bib-item (~> 0.3.0)
|
|
49
52
|
iso-bib-item (0.3.0)
|
|
50
53
|
isoics (~> 0.1.6)
|
|
51
54
|
nokogiri (~> 1.8.4)
|
|
52
55
|
ruby_deep_clone (~> 0.8.0)
|
|
53
|
-
isobib (0.3.
|
|
56
|
+
isobib (0.3.1)
|
|
54
57
|
algoliasearch
|
|
55
58
|
iso-bib-item (~> 0.3.0)
|
|
56
59
|
isoics (0.1.7)
|
|
@@ -97,7 +100,7 @@ GEM
|
|
|
97
100
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
98
101
|
rspec-support (~> 3.8.0)
|
|
99
102
|
rspec-support (3.8.0)
|
|
100
|
-
rubocop (0.59.
|
|
103
|
+
rubocop (0.59.1)
|
|
101
104
|
jaro_winkler (~> 1.5.1)
|
|
102
105
|
parallel (~> 1.10)
|
|
103
106
|
parser (>= 2.5, != 2.5.1.1)
|
data/lib/relaton/db.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Relaton
|
|
|
5
5
|
class RelatonError < StandardError; end
|
|
6
6
|
|
|
7
7
|
class Db
|
|
8
|
-
SUPPORTED_GEMS = %w[isobib ietfbib gbbib].freeze
|
|
8
|
+
SUPPORTED_GEMS = %w[isobib ietfbib gbbib iecbib].freeze
|
|
9
9
|
|
|
10
10
|
# @param global_cache [String] filename of global DB
|
|
11
11
|
# @param local_cache [String] filename of local DB
|
|
@@ -31,8 +31,8 @@ module Relaton
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# The class of reference requested is determined by the prefix of the code:
|
|
34
|
-
# GB Standard for gbbib, IETF for ietfbib, ISO
|
|
35
|
-
# @param code [String] the ISO standard Code to look up (e
|
|
34
|
+
# GB Standard for gbbib, IETF for ietfbib, ISO for isobib, IEC or IEV for iecbib,
|
|
35
|
+
# @param code [String] the ISO standard Code to look up (e.g. "ISO 9000")
|
|
36
36
|
# @param year [String] the year the standard was published (optional)
|
|
37
37
|
# @param opts [Hash] options; restricted to :all_parts if all-parts reference is required
|
|
38
38
|
# @return [String] Relaton XML serialisation of reference
|
|
@@ -84,7 +84,7 @@ module Relaton
|
|
|
84
84
|
|
|
85
85
|
def standard_class(code)
|
|
86
86
|
@registry.processors.each do |name, processor|
|
|
87
|
-
return name if
|
|
87
|
+
return name if /^#{processor.prefix}/.match(code) ||
|
|
88
88
|
processor.defaultprefix.match(code)
|
|
89
89
|
end
|
|
90
90
|
allowed = @registry.processors.reduce([]) do |m, (_k, v)|
|
data/lib/relaton/version.rb
CHANGED
data/relaton.gemspec
CHANGED
|
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
spec.add_dependency "gbbib", "~> 0.3.1"
|
|
32
32
|
spec.add_dependency "isobib", "~> 0.3.1"
|
|
33
33
|
spec.add_dependency "ietfbib", "~> 0.4.1"
|
|
34
|
+
spec.add_dependency "iecbib", "~> 0.1.1"
|
|
34
35
|
spec.add_dependency 'iso-bib-item', '~> 0.3.0'
|
|
35
36
|
|
|
36
37
|
spec.add_development_dependency "bundler", "~> 1.15"
|
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.2.
|
|
4
|
+
version: 0.2.3
|
|
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-09-
|
|
11
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: algoliasearch
|
|
@@ -66,6 +66,20 @@ dependencies:
|
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: 0.4.1
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: iecbib
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 0.1.1
|
|
76
|
+
type: :runtime
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: 0.1.1
|
|
69
83
|
- !ruby/object:Gem::Dependency
|
|
70
84
|
name: iso-bib-item
|
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|