paperclip-storage-ftp 1.2.4 → 1.2.5

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: 83e3386fa9770427df597a7fd756116877d00ca3
4
- data.tar.gz: 50bf907a483309e1ac65ad24156a21b146386346
3
+ metadata.gz: 06f6f8ed2f5e20bde0739d480b35b1db12b02181
4
+ data.tar.gz: 151088832a19d13b6d8d2747f072c61867d7eba4
5
5
  SHA512:
6
- metadata.gz: 509041e1f67837bb53ea17dfca8c19a169053a5535b3d8f2d599221bb8a1bc2798d83e6dd68efe7b37764c1c8e515cf84d93e6855b777ee3a4fcf2c0a870494f
7
- data.tar.gz: 03a61d1b2f6a9e0bacf287902174f641adb74a353c55125a71d6977c5fa8b2d7ab0ec3aea039e8c3190edd6afbe7256e9e9067fd1fe51f9e3af98dee3584d1cd
6
+ metadata.gz: 2ed88432200631ef634da8f80bc881f1926fcd00a833b8c034d639821da686f2bd5688f7283c38216fa6db1921ee2e37504a2a7ee5c15f5ab4cc3ba885bab852
7
+ data.tar.gz: 1bb9d03ff4bcc716cac6b28714d704f837e7c7cf4daab10005acec4b2fcb2eb9fde861a0b5f21a1cd024e54c7cdb649e7557932ee7e71db74f3ccbdf6a5cf40b
data/README.md CHANGED
@@ -84,6 +84,10 @@ end
84
84
 
85
85
  ## Changelog
86
86
 
87
+ ### 1.2.5
88
+
89
+ * Ignore ftp error when deleting an non-existing file [#29](https://github.com/xing/paperclip-storage-ftp/pull/29)
90
+
87
91
  ### 1.2.4
88
92
 
89
93
  * Avoid unnecessary connection to server(s) when there are no files to be written or deleted [#26](https://github.com/xing/paperclip-storage-ftp/pull/26)
@@ -66,6 +66,8 @@ module Paperclip
66
66
 
67
67
  def delete_file(remote_file_path)
68
68
  connection.delete(remote_file_path)
69
+ rescue Net::FTPPermError
70
+ # This happens if the file is already deleted
69
71
  end
70
72
 
71
73
  def rmdir_p(dir_path)
@@ -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.4"
15
+ gem.version = "1.2.5"
16
16
 
17
17
  gem.add_dependency("paperclip")
18
18
 
@@ -86,6 +86,12 @@ describe Paperclip::Storage::Ftp::Server do
86
86
  server.connection.should_receive(:delete).with("/files/original.jpg")
87
87
  server.delete_file("/files/original.jpg")
88
88
  end
89
+
90
+ it 'rescues from Net::FTPPermError' do
91
+ server.connection.should_receive(:delete).with('/files/original.jpg')
92
+ .and_raise Net::FTPPermError
93
+ expect { server.delete_file('/files/original.jpg') }.to_not raise_error
94
+ end
89
95
  end
90
96
 
91
97
  context "#rmdir_p" do
@@ -1,5 +1,7 @@
1
1
  require "active_record"
2
2
 
3
+ ActiveRecord::Base.raise_in_transactional_callbacks = true
4
+
3
5
  ActiveRecord::Base.establish_connection(
4
6
  :adapter => "sqlite3",
5
7
  :database => ":memory:"
@@ -14,6 +16,8 @@ ActiveRecord::Schema.define do
14
16
  add_column :users, :avatar_updated_at, :datetime
15
17
  end
16
18
 
19
+
20
+
17
21
  class UserBase < ActiveRecord::Base
18
22
  include Paperclip::Glue
19
23
  self.table_name = "users"
@@ -14,9 +14,8 @@ else
14
14
  printf "ERROR: An RVM installation was not found.\n"
15
15
  fi
16
16
 
17
- for ruby in '2.1' '2.2' 'jruby --1.9'
17
+ for ruby in '2.1' '2.2' 'jruby'
18
18
  do
19
- rvm try_install $ruby
20
19
  rvm use $ruby
21
20
  gem install bundler --conservative --no-rdoc --no-ri
22
21
 
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.4
4
+ version: 1.2.5
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: 2015-03-31 00:00:00.000000000 Z
11
+ date: 2015-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paperclip
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.4.5
158
+ rubygems_version: 2.4.7
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: Allow Paperclip attachments to be stored on FTP servers