paperclip-storage-ftp 1.1.0.rc1 → 1.1.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -61,7 +61,7 @@ class User < ActiveRecord::Base
61
61
  :user => "foo",
62
62
  :password => "bar",
63
63
  :port => 2121, # optional, 21 by default
64
- :passive => false # optional, true by default
64
+ :passive => true # optional, false by default
65
65
  }
66
66
  ]
67
67
  end
@@ -7,15 +7,14 @@ module Paperclip
7
7
  class Server
8
8
 
9
9
  attr_accessor :host, :user, :password, :port, :passive
10
- attr_reader :connection
10
+ attr_reader :connection
11
11
 
12
12
  def initialize(options = {})
13
13
  options.each do |k,v|
14
14
  send("#{k}=", v)
15
15
  end
16
16
 
17
- @port = Net::FTP::FTP_PORT if @port.nil?
18
- @passive = true if @passive.nil?
17
+ @port ||= Net::FTP::FTP_PORT
19
18
  end
20
19
 
21
20
  def establish_connection
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
11
11
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
12
12
  gem.name = "paperclip-storage-ftp"
13
13
  gem.require_paths = ["lib"]
14
- gem.version = "1.1.0.rc1"
14
+ gem.version = "1.1.0.rc2"
15
15
 
16
16
  gem.add_dependency("paperclip")
17
17
 
@@ -10,7 +10,7 @@ describe Paperclip::Storage::Ftp::Server do
10
10
  :user => "user",
11
11
  :password => "password",
12
12
  :port => 2121,
13
- :passive => false
13
+ :passive => true
14
14
  }
15
15
  server = Paperclip::Storage::Ftp::Server.new(options)
16
16
  server.host.should == options[:host]
@@ -24,11 +24,6 @@ describe Paperclip::Storage::Ftp::Server do
24
24
  server = Paperclip::Storage::Ftp::Server.new
25
25
  server.port.should == Net::FTP::FTP_PORT
26
26
  end
27
-
28
- it "sets passive to true by default" do
29
- server = Paperclip::Storage::Ftp::Server.new
30
- server.passive.should be_true
31
- end
32
27
  end
33
28
 
34
29
  context "#file_exists?" do
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: paperclip-storage-ftp
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 1.1.0.rc1
5
+ version: 1.1.0.rc2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sebastian Röbke
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-02 00:00:00.000000000 Z
12
+ date: 2013-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: paperclip
@@ -158,7 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
158
  - !ruby/object:Gem::Version
159
159
  segments:
160
160
  - 0
161
- hash: -1768079343982146071
161
+ hash: 1798517606046348326
162
162
  version: '0'
163
163
  none: false
164
164
  required_rubygems_version: !ruby/object:Gem::Requirement