gbbib 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/gbbib.gemspec +1 -1
- data/lib/gbbib/gb_bibliographic_item.rb +2 -2
- data/lib/gbbib/version.rb +1 -1
- data/lib/gbbib/xml_parser.rb +5 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78ab0edb324c7147e21cdffdb800cac302407fbcbe024ebc58c7b33b62656cd7
|
4
|
+
data.tar.gz: 3c94800617a4b09995b458bc07def7f54f097abc75ff8539f3a609d70adf2ddc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53a84eee4cb2b23876c5a3c4a96dfc4694893ee888da34570f2f93df3c34c9bb46095271fdb2198f5f221d76dce32a181a4ee4b3291207892fe6c6ebb9179e45
|
7
|
+
data.tar.gz: dfd414fc158282b1c744bcfc96f23464ae75659af1f2d065311b6fcb3e2d6faa3711d525717b26302bd0272d64586857d054fd9ab2598f59a32e62c944a5d250
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gbbib (0.4.
|
4
|
+
gbbib (0.4.1)
|
5
5
|
cnccs (~> 0.1.1)
|
6
6
|
gb-agencies (~> 0.0.1)
|
7
|
-
iso-bib-item (~> 0.4.
|
7
|
+
iso-bib-item (~> 0.4.2)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
@@ -17,7 +17,7 @@ GEM
|
|
17
17
|
equivalent-xml (0.6.0)
|
18
18
|
nokogiri (>= 1.4.3)
|
19
19
|
gb-agencies (0.0.3)
|
20
|
-
iso-bib-item (0.4.
|
20
|
+
iso-bib-item (0.4.2)
|
21
21
|
isoics (~> 0.1.6)
|
22
22
|
nokogiri (~> 1.8.4)
|
23
23
|
ruby_deep_clone (~> 0.8.0)
|
data/gbbib.gemspec
CHANGED
@@ -31,6 +31,6 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
32
32
|
|
33
33
|
spec.add_dependency 'cnccs', "~> 0.1.1"
|
34
|
-
spec.add_dependency 'iso-bib-item', "~> 0.4.
|
34
|
+
spec.add_dependency 'iso-bib-item', "~> 0.4.2"
|
35
35
|
spec.add_dependency 'gb-agencies', "~> 0.0.1"
|
36
36
|
end
|
@@ -29,7 +29,7 @@ module Gbbib
|
|
29
29
|
|
30
30
|
def initialize(**args)
|
31
31
|
super
|
32
|
-
@committee = GbTechnicalCommittee.new
|
32
|
+
args[:committee] and @committee = GbTechnicalCommittee.new(args[:committee])
|
33
33
|
@ccs = args[:ccs].map { |c| Cnccs.fetch c }
|
34
34
|
@gbtype = GbStandardType.new args[:gbtype]
|
35
35
|
@type = args[:type]
|
@@ -73,7 +73,7 @@ module Gbbib
|
|
73
73
|
|
74
74
|
# @param builder [Nokogiri::XML::Builder]
|
75
75
|
def render_gbxml(builder)
|
76
|
-
committee.to_xml builder
|
76
|
+
committee.to_xml builder if committee
|
77
77
|
gbtype.to_xml builder
|
78
78
|
return unless ccs.any?
|
79
79
|
ccs.each do |c|
|
data/lib/gbbib/version.rb
CHANGED
data/lib/gbbib/xml_parser.rb
CHANGED
@@ -35,7 +35,8 @@ module Gbbib
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def fetch_committee(doc)
|
38
|
-
committee = doc.at '/bibitem/gbcommittee'
|
38
|
+
committee = doc.at '/bibitem/gbcommittee'
|
39
|
+
return nil unless committee
|
39
40
|
{ type: committee[:type], name: committee.text }
|
40
41
|
end
|
41
42
|
|
@@ -46,9 +47,9 @@ module Gbbib
|
|
46
47
|
def fetch_gbtype(doc)
|
47
48
|
gbtype = doc.at '/bibitem/gbtype'
|
48
49
|
{
|
49
|
-
scope: gbtype
|
50
|
-
prefix: gbtype
|
51
|
-
mandate: gbtype
|
50
|
+
scope: gbtype&.at('gbscope')&.text,
|
51
|
+
prefix: gbtype&.at('gbprefix')&.text,
|
52
|
+
mandate: gbtype&.at('gbmandate')&.text
|
52
53
|
}
|
53
54
|
end
|
54
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gbbib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.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: 2018-10-
|
11
|
+
date: 2018-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.4.
|
117
|
+
version: 0.4.2
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.4.
|
124
|
+
version: 0.4.2
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: gb-agencies
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|