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.

Files changed (70) hide show
  1. data/Gemfile +3 -1
  2. data/Gemfile.lock +14 -14
  3. data/README.md +71 -23
  4. data/Rakefile +9 -3
  5. data/VERSION +1 -1
  6. data/examples/example.rb +132 -53
  7. data/examples/hello_world.rb +32 -0
  8. data/features/example/example.feature +18 -0
  9. data/features/example/step_definitions/example_server.rb +3 -0
  10. data/features/{command_errors.feature → ftp_server/command_errors.feature} +3 -0
  11. data/features/ftp_server/concurrent_sessions.feature +14 -0
  12. data/features/ftp_server/debug.feature +15 -0
  13. data/features/{delete.feature → ftp_server/delete.feature} +23 -2
  14. data/features/{directory_navigation.feature → ftp_server/directory_navigation.feature} +17 -4
  15. data/features/ftp_server/file_structure.feature +43 -0
  16. data/features/{get.feature → ftp_server/get.feature} +21 -10
  17. data/features/ftp_server/get_tls.feature +18 -0
  18. data/features/{list.feature → ftp_server/list.feature} +24 -30
  19. data/features/ftp_server/list_tls.feature +21 -0
  20. data/features/{login.feature → ftp_server/login.feature} +4 -2
  21. data/features/ftp_server/mode.feature +43 -0
  22. data/features/{name_list.feature → ftp_server/name_list.feature} +25 -31
  23. data/features/ftp_server/name_list_tls.feature +22 -0
  24. data/features/{noop.feature → ftp_server/noop.feature} +3 -0
  25. data/features/{port.feature → ftp_server/port.feature} +3 -0
  26. data/features/{put.feature → ftp_server/put.feature} +19 -11
  27. data/features/ftp_server/put_tls.feature +18 -0
  28. data/features/{quit.feature → ftp_server/quit.feature} +3 -0
  29. data/features/ftp_server/step_definitions/debug.rb +8 -0
  30. data/features/ftp_server/step_definitions/test_server.rb +12 -0
  31. data/features/{syntax_errors.feature → ftp_server/syntax_errors.feature} +3 -0
  32. data/features/ftp_server/type.feature +56 -0
  33. data/features/step_definitions/error.rb +10 -3
  34. data/features/step_definitions/list.rb +21 -4
  35. data/features/step_definitions/login.rb +0 -2
  36. data/features/step_definitions/server_files.rb +4 -0
  37. data/features/step_definitions/stop_server.rb +3 -0
  38. data/features/support/example_server.rb +58 -0
  39. data/features/support/test_client.rb +1 -1
  40. data/features/support/test_server.rb +106 -24
  41. data/features/support/test_server_files.rb +30 -0
  42. data/ftpd.gemspec +56 -25
  43. data/lib/ftpd.rb +22 -4
  44. data/lib/ftpd/disk_file_system.rb +137 -0
  45. data/lib/ftpd/error.rb +9 -0
  46. data/lib/ftpd/exception_translator.rb +29 -0
  47. data/lib/ftpd/exceptions.rb +13 -0
  48. data/lib/ftpd/file_system_error_translator.rb +21 -0
  49. data/lib/ftpd/ftp_server.rb +8 -645
  50. data/lib/ftpd/insecure_certificate.rb +10 -0
  51. data/lib/ftpd/server.rb +15 -12
  52. data/lib/ftpd/session.rb +569 -0
  53. data/lib/ftpd/temp_dir.rb +10 -11
  54. data/lib/ftpd/tls_server.rb +27 -15
  55. data/lib/ftpd/translate_exceptions.rb +44 -0
  56. data/rake_tasks/cucumber.rake +4 -2
  57. data/rake_tasks/default.rake +1 -0
  58. data/rake_tasks/spec.rake +3 -0
  59. data/rake_tasks/test.rake +2 -0
  60. data/sandbox/em-server.rb +37 -0
  61. data/spec/disk_file_system_spec.rb +239 -0
  62. data/spec/exception_translator_spec.rb +35 -0
  63. data/spec/spec_helper.rb +5 -0
  64. data/spec/translate_exceptions_spec.rb +40 -0
  65. metadata +143 -115
  66. data/features/concurrent_sessions.feature +0 -11
  67. data/features/file_structure.feature +0 -40
  68. data/features/mode.feature +0 -40
  69. data/features/step_definitions/server.rb +0 -7
  70. data/features/type.feature +0 -53
@@ -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
@@ -1,7 +0,0 @@
1
- Given /^the server is started$/ do
2
- @server = TestServer.new
3
- end
4
-
5
- After do
6
- @server.close if @server
7
- end
@@ -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