mamiya 0.0.1.alpha15 → 0.0.1.alpha16

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
  SHA1:
3
- metadata.gz: 7b48c29d3cbe1a621eddd0ae9ad1b391004e3414
4
- data.tar.gz: 46dcd57701d7b67bb1b2e654d0adfefe2290623c
3
+ metadata.gz: 920552f4b202f9a35b63aea39b35e14d915940a1
4
+ data.tar.gz: b4fdae3e05fc5561bd467c6f612fce839162233e
5
5
  SHA512:
6
- metadata.gz: 3f482dabc7e853233e5c4bc44fa16528501fa570292ced18628e1981a8f8aa1878ad5882d87ba45664acd46af399dd893be73affb3eff9cb4198667395bdb6f4
7
- data.tar.gz: 308bf92939a284ba18d9176d6c61140260dbe7a1adfcc35446397607ee991decf4b0d9c50f451102901e012af31d2c83761c76b518bc76455708a8cab12d44e9
6
+ metadata.gz: 3a89852fb28f513be7f4c8847f330c0933bb3d454f20bb17c8e9fb28ae9b9a4469a9b0f137bf9d0f1d4ee1a67a1427a4705b37828385ae1594f177adf6b7f3aa
7
+ data.tar.gz: f4e421916e389a2bf7449db1ef5dbd49090111803c768034cdf682c10306736ef9750edbdacd88dd1a6773daa80fd32f2d71904bc8e6a449938b7e9929708f88
@@ -60,11 +60,16 @@ module Mamiya
60
60
  end
61
61
 
62
62
  return Mamiya::Package.new(package_path)
63
+
64
+ rescue AlreadyFetched, NotFound => e
65
+ raise e
66
+
63
67
  rescue Aws::S3::Errors::NoSuchKey
64
68
  File.unlink package_path if package_path && File.exists?(package_path)
65
69
  File.unlink meta_path if meta_path && File.exists?(meta_path)
66
70
 
67
71
  raise NotFound
72
+
68
73
  rescue Exception => e
69
74
  File.unlink package_path if package_path && File.exists?(package_path)
70
75
  File.unlink meta_path if meta_path && File.exists?(meta_path)
@@ -1,3 +1,3 @@
1
1
  module Mamiya
2
- VERSION = "0.0.1.alpha15"
2
+ VERSION = "0.0.1.alpha16"
3
3
  end
@@ -164,6 +164,14 @@ describe Mamiya::Storages::S3 do
164
164
  fetch
165
165
  }.to raise_error(Mamiya::Storages::Abstract::AlreadyFetched)
166
166
  end
167
+
168
+ it "doesn't remove anything" do
169
+ begin
170
+ fetch
171
+ rescue Mamiya::Storages::Abstract::AlreadyFetched; end
172
+
173
+ expect(File.exist?(metafile)).to be_true
174
+ end
167
175
  end
168
176
 
169
177
  context "when tarball already exists" do
@@ -176,6 +184,14 @@ describe Mamiya::Storages::S3 do
176
184
  fetch
177
185
  }.to raise_error(Mamiya::Storages::Abstract::AlreadyFetched)
178
186
  end
187
+
188
+ it "doesn't remove anything" do
189
+ begin
190
+ fetch
191
+ rescue Mamiya::Storages::Abstract::AlreadyFetched; end
192
+
193
+ expect(File.exist?(tarball)).to be_true
194
+ end
179
195
  end
180
196
 
181
197
  context "when name has .json" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mamiya
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.alpha15
4
+ version: 0.0.1.alpha16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shota Fukumori (sora_h)