relaton-nist 1.12.0 → 1.12.1

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: f66b74deb926d9f67db5770896b1080b16610c3996edb4a404740bd3ce558abe
4
- data.tar.gz: 6b74fb0c0bb1bf46282496fbf9e91f1a7ca0022eb4466f3be69ed1ca3da09b1c
3
+ metadata.gz: f664ac25e37f4cc366dbce555dd02629e6aba762d7d5305ccfdf7824035bf326
4
+ data.tar.gz: ed762c28f2f693b08cffe28f1b0f01ba7765bcbc6a3ab24432265a4d18faafee
5
5
  SHA512:
6
- metadata.gz: 97ca67f282f4131fab6f6d9da60e8f1ab350d8e5e762d843066f4236b8d5a53980d261c29559f9c233c2cab5cee44bbc185ab7a6b3feedd559df5d631a94b61c
7
- data.tar.gz: 6c2a40d739b0b2b9b2ed9587c50ac737b5a3ccb8a7c27c5b1548cab40f3409c08ea62358bb2b90d590b04ac45350e3ba671c0dac7a479399ce38d06ad9519904
6
+ metadata.gz: '095a99fbc11c08d2cc968a181444eb3913a01ef321477b13eb43e5f68949b378c494b89620c5dee6bf409c0f36e8246c55bad27afb3f3609165b24694f4fe5f2'
7
+ data.tar.gz: ba5172f3df58f5830fa4aa6e3c90ed250de30ac71206f038b8fbc867aa5d2cc9a9f1a6bb8463684da2a2ddbdf9032232aaa9ba20930c8460d0c8c36289c281df
data/.gitignore CHANGED
@@ -7,7 +7,6 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
  .vscode/
10
- /data/
11
10
  .rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml
12
11
 
13
12
  # rspec failure tracking
@@ -214,10 +214,11 @@ module RelatonNist
214
214
  def fetch_series(doc)
215
215
  series_path = File.expand_path("series.yaml", __dir__)
216
216
  series = YAML.load_file series_path
217
- prf, srs, = pub_id(doc).split
217
+ prf, srs, num = pub_id(doc).split
218
218
  sname = series[srs] || srs
219
219
  title = RelatonBib::TypedTitleString.new(content: "#{prf} #{sname}")
220
- [RelatonBib::Series.new(title: title, number: "#{prf} #{srs}")]
220
+ abbr = RelatonBib::LocalizedString.new("#{prf} #{srs}")
221
+ [RelatonBib::Series.new(title: title, abbreviation: abbr, number: num)]
221
222
  end
222
223
 
223
224
  #
@@ -274,7 +275,7 @@ module RelatonNist
274
275
  puts "Started at: #{t1}"
275
276
 
276
277
  docs = Nokogiri::XML OpenURI.open_uri URL
277
- FileUtils.mkdir @output unless Dir.exist? @output
278
+ FileUtils.mkdir_p @output
278
279
  FileUtils.rm Dir[File.join(@output, "*.#{@ext}")]
279
280
  docs.xpath("/body/query/doi_record/report-paper/report-paper_metadata")
280
281
  .each { |doc| parse_doc doc }
@@ -151,7 +151,7 @@ module RelatonNist
151
151
  if !ctime || ctime < OpenURI.open_uri("#{PUBS_EXPORT}.meta").last_modified
152
152
  @data = nil
153
153
  uri_open = URI.method(:open) || Kernel.method(:open)
154
- FileUtils.mkdir_p DATAFILEDIR unless Dir.exist? DATAFILEDIR
154
+ FileUtils.mkdir_p DATAFILEDIR
155
155
  IO.copy_stream(uri_open.call("#{PUBS_EXPORT}.zip"), DATAFILE)
156
156
  end
157
157
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonNist
2
- VERSION = "1.12.0".freeze
2
+ VERSION = "1.12.1".freeze
3
3
  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.12.0
4
+ version: 1.12.1
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-06-25 00:00:00.000000000 Z
11
+ date: 2022-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml