relaton-iso-bib 0.3.7 → 0.3.8

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
  SHA1:
3
- metadata.gz: d1b2939376907ab701e7646f859363b6f438cb79
4
- data.tar.gz: 39837bae287ff53292fc68eeb7905fe639f1ac6a
3
+ metadata.gz: 66a33f84a5cefe82e59795f5bb71704cb0c5a6be
4
+ data.tar.gz: 0b20f9e00d6d8738eb916614583364c94809b770
5
5
  SHA512:
6
- metadata.gz: '0080b22e8e923af7ea7f5f38b864692f05e6ea9b9dff96214287d6a70c78749247dc4dc8869fd3ba450effdee274f4cd5e7f9144d78645760ed73bdced515d01'
7
- data.tar.gz: f2b506fc5b5ede0528678edc4319d7c63815fb157b6d6fe38750cdbc0e0066ced59197ee2ea31af2c3edf0559cf1c99f0bd72494008f0f0eea40a133a0651ae6
6
+ metadata.gz: e55d341aab1c7ab960da68195994540e01573d149a5c94adfbb644213bdf4963ebaa08345bfedac414e1e10d9611b85cd8566b841dd36fce066bba36e33f3821
7
+ data.tar.gz: 8811e4bdb6c3be1300bfda97199868401f5342b35ad08a5250c7bcd4ae8cdfeaa663be300c2a4c77bc75a918696e1fe501a0c53547ba7e19345036acff1c3e48
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- relaton-iso-bib (0.3.7)
4
+ relaton-iso-bib (0.3.8)
5
5
  isoics (~> 0.1.6)
6
6
  relaton-bib (~> 0.3.0)
7
7
  ruby_deep_clone (~> 0.8.0)
@@ -20,7 +20,7 @@ GEM
20
20
  docile (1.3.2)
21
21
  equivalent-xml (0.6.0)
22
22
  nokogiri (>= 1.4.3)
23
- isoics (0.1.7)
23
+ isoics (0.1.8)
24
24
  json (2.2.0)
25
25
  method_source (0.9.2)
26
26
  mini_portile2 (2.4.0)
@@ -34,7 +34,7 @@ GEM
34
34
  pry (~> 0.10)
35
35
  public_suffix (4.0.1)
36
36
  rake (10.5.0)
37
- relaton-bib (0.3.7)
37
+ relaton-bib (0.3.9)
38
38
  addressable
39
39
  nokogiri
40
40
  rspec (3.8.0)
@@ -54,7 +54,7 @@ module RelatonIsoBib
54
54
 
55
55
  builder.editorialgroup do
56
56
  technical_committee.each do |tc|
57
- builder.technical_committee { tc.to_xml builder }
57
+ builder.send("technical-committee") { tc.to_xml builder }
58
58
  end
59
59
  subcommittee.each do |sc|
60
60
  builder.subcommittee { sc.to_xml builder }
@@ -133,8 +133,10 @@ module RelatonIsoBib
133
133
  edition version relation biblionote series medium place copyright
134
134
  link fetched docid formattedref extent accesslocation classification
135
135
  validity].include? k
136
- end.merge(type: "standard")
137
- super(super_args)
136
+ end
137
+ super super_args
138
+
139
+ @type = args[:type] || "standard"
138
140
 
139
141
  @title = args.fetch(:title, []).reduce([]) do |a, t|
140
142
  if t.is_a? Hash
@@ -171,7 +173,7 @@ module RelatonIsoBib
171
173
  me = DeepClone.clone(self)
172
174
  me.disable_id_attribute
173
175
  @relation << RelatonBib::DocumentRelation.new(
174
- type: "partOf", bibitem: me,
176
+ type: "instance", bibitem: me,
175
177
  )
176
178
  @language.each do |l|
177
179
  @title.delete_if { |t| t.type == "title-part" }
@@ -184,6 +186,8 @@ module RelatonIsoBib
184
186
  @docidentifier.each(&:all_parts)
185
187
  @structuredidentifier.remove_part
186
188
  @structuredidentifier.all_parts
189
+ @docidentifier.each &:remove_date
190
+ @structuredidentifier&.remove_date
187
191
  @all_parts = true
188
192
  end
189
193
 
@@ -1,3 +1,3 @@
1
1
  module RelatonIsoBib
2
- VERSION = "0.3.7".freeze
2
+ VERSION = "0.3.8".freeze
3
3
  end
@@ -8,6 +8,7 @@ module RelatonIsoBib
8
8
  # @return [RelatonIsoBib::IsoBibliographicItem]
9
9
  def from_xml(xml)
10
10
  doc = Nokogiri::XML(xml)
11
+ doc.remove_namespaces!
11
12
  isoitem = doc.at "/bibitem|/bibdata"
12
13
  IsoBibliographicItem.new item_data(isoitem)
13
14
  end
@@ -68,7 +69,7 @@ module RelatonIsoBib
68
69
  eg = ext.at("./editorialgroup")
69
70
  return unless eg
70
71
 
71
- tc = eg&.xpath("technical_committee")&.map { |t| iso_subgroup(t) }
72
+ tc = eg&.xpath("technical-committee")&.map { |t| iso_subgroup(t) }
72
73
  sc = eg&.xpath("subcommittee")&.map { |s| iso_subgroup(s) }
73
74
  wg = eg&.xpath("workgroup")&.map { |w| iso_subgroup(w) }
74
75
  sr = eg&.at "secretariat"
@@ -83,7 +84,7 @@ module RelatonIsoBib
83
84
  return nil if com.nil?
84
85
 
85
86
  IsoSubgroup.new(name: com.text, type: com[:type],
86
- number: com[:number].to_i)
87
+ number: com[:number]&.to_i)
87
88
  end
88
89
  end
89
90
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iso-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-27 00:00:00.000000000 Z
11
+ date: 2019-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler