ftpd 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### 0.7.0
2
+
3
+ Bug fixes
4
+
5
+ * Gracefully handle Errno::ENOTCONN during socket shutdown (fixes
6
+ gh-1)
7
+
1
8
  ### 0.6.0
2
9
 
3
10
  Enhancements
data/Gemfile.lock CHANGED
@@ -1,6 +1,6 @@
1
1
  GIT
2
2
  remote: git@github.com:wconrad/double-bag-ftps.git
3
- revision: 043ba70309ed622302d3aa5c6f3169872d1211ca
3
+ revision: c546429689618e1757bb2dfe1fa35a386e7aebb2
4
4
  specs:
5
5
  double-bag-ftps (0.1.0)
6
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.7.0
@@ -8,10 +8,14 @@ Feature: Get TLS
8
8
  Given the test server has TLS mode "explicit"
9
9
  And the test server is started
10
10
 
11
- Scenario: TLS
12
- pending "TLS not supported in active mode (see README)"
11
+ Scenario: Active
12
+ Given a successful login with explicit TLS
13
+ And the server has file "ascii_unix"
14
+ And the client is in active mode
15
+ When the client successfully gets text "ascii_unix"
16
+ Then the local file "ascii_unix" should match the remote file
13
17
 
14
- Scenario: TLS, Passive
18
+ Scenario: Passive
15
19
  Given a successful login with explicit TLS
16
20
  And the server has file "ascii_unix"
17
21
  And the client is in passive mode
@@ -1,4 +1,4 @@
1
- Feature: Put TLS
1
+ Feature: Implicit TLS
2
2
 
3
3
  As a server
4
4
  I want to use implicit TLS
@@ -8,10 +8,14 @@ Feature: Put TLS
8
8
  Given the test server has TLS mode "implicit"
9
9
  And the test server is started
10
10
 
11
- Scenario: Get
12
- pending "TLS not supported in active mode (see README)"
11
+ Scenario: Active
12
+ Given a successful login with implicit TLS
13
+ And the client has file "ascii_unix"
14
+ And the client is in active mode
15
+ When the client successfully puts text "ascii_unix"
16
+ Then the remote file "ascii_unix" should match the local file
13
17
 
14
- Scenario: Get (passive)
18
+ Scenario: Passive
15
19
  Given a successful login with implicit TLS
16
20
  And the client has file "ascii_unix"
17
21
  And the client is in passive mode
@@ -8,10 +8,17 @@ Feature: List TLS
8
8
  Given the test server has TLS mode "explicit"
9
9
  And the test server is started
10
10
 
11
- Scenario: TLS
12
- pending "TLS not supported in active mode (see README)"
11
+ Scenario: Active
12
+ Given a successful login with explicit TLS
13
+ And the server has file "foo"
14
+ And the server has file "bar"
15
+ And the client is in active mode
16
+ When the client successfully lists the directory
17
+ Then the file list should be in long form
18
+ And the file list should contain "foo"
19
+ And the file list should contain "bar"
13
20
 
14
- Scenario: TLS, Passive
21
+ Scenario: Passive
15
22
  Given a successful login with explicit TLS
16
23
  And the server has file "foo"
17
24
  And the server has file "bar"
@@ -9,10 +9,17 @@ Feature: Name List TLS
9
9
  Given the test server has TLS mode "explicit"
10
10
  And the test server is started
11
11
 
12
- Scenario: TLS
13
- pending "TLS not supported in active mode (see README)"
12
+ Scenario: Active
13
+ Given a successful login with explicit TLS
14
+ And the server has file "foo"
15
+ And the server has file "bar"
16
+ And the client is in active mode
17
+ When the client successfully name-lists the directory
18
+ Then the file list should be in short form
19
+ And the file list should contain "foo"
20
+ And the file list should contain "bar"
14
21
 
15
- Scenario: TLS, Passive
22
+ Scenario: Passive
16
23
  Given a successful login with explicit TLS
17
24
  And the server has file "foo"
18
25
  And the server has file "bar"
@@ -8,10 +8,14 @@ Feature: Put TLS
8
8
  Given the test server has TLS mode "explicit"
9
9
  And the test server is started
10
10
 
