relaton-index 0.2.10 → 0.2.11

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: fd00856841523d16b10daef68948e9259e9a3f0ad752f090ecb1a5e88fa2568b
4
- data.tar.gz: 253363dec31c9d76bea3259cfe87f92524750538f4a0f54a5796fbf70a3d4cff
3
+ metadata.gz: d7b713d1276a0e2401095a616e6b194ebbfa3199e3fb6804184f248390373792
4
+ data.tar.gz: 9255e905b2c8b04544708f48448bcab5f7824f6b637a8227ace0ccc9249391e2
5
5
  SHA512:
6
- metadata.gz: 27fa98c022fb0fec7531b00bf890fdea6518da1dec676931b9f5c6298e3d8f817017822ee69e72b43ac74a33ccf6bf0be0fc43da1a88098d85c2f3145b8c9af3
7
- data.tar.gz: 122fda9cd67da9bf721f500be998beb9613c13c5ea92806da9fa1205215f94e160cdb652cc3361ff4a85d0680f8f25aebbd0e4148b7721ffc6ac9fec6d5c8a3a
6
+ metadata.gz: a6960560d0918bfc55568144053722dff5d60c7833749b569315c81b0bf7678aebf31e898b6d1ecfbcfe6bf9b501e7cd2c1460860c27aa550518ac4c23150c64
7
+ data.tar.gz: f38349723f501cd31a6973d50242e5172d29f50d4fd596f3390116062b69254ce211d40640453dbf2c6fa265761244e392e694d9666cc744acad30f7e9ef445e
@@ -130,10 +130,11 @@ module Relaton
130
130
  def fetch_and_save
131
131
  resp = URI(url).open
132
132
  zip = Zip::InputStream.new resp
133
- resp.close if resp.respond_to? :close
134
- resp.unlink if resp.is_a? Tempfile
133
+ resp.close! if resp.is_a? Tempfile
135
134
  entry = zip.get_next_entry
136
- index = YAML.safe_load(entry.get_input_stream.read, permitted_classes: [Symbol])
135
+ yaml = entry.get_input_stream.read
136
+ entry.zipfile.close! if entry.zipfile.is_a? Tempfile
137
+ index = YAML.safe_load(yaml, permitted_classes: [Symbol])
137
138
  save index
138
139
  warn "[relaton-#{@dir}] Downloaded index from #{url}"
139
140
  return index if check_format index
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Relaton
4
4
  module Index
5
- VERSION = "0.2.10"
5
+ VERSION = "0.2.11"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-index
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.