olek-paperclipftp 0.1.0.3 → 0.1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/paperclipftp.rb +2 -0
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0.3
1
+ 0.1.0.4
data/lib/paperclipftp.rb CHANGED
@@ -5,12 +5,14 @@ module Paperclip
5
5
  require 'net/ftp'
6
6
  base.instance_eval do
7
7
  @ftp_credentials = parse_credentials(@options[:ftp_credentials])
8
+ @passive_mode = !!@options[:ftp_passive_mode]
8
9
  end
9
10
  end
10
11
 
11
12
  def ftp
12
13
  if @ftp.nil? || @ftp.closed?
13
14
  @ftp = Net::FTP.new(@ftp_credentials[:host], @ftp_credentials[:username], @ftp_credentials[:password])
15
+ @ftp.passive = @ftp_passive_mode
14
16
  end
15
17
  @ftp
16
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: olek-paperclipftp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 65
4
+ hash: 79
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
9
  - 0
10
- - 3
11
- version: 0.1.0.3
10
+ - 4
11
+ version: 0.1.0.4
12
12
  platform: ruby
13
13
  authors:
14
14
  - Damian Caruso