ftpd 0.0.1.pre → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ftpd might be problematic. Click here for more details.
- data/Gemfile +3 -1
- data/Gemfile.lock +14 -14
- data/README.md +71 -23
- data/Rakefile +9 -3
- data/VERSION +1 -1
- data/examples/example.rb +132 -53
- data/examples/hello_world.rb +32 -0
- data/features/example/example.feature +18 -0
- data/features/example/step_definitions/example_server.rb +3 -0
- data/features/{command_errors.feature → ftp_server/command_errors.feature} +3 -0
- data/features/ftp_server/concurrent_sessions.feature +14 -0
- data/features/ftp_server/debug.feature +15 -0
- data/features/{delete.feature → ftp_server/delete.feature} +23 -2
- data/features/{directory_navigation.feature → ftp_server/directory_navigation.feature} +17 -4
- data/features/ftp_server/file_structure.feature +43 -0
- data/features/{get.feature → ftp_server/get.feature} +21 -10
- data/features/ftp_server/get_tls.feature +18 -0
- data/features/{list.feature → ftp_server/list.feature} +24 -30
- data/features/ftp_server/list_tls.feature +21 -0
- data/features/{login.feature → ftp_server/login.feature} +4 -2
- data/features/ftp_server/mode.feature +43 -0
- data/features/{name_list.feature → ftp_server/name_list.feature} +25 -31
- data/features/ftp_server/name_list_tls.feature +22 -0
- data/features/{noop.feature → ftp_server/noop.feature} +3 -0
- data/features/{port.feature → ftp_server/port.feature} +3 -0
- data/features/{put.feature → ftp_server/put.feature} +19 -11
- data/features/ftp_server/put_tls.feature +18 -0
- data/features/{quit.feature → ftp_server/quit.feature} +3 -0
- data/features/ftp_server/step_definitions/debug.rb +8 -0
- data/features/ftp_server/step_definitions/test_server.rb +12 -0
- data/features/{syntax_errors.feature → ftp_server/syntax_errors.feature} +3 -0
- data/features/ftp_server/type.feature +56 -0
- data/features/step_definitions/error.rb +10 -3
- data/features/step_definitions/list.rb +21 -4
- data/features/step_definitions/login.rb +0 -2
- data/features/step_definitions/server_files.rb +4 -0
- data/features/step_definitions/stop_server.rb +3 -0
- data/features/support/example_server.rb +58 -0
- data/features/support/test_client.rb +1 -1
- data/features/support/test_server.rb +106 -24
- data/features/support/test_server_files.rb +30 -0
- data/ftpd.gemspec +56 -25
- data/lib/ftpd.rb +22 -4
- data/lib/ftpd/disk_file_system.rb +137 -0
- data/lib/ftpd/error.rb +9 -0
- data/lib/ftpd/exception_translator.rb +29 -0
- data/lib/ftpd/exceptions.rb +13 -0
- data/lib/ftpd/file_system_error_translator.rb +21 -0
- data/lib/ftpd/ftp_server.rb +8 -645
- data/lib/ftpd/insecure_certificate.rb +10 -0
- data/lib/ftpd/server.rb +15 -12
- data/lib/ftpd/session.rb +569 -0
- data/lib/ftpd/temp_dir.rb +10 -11
- data/lib/ftpd/tls_server.rb +27 -15
- data/lib/ftpd/translate_exceptions.rb +44 -0
- data/rake_tasks/cucumber.rake +4 -2
- data/rake_tasks/default.rake +1 -0
- data/rake_tasks/spec.rake +3 -0
- data/rake_tasks/test.rake +2 -0
- data/sandbox/em-server.rb +37 -0
- data/spec/disk_file_system_spec.rb +239 -0
- data/spec/exception_translator_spec.rb +35 -0
- data/spec/spec_helper.rb +5 -0
- data/spec/translate_exceptions_spec.rb +40 -0
- metadata +143 -115
- data/features/concurrent_sessions.feature +0 -11
- data/features/file_structure.feature +0 -40
- data/features/mode.feature +0 -40
- data/features/step_definitions/server.rb +0 -7
- data/features/type.feature +0 -53
data/features/mode.feature
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
Feature: Mode
|
2
|
-
|
3
|
-
As a client
|
4
|
-
I want to set the file transfer mode
|
5
|
-
So that can optimize the transfer
|
6
|
-
|
7
|
-
Scenario: Stream
|
8
|
-
Given a successful login
|
9
|
-
And the server has file "ascii_unix"
|
10
|
-
When the client successfully sets mode "S"
|
11
|
-
And the client successfully gets text "ascii_unix"
|
12
|
-
Then the remote file "ascii_unix" should match the local file
|
13
|
-
|
14
|
-
Scenario: Block
|
15
|
-
Given a successful login
|
16
|
-
And the server has file "ascii_unix"
|
17
|
-
When the client sets mode "B"
|
18
|
-
Then the server returns a mode not implemented error
|
19
|
-
|
20
|
-
Scenario: Compressed
|
21
|
-
Given a successful login
|
22
|
-
And the server has file "ascii_unix"
|
23
|
-
When the client sets mode "C"
|
24
|
-
Then the server returns a mode not implemented error
|
25
|
-
|
26
|
-
Scenario: Invalid
|
27
|
-
Given a successful login
|
28
|
-
And the server has file "ascii_unix"
|
29
|
-
When the client sets mode "*"
|
30
|
-
Then the server returns an invalid mode error
|
31
|
-
|
32
|
-
Scenario: Not logged in
|
33
|
-
Given a successful connection
|
34
|
-
When the client sets mode "S"
|
35
|
-
Then the server returns a not logged in error
|
36
|
-
|
37
|
-
Scenario: Missing parameter
|
38
|
-
Given a successful login
|
39
|
-
When the client sets mode with no parameter
|
40
|
-
Then the server returns a syntax error
|
data/features/type.feature
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
Feature: Representation Type
|
2
|
-
|
3
|
-
As a client
|
4
|
-
I want to set the representation type
|
5
|
-
So that I can interoperate with foreign operating systems
|
6
|
-
|
7
|
-
Scenario: Type ASCII
|
8
|
-
Given a successful login
|
9
|
-
Then the client successfully sets type "A"
|
10
|
-
|
11
|
-
Scenario: Type IMAGE
|
12
|
-
Given a successful login
|
13
|
-
Then the client successfully sets type "I"
|
14
|
-
|
15
|
-
Scenario: Type EBCDIC
|
16
|
-
Given a successful login
|
17
|
-
When the client sets type "E"
|
18
|
-
Then the server returns a type not implemented error
|
19
|
-
|
20
|
-
Scenario: Type Local
|
21
|
-
Given a successful login
|
22
|
-
When the client sets type "L 7"
|
23
|
-
Then the server returns a type not implemented error
|
24
|
-
|
25
|
-
Scenario: Invalid Type
|
26
|
-
Given a successful login
|
27
|
-
When the client sets type "*"
|
28
|
-
Then the server returns an invalid type error
|
29
|
-
|
30
|
-
Scenario: Format Telnet
|
31
|
-
Given a successful login
|
32
|
-
When the client sets type "A T"
|
33
|
-
Then the server returns a format not implemented error
|
34
|
-
|
35
|
-
Scenario: Format Carriage Control
|
36
|
-
Given a successful login
|
37
|
-
When the client sets type "A C"
|
38
|
-
Then the server returns a format not implemented error
|
39
|
-
|
40
|
-
Scenario: Invalid Format
|
41
|
-
Given a successful login
|
42
|
-
When the client sets type "A *"
|
43
|
-
Then the server returns an invalid format error
|
44
|
-
|
45
|
-
Scenario: Not logged in
|
46
|
-
Given a successful connection
|
47
|
-
When the client sets type "S"
|
48
|
-
Then the server returns a not logged in error
|
49
|
-
|
50
|
-
Scenario: Missing parameter
|
51
|
-
Given a successful login
|
52
|
-
When the client sets type with no parameter
|
53
|
-
Then the server returns a syntax error
|