relaton-iso 1.16.3 → 1.16.4

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: 13ecc04a430b1dbf256c0853f612969727c16eba72a06cb2bc74bed17745ba90
4
- data.tar.gz: f795f63a994b843e07d4857ba3b0dd9c91ec9a3ccb408827f1bf7bdbf5f854a9
3
+ metadata.gz: 24973dcb87074a6029a83761f4690db8c53203e7a65928ea766ddeaa61b6d167
4
+ data.tar.gz: 15f8936150781349e849ec0a89edc2ba1e24cb7a105973d6479418a7c98f9ffa
5
5
  SHA512:
6
- metadata.gz: d33586bbe409f54736b694d774a52e1bef8a4cc2d7c304aebd06c5ead8b3893b6f45c65d3e5c586c5e7f9f23501b52ae6b0630c25213d6105660251d03cff94e
7
- data.tar.gz: e7fdcb33dfa855c73ead77a514eae36d761274bafeec77c520ac8ff84a05c6a04a2b30bd80fa7d89fcabda1975eeb95f85c65d0c177da7e1694da97bc4245ccd
6
+ metadata.gz: ae2ac0909781b8f8f196a259444cc55e3fc8d92eccca7f0d83da769dd27b10c0c95a3cc59e391a52e27cc0320f3149f4498b8004e8d259c98fa9bfa3947b7b81
7
+ data.tar.gz: 4143f5870f15be800efe77cac822c90e7a345c5d6613b1481e7f88598b7d50f701546eaf9138c8bbebde22ad6473a5a7c7e4f81768b3656855e43d91d7ec10d8
@@ -7,6 +7,8 @@ on:
7
7
  branches: [ master, main ]
8
8
  tags: [ v* ]
9
9
  pull_request:
10
+ schedule:
11
+ - cron: '0 0 * * *'
10
12
 
11
13
  jobs:
12
14
  rake:
@@ -389,23 +389,25 @@ module RelatonIso
389
389
  def fetch_dates(doc, ref) # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/MethodLength
390
390
  dates = []
391
391
  %r{^[^\s]+\s[\d-]+:(?<ref_date_str>\d{4})} =~ ref
392
- pub_date_str = doc.xpath("//span[@itemprop='releaseDate']").text
392
+ pub_date_str = doc.at("//span[@itemprop='releaseDate']")
393
393
  if ref_date_str
394
394
  ref_date = Date.strptime ref_date_str, "%Y"
395
- if pub_date_str.empty?
395
+ if pub_date_str.nil?
396
396
  dates << { type: "published", on: ref_date_str }
397
397
  else
398
- pub_date = Date.strptime pub_date_str, "%Y"
398
+ pub_date = Date.strptime pub_date_str.text, "%Y"
399
399
  if pub_date.year > ref_date.year
400
400
  dates << { type: "published", on: ref_date_str }
401
- dates << { type: "updated", on: pub_date_str }
401
+ dates << { type: "updated", on: pub_date_str.text }
402
402
  else
403
- dates << { type: "published", on: pub_date_str }
403
+ dates << { type: "published", on: pub_date_str.text }
404
404
  end
405
405
  end
406
- elsif !pub_date_str.empty?
407
- dates << { type: "published", on: pub_date_str }
406
+ elsif pub_date_str
407
+ dates << { type: "published", on: pub_date_str.text }
408
408
  end
409
+ corr_data = doc.at "//span[@itemprop='dateModified']"
410
+ dates << { type: "corrected", on: corr_data.text } if corr_data
409
411
  dates
410
412
  end
411
413
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonIso
4
- VERSION = "1.16.3"
4
+ VERSION = "1.16.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.3
4
+ version: 1.16.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-21 00:00:00.000000000 Z
11
+ date: 2023-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: algolia