Граф коммитов

68 Коммитов

Автор SHA1 Сообщение Дата
shugo 6479e0b04f * lib/net/ftp.rb (gets, readline): read lines without LF properly.
[ruby-core:63205] [Bug #9949]

* test/net/ftp/test_buffered_socket.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-17 07:44:53 +00:00
akr 569ca78e97 * lib/net/ftp.rb (transfercmd): Close TCP server socket even if an
exception occur.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-27 15:14:59 +00:00
knu 537dac2713 * lib/net/ftp.rb (Net::FTP#login): [DOC] The default password for
anonymous login was changed to "anonymous@" in r25313.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-10 14:46:37 +00:00
zzak 8adbcb6634 * lib/net/ftp.rb: [DOC] Document Net::FTP.mdtm and .set_socket and fix
spelling typo, based on patch by @artfuldodger [Fixes GH-426]
  https://github.com/ruby/ruby/pull/426


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 17:38:18 +00:00
ktsj edb98f8b91 fix typos. Patch by k_takata.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 03:10:21 +00:00
hsbt c25aa9f5d6 Document the default Net timeout values by @toolmantim [GH fixes #269]
* lib/net/{ftp,http,pop,smtp}.rb: added documentation for default values.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-31 01:47:47 +00:00
hsbt 4edd787b14 cleanup by @vipulnsward [GH fixes #262]
lib/net/http/generic_request.rb: Removes unnecessary assignment
lib/net/ftp.rb: Fixes dead code


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-22 11:57:51 +00:00
naruse f6fb038dee * lib/net/ftp.rb (Net::FTP#retrbinary): close only if conn is not nil
because transfercmd may fail and return nil.

* lib/net/ftp.rb (Net::FTP#retrlines): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21 12:56:17 +00:00
naruse 52f0c6780e * lib/net/ftp.rb (Net::FTP#transfercmd): rescue shutdown.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21 02:27:07 +00:00
naruse d795f2d1a8 Shutdown gracefully.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20 21:56:40 +00:00
naruse 7865005fa1 * lib/ftp/ftp.rb (Net::FTP#close): restore original read_timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-04 04:10:58 +00:00
naruse 096ffa2a63 * lib/ftp/ftp.rb (Net::FTP#close): ignore exceptions from shutdown and
read on closing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-04 01:33:58 +00:00
naruse bc2ece6cf8 * lib/ftp/ftp.rb (Net::FTP#close): close socket more gracefully.
* lib/ftp/ftp.rb (Net::BufferedSocket#shutdown): added.

* test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): wait socket
  with shutdown and read.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03 19:24:30 +00:00
naruse ae79409db4 * lib/net/ftp.rb (Net::BufferedSocket): should delegate send() to @io
for Net::FTP#abort and Net::FTP#status..

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01 14:06:38 +00:00
shugo d8438024a2 * lib/net/ftp.rb: fixed the domain name in examples.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31 15:56:18 +00:00
shugo 5f81a53fd2 * lib/net/ftp.rb (read_timeout=, open_timeout=): supported timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31 04:44:36 +00:00
shugo bb314d3347 * lib/net/ftp.rb (parse227, parse228, parse229): don't use $~.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 14:43:27 +00:00
shugo d68b3a38e9 * lib/net/ftp.rb (parse227, parse228, parse229): don't use local
variables defined by named capture for other Ruby implementations
  such as Rubinius.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 14:39:21 +00:00
shugo 422c8baeb9 * lib/net/ftp.rb (parse_pasv_port): refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 14:39:16 +00:00
shugo 8c89d8ef72 * lib/net/ftp.rb (parse227, parse228, parse229): refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 10:52:04 +00:00
ktsj c3749b6a6d * ext/pathname/lib/pathname.rb, ext/tk/lib/multi-tk.rb,
ext/tk/sample/demos-en/widget, lib/benchmark.rb, lib/irb/cmd/fork.rb,
  lib/mkmf.rb, lib/net/ftp.rb, lib/net/smtp.rb, lib/open3.rb,
  lib/pstore.rb, lib/rexml/element.rb, lib/rexml/light/node.rb,
  lib/rinda/tuplespace.rb, lib/rss/maker/base.rb,
  lib/rss/maker/entry.rb, lib/scanf.rb, lib/set.rb, lib/shell.rb,
  lib/shell/command-processor.rb, lib/shell/process-controller.rb,
  lib/shell/system-command.rb, lib/uri/common.rb: remove unused block
  arguments to avoid creating Proc objects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 07:37:47 +00:00
drbrain 9c711c0be6 * lib/net/ftp.rb: Add :nodoc: for private methods.
[Ruby 1.9 - Bug #4710]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-25 00:26:51 +00:00
nobu d371e3583e * lib: revert r31635-r31638 and untabify with expand(1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-19 00:07:25 +00:00
drbrain 7bbf2f3085 * lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style
	  Patch by Steve Klabnik [Ruby 1.9 - Bug #4730]
	  Patch by Jason Dew [Ruby 1.9 - Feature #4718]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 21:19:18 +00:00
drbrain af70305901 * lib/net/ftp.rb (module Net):
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-17 19:51:16 +00:00
marcandre f3e3547407 * lib/*.rb: Remove unused variable warnings.
Patch by Run Paint [ruby-core:30991]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-08 20:59:01 +00:00
shugo 0381cec507 * lib/net/ftp.rb (initialize): set @sock to a NullSocket instance to
raise FTPConnectionError when not connected.   [ruby-dev:40258]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-06 15:26:20 +00:00
shugo 64e6f141fa * lib/net/ftp.rb (putbinaryfile): use APPE for resume.
Thanks, Tomoyuki Chikanaga.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-19 14:21:05 +00:00
shugo 91c84cda9b * lib/net/ftp.rb (Net::FTP#initialize): sets @binary to true.
* lib/net/ftp.rb (Net::FTP#binary=): sends a TYPE command only when
  logged in. [ruby-dev:39548]
* lib/net/ftp.rb (Net::FTP#send_type_command): new private method
  which sends an appropriate TYPE command according to the value of
  @binary.
* lib/net/ftp.rb (Net::FTP#login): calls send_type_command instead
  of binary=.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 04:09:20 +00:00
naruse 249569fd8e * lib/net/ftp.rb (Net::FTP#initialize): @sock = nil.
* lib/net/ftp.rb (Net::FTP#binary=): send command only when
  socket is open. [ruby-dev:39548]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-27 13:50:42 +00:00
shugo 613a324f61 * lib/net/ftp.rb (getbinaryfile, list): call to_s to convert
a Pathname instance into a string.  [ruby-core:26237]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-27 06:47:41 +00:00
shugo b83a7c1076 * lib/net/ftp.rb (login): use "anonymous@" as a default password.
[ruby-dev:39451]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-12 14:29:05 +00:00
shugo 9994d05b7e * lib/net/ftp.rb (retrlines): added a new block parameter.
* lib/net/ftp.rb (gettextfile): preserve missing end-of-line at end
  of files.  [ruby-core:24590]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-12 13:52:37 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
matz e606e7e32b * lib/net/ftp.rb (Net::FTP#open_socket): SOCKSsocket is obsolete.
a patch from Alan Johnson <alan.wayne.johnson at gmail.com> in
  [ruby-core:19982].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-18 12:29:25 +00:00
shugo 16a24188cd * lib/net/ftp.rb (login): raise FTPReplyError if passwd or acct
is not supplied.  fixed [ruby-core:18058].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-07 11:55:13 +00:00
shugo 1498b668d2 * lib/net/ftp.rb (chdir): handle 5xx errors correctly.
fixed [ruby-core:18057].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 07:42:45 +00:00
nobu 62dc500faf * lib/net/ftp.rb (Net::FTP#sendport): use divmod. [ruby-core:17557]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-04 05:17:25 +00:00
shugo 3306e785b5 * lib/net/ftp.rb (Net::FTP#transfercmd): skip 2XX
responses for some FTP servers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-30 04:25:32 +00:00
shugo 0d59cd79cc * lib/net/ftp.rb: moved fixes for EPIPE to the correct
place. [ruby-core:10204]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06 09:45:28 +00:00
shugo d4d5f27077 * lib/net/ftp.rb: check the control connection on EPIPE.
Thanks, Simon Williams. [ruby-core:9547]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06 02:19:01 +00:00
shugo 65867866a8 * lib/net/ftp.rb: (getbinaryfile): allow nil for localfile, and
returns retrieved data if localfile is nil.
* lib/net/ftp.rb: (gettextfile): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-15 14:54:03 +00:00
shugo 9e9fdc1592 * lib/net/ftp.rb (binary=): send TYPE commands only once.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-20 12:15:07 +00:00
shugo 87fb7bb66d * lib/net/ftp.rb (MDTM_REGEXP): fix for demon's ftp server.
Thanks, Rutger Nijlunsing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-27 06:56:23 +00:00
gsinclair d9c41de9cc * lib/net/ftp.rb: ported documentation improvement from 1.8 branch
* lib/net/imap.rb:   ditto
 * lib/net/pop.rb:    ditto
 * lib/net/smtp.rb:   ditto
 * lib/net/telnet.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-09 14:42:43 +00:00
nobu 92f0be2037 * dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,
lib/date.rb, lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb,
  lib/matrix.rb, lib/monitor.rb, lib/set.rb, lib/thwait.rb,
  lib/timeout.rb, lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb,
  lib/net/ftp.rb, lib/net/http.rb, lib/net/imap.rb, lib/net/pop.rb,
  lib/net/telnet.rb, lib/racc/parser.rb, lib/rinda/rinda.rb,
  lib/rinda/tuplespace.rb, lib/shell/command-processor.rb,
  lib/soap/rpc/soaplet.rb, lib/test/unit/testcase.rb,
  lib/test/unit/testsuite.rb: typo fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-18 23:19:47 +00:00
gsinclair be7c88a3e2 Small documentation update, including source attribution.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-21 09:56:21 +00:00
gsinclair f3f7c40c49 Small changes to documentation; mainly hiding things from RDoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-21 09:07:57 +00:00
shugo 1358ec597b * lib/net/ftp.rb (return_code): obsolete.
* lib/net/ftp.rb (last_response_code): new method. lastresp is now
alias to last_response_code.
* lib/net/ftp.rb (last_response): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-30 15:28:20 +00:00
shugo e155879b46 * lib/net/ftp.rb (get): fix wrong argument name. Thanks to William
Webber.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-30 01:56:45 +00:00