relaton-nist 1.11.0 → 1.11.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: 3efd113d39aa3ae5803492db6fedb79c6c77b8e6c346f545d7e56aedf5ccb90c
4
- data.tar.gz: 15bbf418f6ea804ccfb295fd566029bebf6e197d0d5985d5ee63f19909ce3bdc
3
+ metadata.gz: 6d5db99f4b5678fecd7b926c007b66149d72123c4a6aaaed113589b667c00b8c
4
+ data.tar.gz: 1f82071f8e6ed586475d915a1d105b5aefba8dedb5042cfe1d0230d0a41a51fa
5
5
  SHA512:
6
- metadata.gz: 69b106a55f829e861510cd4cd71eda6c11e689f0b78742cafe8333d81a0e6fcba87d708825439d85eb88543ea6a223749565b6d99469c34cf2889f87e429a88e
7
- data.tar.gz: 00fba574ac9177d32e8af0d9fc3d09947c13c2075a6bcdcf01d3525ee296e9b993f53033f6213dee59a8c33250606cb5034201697a1c1e022bfab2daa770ef2f
6
+ metadata.gz: 14a85ac2317285758f0fd1e18faa6ca70491a53c5dd8aa0a6c53e2d4e91a3bf8c8d8ab63a57aeb68238301bfe07c0e4a97e32ee50f85b26fb576127db309e4b1
7
+ data.tar.gz: 40e515d019b42731617c8569b40d03a911e9a3c1ba19dec11afa73dec7a52c6762f97085549658c0459ae6d328be28dd4e851a7641f77622f191138666193f93
data/Gemfile CHANGED
@@ -1,6 +1,3 @@
1
- Encoding.default_external = Encoding::UTF_8
2
- Encoding.default_internal = Encoding::UTF_8
3
-
4
1
  source "https://rubygems.org"
5
2
 
6
3
  # Specify your gem's dependencies in relaton_nist.gemspec
@@ -137,7 +137,7 @@ module RelatonNist
137
137
  # @return [Hash]
138
138
  def data
139
139
  ctime = File.ctime DATAFILE if File.exist? DATAFILE
140
- if !ctime || ctime.to_date < Date.today
140
+ if !ctime || ctime.to_date < Date.today || File.size(DATAFILE).zero?
141
141
  fetch_data(ctime)
142
142
  end
143
143
  unzip
@@ -163,10 +163,7 @@ module RelatonNist
163
163
  return @data if @data
164
164
 
165
165
  Zip::File.open(DATAFILE) do |zf|
166
- zf.each do |f|
167
- @data = JSON.parse f.get_input_stream.read
168
- break
169
- end
166
+ @data = JSON.parse zf.first.get_input_stream.read
170
167
  end
171
168
  @data
172
169
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonNist
2
- VERSION = "1.11.0".freeze
2
+ VERSION = "1.11.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.11.0
4
+ version: 1.11.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-04-10 00:00:00.000000000 Z
11
+ date: 2022-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml