relaton-bib 1.11.4 → 1.11.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66d703af6f525fba6b4cd25e054ab2f5f64e0d5040b75430c04296990a6a12ca
4
- data.tar.gz: c0c85e99f1e3b511fbc329b9b631349ed63afee1a1779a2147a1756e6dbf0559
3
+ metadata.gz: 4879a622c8f133828b75abffc19166c9bc8047d9ecff25bbcd7b8cdc472acde4
4
+ data.tar.gz: 27b37f70ddf22ded981996ac98ae58b284b99790ff0d1bb96a55c100fc08a850
5
5
  SHA512:
6
- metadata.gz: d8f4ef1047ad4d3ab345c3d67079ca66e986b707871f243c11eb8c52ba5792202bf046bbcb1b3722d957d3e882e3ce645b30d9f5a422a8f8ccd2ac38eb7a7d12
7
- data.tar.gz: 2974513d8a823bc2efbbfe51e4bc9a88c7e7f77b3aa117e2835b5e13d6b33f366b0c15e7987afcb2dc1b5f5aa9f63d5a45e0df384ffb321132df30d2ed6ebe09
6
+ metadata.gz: 46fdb1f657ae745e28ac3e4b11fa17b4bd42a75fef5c9aca29b7834796df6f75bdff1f73ef81222784f9dae07ea200a821d8d3ad10d754f5ee75eebded5e8fd1
7
+ data.tar.gz: 4a86ff51080029116ce9a0745f8411442fa6ce8da5a89b278a3a0dc38ffd4368fc36b516d9ea631662e74fc3704284889dfa1af758dba209520371824fe6321f
data/.rubocop.yml CHANGED
@@ -7,6 +7,6 @@ require: rubocop-rails
7
7
  inherit_from:
8
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
9
9
  AllCops:
10
- TargetRubyVersion: 2.5
10
+ TargetRubyVersion: 2.6
11
11
  Rails:
12
12
  Enabled: false
@@ -194,7 +194,7 @@ module RelatonBib
194
194
  # @return [Array<RelatonBib::FormattedString>]
195
195
  def abstracts(ref)
196
196
  ref.xpath("./front/abstract").map do |a|
197
- c = a.children.to_s.gsub(/\s*(<\/?)t(>)\s*/, '\1p\2')
197
+ c = a.inner_html.gsub(/\s*(<\/?)t(>)\s*/, '\1p\2')
198
198
  .gsub(/[\t\n]/, " ").squeeze " "
199
199
  FormattedString.new(content: c, language: language(ref), script: "Latn",
200
200
  format: "text/html")
@@ -56,14 +56,10 @@ module RelatonBib
56
56
  else
57
57
  builder.parent["language"] = language.join(",") if language&.any?
58
58
  builder.parent["script"] = script.join(",") if script&.any?
59
- builder.parent << escaped_content # .encode(xml: :text)
59
+ builder.text content
60
60
  end
61
61
  end
62
62
 
63
- def escaped_content
64
- content.encode("UTF-8") # .gsub(/&/, "&amp;").gsub(/"/, "&quot;").gsub(/'/, "&apos;")
65
- end
66
-
67
63
  # @return [Hash]
68
64
  def to_hash # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
69
65
  if content.is_a? String
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.11.4".freeze
2
+ VERSION = "1.11.5".freeze
3
3
  end
@@ -354,7 +354,7 @@ module RelatonBib
354
354
  # @return [Array<RelatonBib::FormattedString>]
355
355
  def fetch_abstract(item)
356
356
  item.xpath("./abstract").map do |a|
357
- c = a.children.to_s
357
+ c = a.text.strip # children.to_s
358
358
  FormattedString.new(content: c, language: a[:language],
359
359
  script: a[:script], format: a[:format])
360
360
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.4
4
+ version: 1.11.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-10 00:00:00.000000000 Z
11
+ date: 2022-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug