tftpplus 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/ChangeLog +28 -0
  2. data/README +4 -2
  3. data/bin/tftp_client.rb +2 -2
  4. data/lib/net/tftp+.rb +3 -3
  5. metadata +7 -7
data/ChangeLog CHANGED
@@ -1,3 +1,31 @@
1
+ 2007-05-31 01:45 msoulier
2
+
3
+ * lib/net/tftp+.rb: Fixed download problem on windows
4
+
5
+ 2007-04-29 13:24 msoulier
6
+
7
+ * bin/tftp_client.rb: Fixed client error not going to the logger
8
+
9
+ 2007-03-31 01:17 msoulier
10
+
11
+ * Rakefile: Updated the gemspec.
12
+
13
+ 2007-03-31 00:53 msoulier
14
+
15
+ * Rakefile: Updated description.
16
+
17
+ 2007-03-20 01:39 msoulier
18
+
19
+ * Rakefile: Rolling version ahead.
20
+
21
+ 2007-03-20 01:27 msoulier
22
+
23
+ * ChangeLog: Updated ChangeLog for version 0.3.
24
+
25
+ 2007-03-20 01:26 msoulier
26
+
27
+ * README: Updated README.
28
+
1
29
  2007-03-15 00:00 msoulier
2
30
 
3
31
  * ChangeLog: Updated ChangeLog
data/README CHANGED
@@ -7,18 +7,20 @@ A new tftp library for clients and servers that supports RFCs 1350, 2347 and
7
7
  Release Notes:
8
8
  ==============
9
9
 
10
+ About version 0.4:
11
+ ------------------
12
+ - Fixed a download problem on windows.
13
+
10
14
  About version 0.3:
11
15
  ------------------
12
16
  - First working server class.
13
17
 
14
18
  About version 0.2:
15
19
  ------------------
16
-
17
20
  - Fixed handling of remote TID.
18
21
 
19
22
  About version 0.1:
20
23
  ------------------
21
-
22
24
  - Added timeouts on recvfrom
23
25
  - Updated debugging output
24
26
  - Moved client code into its own sample client.
data/bin/tftp_client.rb CHANGED
@@ -104,8 +104,8 @@ def main
104
104
  $log.debug('client') { "Downloaded #{size} bytes" }
105
105
  end
106
106
  rescue TftpError => details
107
- $stderr.puts "Fatal exception in transfer"
108
- $stderr.puts details
107
+ $log.error "Fatal exception in transfer"
108
+ $log.error details
109
109
  end
110
110
 
111
111
  finish = Time.now
data/lib/net/tftp+.rb CHANGED
@@ -953,7 +953,7 @@ class TftpServerHandler < TftpSession
953
953
  path = @root + '/' + @filename
954
954
  if File.exists?(path)
955
955
  debug "Opening file #{path} for reading"
956
- @file = File.new(path, "r")
956
+ @file = File.new(path, "rb")
957
957
  debug "File open: #{@file.inspect}"
958
958
  send_dat()
959
959
  else
@@ -978,10 +978,10 @@ class TftpServerHandler < TftpSession
978
978
  unless opts.key?(:resend) and opts[:resend]
979
979
  blksize = @options[:blksize].to_i
980
980
  debug "Reading #{blksize} bytes from file #{@filename}"
981
- rv = @file.read(blksize, @buffer)
981
+ @buffer = @file.read(blksize)
982
982
  debug "@buffer is now #{@buffer.class}"
983
983
  debug "Read #{@buffer.length} bytes into buffer"
984
- unless rv
984
+ if @file.eof
985
985
  info "End of file #{@filename} detected."
986
986
  @file.close
987
987
  @state = :fin
metadata CHANGED
@@ -3,19 +3,19 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: tftpplus
5
5
  version: !ruby/object:Gem::Version
6
- version: "0.3"
7
- date: 2007-03-19 00:00:00 -04:00
8
- summary: A pure tftp implementation with support for variable block sizes
6
+ version: "0.4"
7
+ date: 2007-05-30 00:00:00 -04:00
8
+ summary: A pure Ruby TFTP implementation with support for variable block sizes (RFCs 1350, 2347 and 2348).
9
9
  require_paths:
10
10
  - lib
11
11
  email: msoulier@digitaltorque.ca
12
12
  homepage: http://tftpplus.rubyforge.org
13
13
  rubyforge_project:
14
- description: A new tftp library for clients and servers that supports RFCs 1350, 2347 and 2348 (ie. variable block sizes). It includes a sample client implementation, and will eventually include a multi-threaded server as well.
14
+ description: A new tftp library for clients and servers that supports RFCs 1350, 2347 and 2348 (ie. variable block sizes). It includes a sample client implementation, and a sample server implementation. The server is single-threaded and supports multiple simultaneous downloads.
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin
18
- has_rdoc: false
18
+ has_rdoc: true
19
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
20
20
  requirements:
21
21
  - - ">"
@@ -37,8 +37,8 @@ test_files:
37
37
  - test/test.rb
38
38
  rdoc_options: []
39
39
 
40
- extra_rdoc_files: []
41
-
40
+ extra_rdoc_files:
41
+ - README
42
42
  executables:
43
43
  - tftp_client.rb
44
44
  extensions: []