paperclip-storage-ftp 1.2.2 → 1.2.3

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: 8ca9a1238f7b7f38cac421a942ccd513b637bd10
4
- data.tar.gz: d48282fb301803804f7ae63f25eac3cb8f3f7555
3
+ metadata.gz: 965bee3a7fee8dede0c34063a0a209287b9fb0f2
4
+ data.tar.gz: f4bd05757450dc18aa71d08f3fbe32b2ca46017c
5
5
  SHA512:
6
- metadata.gz: 17a256d870d927dece3b64d96f00c9db3d2a020a7a399494d566d4c99300edd7ef9dae2feab33c4b697236fcf111efeb2a12ed867e837400ebc3ad751a37d8ca
7
- data.tar.gz: 8f7fe427c147d1268b2d533be54c58a68c31b86bca1bbd3525d57ecdff0fed9b6ea43fc56211d896c9a6645224a837b26ec7dd6b5ab8d080e14165e959ebb7cf
6
+ metadata.gz: daa7c2734901f9c1ecc5868aac8d6640634a2c6744becf55b5ac60b2c2a0fb855c4b6c9019c9cea3ffa57e15b978533b2826494e5840acdf5b3e26247c75a87f
7
+ data.tar.gz: 38e7d597fe488f31e53217f1572e4e594caf46c639b6799853659276ad5b75212ecab6aea8e0681f76fe5b767c62b7ef4e8048c9e2db3bac5138bb15d64be4ca
data/README.md CHANGED
@@ -84,6 +84,10 @@ end
84
84
 
85
85
  ## Changelog
86
86
 
87
+ ### 1.2.3
88
+
89
+ * Rescue FTPPermError exception during `file_exists?` [#22](https://github.com/xing/paperclip-storage-ftp/pull/22)
90
+
87
91
  ### 1.2.2
88
92
 
89
93
  * Remove empty parent directories after image deletion [#21](https://github.com/xing/paperclip-storage-ftp/pull/21)
@@ -50,7 +50,7 @@ module Paperclip
50
50
  def file_exists?(path)
51
51
  pathname = Pathname.new(path)
52
52
  connection.nlst(pathname.dirname.to_s).map{|f| File.basename f }.include?(pathname.basename.to_s)
53
- rescue Net::FTPTempError
53
+ rescue Net::FTPTempError, Net::FTPPermError
54
54
  false
55
55
  end
56
56
 
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
12
12
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
13
13
  gem.name = "paperclip-storage-ftp"
14
14
  gem.require_paths = ["lib"]
15
- gem.version = "1.2.2"
15
+ gem.version = "1.2.3"
16
16
 
17
17
  gem.add_dependency("paperclip")
18
18
 
@@ -47,6 +47,11 @@ describe Paperclip::Storage::Ftp::Server do
47
47
  server.connection.should_receive(:nlst).with("/files/original").and_raise(Net::FTPTempError)
48
48
  server.file_exists?("/files/original/foo.jpg").should be false
49
49
  end
50
+
51
+ it "returns false if the ftp server responds with a FTPPermError" do
52
+ server.connection.should_receive(:nlst).with("/files/original").and_raise(Net::FTPPermError)
53
+ server.file_exists?("/files/original/foo.jpg").should be false
54
+ end
50
55
  end
51
56
 
52
57
  context "#get_file" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip-storage-ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Röbke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-20 00:00:00.000000000 Z
11
+ date: 2014-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paperclip