11
- Scenario: TLS, Active
12
- pending "TLS not supported in active mode (see README)"
11
+ Scenario: Active
12
+ Given a successful login with explicit TLS
13
+ And the client has file "ascii_unix"
14
+ And the client is in active mode
15
+ When the client successfully puts text "ascii_unix"
16
+ Then the remote file "ascii_unix" should match the local file
13
17
 
14
- Scenario: TLS, Passive
18
+ Scenario: Passive
15
19
  Given a successful login with explicit TLS
16
20
  And the client has file "ascii_unix"
17
21
  And the client is in passive mode
data/ftpd.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ftpd"
8
- s.version = "0.6.0"
8
+ s.version = "0.7.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Wayne Conrad"]
12
- s.date = "2013-03-19"
12
+ s.date = "2013-04-10"
13
13
  s.description = "ftpd is a pure Ruby FTP server library. It supports implicit and explicit TLS, passive and active mode, and is unconditionally compliant per [RFC-1123][1]. It an be used as part of a test fixture or embedded in a program."
14
14
  s.email = "wconrad@yagni.com"
15
15
  s.extra_rdoc_files = [
data/lib/ftpd/server.rb CHANGED
@@ -109,8 +109,8 @@ module Ftpd
109
109
 
110
110
  def close_socket(socket)
111
111
  if socket.respond_to?(:shutdown)
112
- socket.shutdown
113
- socket.read
112
+ socket.shutdown rescue nil
113
+ socket.read rescue nil
114
114
  end
115
115
  ensure
116
116
  socket.close
@@ -9,14 +9,14 @@ module Ftpd
9
9
  let(:file_info) do
10
10
  FileInfo.new(:ftype => 'file',
11
11
  :mode => 0100644,
12
- :mtime => Time.mktime(2013, 3, 3, 8, 38, 0),
12
+ :mtime => Time.utc(2013, 3, 3, 8, 38, 0),
13
13
  :path => 'foo',
14
14
  :size => 1234)
15
15
  end
16
16
  subject(:formatter) {Eplf.new(file_info)}
17
17
 
18
18
  it 'should produce EPLF format' do
19
- formatter.to_s.should == "+r,s1234,m1362325080\tfoo"
19
+ formatter.to_s.should == "+r,s1234,m1362299880\tfoo"
20
20
  end
21
21
 
22
22
  end
@@ -26,14 +26,14 @@ module Ftpd
26
26
  let(:file_info) do
27
27
  FileInfo.new(:ftype => 'directory',
28
28
  :mode => 0100644,
29
- :mtime => Time.mktime(2013, 3, 3, 8, 38, 0),
29
+ :mtime => Time.utc(2013, 3, 3, 8, 38, 0),
30
30
  :path => 'foo',
31
31
  :size => 1024)
32
32
  end
33
33
  subject(:formatter) {Eplf.new(file_info)}
34
34
 
35
35
  it 'should produce EPLF format' do
36
- formatter.to_s.should == "+/,m1362325080\tfoo"
36
+ formatter.to_s.should == "+/,m1362299880\tfoo"
37
37
  end
38
38
 
39
39
  end
@@ -43,7 +43,7 @@ module Ftpd
43
43
  let(:file_info) do
44
44
  FileInfo.new(:ftype => 'file',
45
45
  :mode => 0100644,
46
- :mtime => Time.mktime(2013, 3, 3, 8, 38, 0),
46
+ :mtime => Time.utc(2013, 3, 3, 8, 38, 0),
47
47
  :path => 'foo',
48
48
  :identifier => '1234.5678',
49
49
  :size => 1234)
@@ -52,7 +52,7 @@ module Ftpd
52
52
 
53
53
  it 'should produce EPLF format' do
54
54
  formatter.to_s.should ==
55
- "+r,s1234,m1362325080,i1234.5678\tfoo"
55
+ "+r,s1234,m1362299880,i1234.5678\tfoo"
56
56
  end
57
57
 
58
58
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ftpd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  prerelease:
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: 2013-03-19 00:00:00.000000000 Z
12
+ date: 2013-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: memoizer
@@ -334,7 +334,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
334
334
  version: '0'
335
335
  segments:
336
336
  - 0
337
- hash: 371312525
337
+ hash: -1044639
338
338
  required_rubygems_version: !ruby/object:Gem::Requirement
339
339
  none: false
340
340
  requirements: