paperclip-storage-ftp 1.0.0.rc2 → 1.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,17 +6,10 @@ module Paperclip
6
6
  module Ftp
7
7
  class Server
8
8
 
9
- attr_accessor :host, :user, :password, :port
10
- attr_writer :connection
11
-
12
- def self.default_options
13
- {
14
- :port => Net::FTP::FTP_PORT
15
- }
16
- end
9
+ attr_accessor :host, :user, :password
10
+ attr_writer :connection, :port
17
11
 
18
12
  def initialize(options = {})
19
- options = self.class.default_options.merge(options)
20
13
  options.each do |k,v|
21
14
  send("#{k}=", v)
22
15
  end
@@ -50,6 +43,10 @@ module Paperclip
50
43
  end
51
44
  end
52
45
 
46
+ def port
47
+ @port || Net::FTP::FTP_PORT
48
+ end
49
+
53
50
  def mkdir_p(dirname)
54
51
  pathname = Pathname.new(dirname)
55
52
  pathname.descend do |p|
@@ -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.0.0.rc2"
14
+ gem.version = "1.0.0.rc3"
15
15
 
16
16
  gem.add_dependency("paperclip")
17
17
 
@@ -19,7 +19,7 @@ describe Paperclip::Storage::Ftp::Server do
19
19
  end
20
20
 
21
21
  it "sets a default port" do
22
- server = Paperclip::Storage::Ftp::Server.new
22
+ server = Paperclip::Storage::Ftp::Server.new(:port => nil)
23
23
  server.port.should == Net::FTP::FTP_PORT
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip-storage-ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc2
4
+ version: 1.0.0.rc3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-30 00:00:00.000000000 Z
12
+ date: 2012-10-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: paperclip
@@ -128,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  segments:
130
130
  - 0
131
- hash: 1252276160423986268
131
+ hash: -504637831743076511
132
132
  required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  none: false
134
134
  requirements: