relaton-w3c 1.4.0 → 1.7.0

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
  SHA256:
3
- metadata.gz: b926b01fe435fae1a7362c382eb9a6cd142cd05473356055cd412cf9a3cb28ec
4
- data.tar.gz: 8733bb55355b3dd269e634aeba684c1246fabb21e191dff0120c40d842b23f36
3
+ metadata.gz: 800306161a2ff05bed073ae50f58ff8ae2ac2fecf98a4734a7a8afb7d5c97807
4
+ data.tar.gz: 0d0db7d74afd780860d7804041faa22156324e43a5a13ac138ffce217b7ed217
5
5
  SHA512:
6
- metadata.gz: 40317cab07cd4eb66e8ce13248c14850f39e2c1a3a120830eca93277cbb7183ee7c798ef0d38c42ffcfee19b6032e13c63f8add264aef4c24815ac73ee32c7c6
7
- data.tar.gz: 0400a3321875de097a3c8de4733e79f86d8909a93c9de657eacf32709fb289f4e68964a69b700927dc61fccc814506f4781e494f552e2c2248bcf6636d5a592c
6
+ metadata.gz: 74cc13528aa241e631fb289df66f501b8f1410ee8e8e6a5c602ff382f92ca6b58d481fc813428f28b873da189c8dc88beed191c70c7a4780d42c147f02324fa0
7
+ data.tar.gz: 4489ddbc20b75d6827abe00c819666baf6a5cc41f9e396e9c045e972fafc64e8091e7b4fd45861a091ec5eac828f2b7d69e14a876aea81d98c9bc8b207ccd160
@@ -32,6 +32,8 @@ jobs:
32
32
  - name: Update gems
33
33
  run: |
34
34
  sudo gem install bundler --force
35
+ ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
36
+ ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
35
37
  bundle install --jobs 4 --retry 3
36
38
  - name: Run specs
37
39
  run: |
@@ -17,7 +17,7 @@ module RelatonW3c
17
17
  }.freeze
18
18
  DOMAIN = "https://www.w3.org"
19
19
  DATADIR = File.expand_path(".relaton/w3c", Dir.home).freeze
20
- DATAFILE = File.expand_path("bibliograhy.yml", DATADIR).freeze
20
+ DATAFILE = File.expand_path("bibliography.yml", DATADIR).freeze
21
21
 
22
22
  # @param ref [String] reference to search
23
23
  def initialize(ref)
@@ -49,7 +49,9 @@ module RelatonW3c
49
49
  titles = []
50
50
  if doc
51
51
  title = doc.at("//*[contains(@id, 'title')]")&.text
52
- titles << { content: title, type: "main" } if title && !title.empty?
52
+ if title && !title.empty?
53
+ titles << { content: title.gsub(/\n/, " "), type: "main" }
54
+ end
53
55
  subtitle = doc.at(
54
56
  "//h2[@id='subtitle']|//p[contains(@class, 'subline')]"
55
57
  )&.text
@@ -71,7 +73,8 @@ module RelatonW3c
71
73
  def fetch_abstract(doc)
72
74
  return [] unless doc
73
75
 
74
- content = doc.at("//h2[.='Abstract']/following-sibling::p").text
76
+ content = doc.at("//h2[.='Abstract']/following-sibling::p",
77
+ "//div[@class='abstract']/p").text
75
78
  [RelatonBib::FormattedString.new(content: content, language: "en",
76
79
  script: "Latn")]
77
80
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonW3c
2
- VERSION = "1.4.0".freeze
2
+ VERSION = "1.7.0".freeze
3
3
  end
@@ -39,5 +39,5 @@ Gem::Specification.new do |spec|
39
39
  spec.add_development_dependency "vcr"
40
40
  spec.add_development_dependency "webmock"
41
41
 
42
- spec.add_dependency "relaton-bib", ">= 1.4.0"
42
+ spec.add_dependency "relaton-bib", ">= 1.7.0"
43
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-w3c
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-18 00:00:00.000000000 Z
11
+ date: 2020-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 1.4.0
117
+ version: 1.7.0
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: 1.4.0
124
+ version: 1.7.0
125
125
  description: 'RelatonIso: retrieve W3C Standards for bibliographic using the IsoBibliographicItem
126
126
  model'
127
127
  email: