relaton-nist 1.5.1 → 1.6.pre1

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: e04045cea97147ffffc8bab0c35810ce34a788483994aab230d877ce8b890633
4
- data.tar.gz: '09da55208d81abc48309f63ae2ca85ae4fdc743e368efcca0b6cfe3b2f5fbd5d'
3
+ metadata.gz: 83911e87d23d384599e9d311ced2568d538e38adb7782a01396ae5db599b9c9e
4
+ data.tar.gz: dd9b9df50f61fe10efa8ba323598c261f13224065301b4914e1a9ff2a2ec2393
5
5
  SHA512:
6
- metadata.gz: ae6e413d24ac3a426007a4e344c2475ee11049a0472dbac103967acc99408404a82dd3f961618f3a41c0c6285124656e8ddac0951afefe937e8155c862fad2bd
7
- data.tar.gz: 4cf76e604f0abd5c812d412afb7034f4977ca75b38593297fe864ad0c8d597621ebdf9a15f5add133a77954fe6c4eb5aada43d189b9f6a5f25accbb319533381
6
+ metadata.gz: 533c2c283684bf285c6221baecc36eee7068ef1d2c478f5e474b028b4fa5f599ff7efdb2117000c2fae452686c5577db32c7492051c74ae1cce321efa9b25f48
7
+ data.tar.gz: caee23be7c38f9ed33fa1adc48fc4610b0716eca1aadee6f0d66be8d08f33b8f02fb86cb8b199bd6979e8e7bb6ac5fc6c549a2c8dd86deaf598ee6d347f68ccb
@@ -83,7 +83,7 @@ module RelatonNist
83
83
  select_data(docid, **opts).map do |h|
84
84
  /(?<serie>(?<=-)\w+$)/ =~ h["series"]
85
85
  title = [h["title-main"], h["title-sub"]].compact.join " - "
86
- release_date = RelatonBib.parse_date h["published-date"]
86
+ release_date = RelatonBib.parse_date h["published-date"], false
87
87
  Hit.new({ code: h["docidentifier"], serie: serie.upcase, title: title,
88
88
  url: h["uri"], status: h["status"],
89
89
  release_date: release_date, json: h }, self)
@@ -114,7 +114,7 @@ module RelatonNist
114
114
  def match_year?(doc, date)
115
115
  return true unless year
116
116
 
117
- idate = RelatonBib.parse_date doc["issued-date"]
117
+ idate = RelatonBib.parse_date doc["issued-date"], false
118
118
  idate.between? date, date.next_year.prev_day
119
119
  end
120
120
 
@@ -93,19 +93,23 @@ module RelatonNist
93
93
  result.each_slice(3) do |s| # ISO website only allows 3 connections
94
94
  fetch_pages(s, 3).each_with_index do |r, _i|
95
95
  if opts[:issued_date]
96
- ids = r.date.select { |d| d.type == "issued" && d.on == opts[:issued_date] }
96
+ ids = r.date.select do |d|
97
+ d.type == "issued" && d.on(:date) == opts[:issued_date]
98
+ end
97
99
  next if ids.empty?
98
100
  elsif opts[:updated_date]
99
- pds = r.date.select { |d| d.type == "published" && d.on == opts[:updated_date] }
101
+ pds = r.date.select do |d|
102
+ d.type == "published" && d.on(:date) == opts[:updated_date]
103
+ end
100
104
  next if pds.empty?
101
105
  end
102
106
  next if iter && r.status.iteration != iteration
103
107
  return { ret: r } if !year
104
108
 
105
109
  r.date.select { |d| d.type == "published" }.each do |d|
106
- return { ret: r } if year.to_i == d.on.year
110
+ return { ret: r } if year.to_i == d.on(:year)
107
111
 
108
- missed_years << d.on.year
112
+ missed_years << d.on(:year)
109
113
  end
110
114
  end
111
115
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonNist
2
- VERSION = "1.5.1".freeze
2
+ VERSION = "1.6.pre1".freeze
3
3
  end
@@ -34,6 +34,6 @@ Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency "vcr"
35
35
  spec.add_development_dependency "webmock"
36
36
 
37
- spec.add_dependency "relaton-bib", "~> 1.5.0"
37
+ spec.add_dependency "relaton-bib", "~> 1.6.pre"
38
38
  spec.add_dependency "rubyzip"
39
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-nist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.6.pre1
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-11-06 00:00:00.000000000 Z
11
+ date: 2020-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 1.5.0
159
+ version: 1.6.pre
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 1.5.0
166
+ version: 1.6.pre
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rubyzip
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -232,9 +232,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
232
232
  version: 2.4.0
233
233
  required_rubygems_version: !ruby/object:Gem::Requirement
234
234
  requirements:
235
- - - ">="
235
+ - - ">"
236
236
  - !ruby/object:Gem::Version
237
- version: '0'
237
+ version: 1.3.1
238
238
  requirements: []
239
239
  rubygems_version: 3.0.6
240
240
  signing_key: