ftpmvc 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 024488aeef1805a8ebc1ecb4deb605bf482e6256
4
- data.tar.gz: e5993370082b5dee9fa3070597c9375e136eb70d
3
+ metadata.gz: 800cd0fa5b7d6379cbe1efd1750296bd0ab87f4a
4
+ data.tar.gz: 6d389cc47d11394f75741f21fe0afd16bd9da2f3
5
5
  SHA512:
6
- metadata.gz: bdfef3b7ae0449d4478246650a184ed13b901f4d95a3896ba1cfbf5ce5fd122d4705361123cf1214be8ae6f94d07cab2b22280d915ee51bfe9f36f7e74ac26cc
7
- data.tar.gz: d67691c08fcad0c1d4f5c59a070822b4ea7f18479c6ff18587fcb32f43803965925738ba5d62f980e8a6cd59165725a72094fb92306319db6f4324fd5dc451c5
6
+ metadata.gz: 3140ab81ce032ad0530269c23905e3456228a81cc18f1a66bcca9c6b6d510093e3ffbda7b66d817ae87eceed388ef65e23dbfeefab027a55664b9e447c3c83aa
7
+ data.tar.gz: 77d75fc3cea176626e1282928d52e8eacfaf2903df4fc07482adca73fbdb03e35ccf1fd79cbc6695a07606939ca4ad6a1c89ca651e603f3a6747f1fc5c4d9b5b
data/examples/env/env.rb CHANGED
@@ -10,6 +10,6 @@ app = FTPMVC::Application.new do
10
10
  end
11
11
 
12
12
  FTPMVC::Server.new(2121).start(app) do |server|
13
- puts "Server listening in #{server.host}:#{server.port}..."
13
+ puts "Server listening on #{server.host}:#{server.port}..."
14
14
  end
15
15
 
data/lib/ftpmvc/server.rb CHANGED
@@ -14,8 +14,8 @@ module FTPMVC
14
14
  queue = Queue.new
15
15
  server_thread = Thread.new do
16
16
  begin
17
- start(application) do
18
- queue << true
17
+ start(application) do |server|
18
+ queue << server
19
19
  end
20
20
  rescue => e
21
21
  $strerr.puts "Server error: #{e.class}: #{e.message}"
@@ -4,18 +4,17 @@ require 'ftpmvc/server'
4
4
  module FTPMVC
5
5
  module TestHelpers
6
6
  def with_application(app)
7
- FTPMVC::Server.new('127.0.0.1', 0).start_in_new_thread(app) do |server|
7
+ server = FTPMVC::Server.new('127.0.0.1', 0).start_in_new_thread(app)
8
+ begin
9
+ ftp = Net::FTP.new
8
10
  begin
9
- ftp = Net::FTP.new
10
- begin
11
- ftp.connect('127.0.0.1', server.port)
12
- yield ftp
13
- ensure
14
- ftp.close
15
- end
11
+ ftp.connect('127.0.0.1', server.port)
12
+ yield ftp
16
13
  ensure
17
- server.stop
14
+ ftp.close
18
15
  end
16
+ ensure
17
+ server.stop
19
18
  end
20
19
  end
21
20
 
@@ -1,3 +1,3 @@
1
1
  module FTPMVC
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ftpmvc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Aizim Kelmanson