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

177 Коммитов

Автор SHA1 Сообщение Дата
nobu 36b183ce8c fileutils.rb: split fu_windows?
* lib/fileutils.rb (FileUtils::StreamUtils_#fu_windows?): select
  the method definition for each platforms, and dropped supports
  for deprecated platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-19 00:22:39 +00:00
nobu db5765ba54 fileutils.rb: remove code for OS/2 emx
* lib/fileutils.rb (FileUtils#mv): remove code for OS/2 emx, its
  support has been dropped yeas ago.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-16 01:31:28 +00:00
hsbt ff6520b0f7 Added workaround to fileutils for `make btest` without rbconfig.
Followed up r63430.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15 10:10:33 +00:00
hsbt 60fbe01353 Retry to merge fileutils-1.1.0.
* Revert "Revert "Merge fileutils-1.1.0.""
    This reverts commit 84bb8e81c2.

  * Added workaround for make mjit-headers

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15 05:53:18 +00:00
mame 84bb8e81c2 Revert "Merge fileutils-1.1.0."
This reverts commit 99da3d2570e110d3024039102205f6d64174bf5e.
The change caused the following build failure:

```
.../ruby/lib/fileutils.rb:88:in `require': cannot load such file -- rbconfig (LoadError)
uncommon.mk:987: recipe for target 'encdb.h' failed
make: *** [encdb.h] Error 1
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15 04:16:08 +00:00
hsbt 6f9609867c Merge fileutils-1.1.0.
This version was migrated JRuby paches.
  https://github.com/ruby/fileutils/pull/18

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15 01:22:36 +00:00
k0kubun b2839bac44 [DOC] Fix links of cve [ci skip]
`http://www.cve.mitre.org/` seem to move `http://cve.mitre.org/`.
I can't access `http://www.cve.mitre.org/`.

[Fix GH-1857]

From: willnet <netwillnet@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-16 10:20:15 +00:00
stomar d890fabecf lib/fileutils.rb: [DOC] fix typos and grammar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-14 16:47:59 +00:00
kazu f01315a5cf Fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13 15:10:59 +00:00
mame d583ee266b Add FileUtils#cp_lr
* lib/fileutils.rb: Add FileUtils#cp_lr.  This method creates hard links
  of each file from directory to another directory recursively.
  This patch is based on Thomas Sawyers and Zachary Scott.
  [Feature #4189] [ruby-core:33820]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13 08:18:03 +00:00
hsbt 84e462758d Bump up fileutils-1.0.2
Added `FileUtils::VERSION` const variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 08:00:10 +00:00
hsbt 0242f7ccae Overwrite destination symlink file if `remove_destination` is set.
[Bug #13914][ruby-core:82846] Patch by @mzp
  https://github.com/ruby/fileutils/pull/9

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-20 07:03:11 +00:00
nobu 2635984cf2 fileutils.rb: error at rmdir
* lib/fileutils.rb (rmdir): should not ignore errors first, except
  for parent directories.  [ruby-dev:50236] [Bug #13889]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-16 11:59:47 +00:00
stomar ddd37e5491 docs for FileUtils.ln methods
* lib/fileutils.rb: [DOC] add clarifying call-seq's for FileUtil.ln,
  ln_s, and ln_sf, with better argument names for the created link and
  link target.  Reported by Mike Vastola. [ruby-core:62532] [Bug #9829]

* lib/fileutils.rb: [DOC] further improve descriptions of FileUtils.ln
  and related methods; improve examples: relative links probably won't
  work in other dir, avoid `include', use more generic homedir name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-08 20:41:38 +00:00
stomar 97e946f75a fileutils.rb: improve rdoc for FileUtils
* lib/fileutils.rb: [DOC] fix invalid example code to make it
  syntax highlighted, fix rdoc for lists, nodoc internal methods,
  avoid a dangerous example.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 10:17:42 +00:00
stomar 7957042253 fileutils.rb: improve docs for FileUtils.compare_file
* lib/fileutils.rb (compare_file): [DOC] clarify documentation
  by avoiding confusing return value of "maybe false".

[ruby-core:75431] [Misc #12365] reported by Robert A. Heiler.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 08:54:37 +00:00
nobu 3261cfd881 fileutils.rb: do not make root
* lib/fileutils.rb (FileUtils#mkdir_p): no need to make root
  directory which should be exist and cannot be made with mkdir
  recent Cygwin can make a directory contains a colon.
  [Bug #13214]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-16 08:42:22 +00:00
hsbt 18a315df43 Fix documentation of options for all of methods in FileUtils.
Patch by galia traub( @galiat ). [Fix GH-1510][ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19 07:07:17 +00:00
kazu 9144d57b94 lib/fileutils.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 02:14:07 +00:00
nobu 0785b3e1b7 fileutils.rb: fix error for non-existent entry
* lib/fileutils.rb (FileUtils::Entry_#copy): ensure that the
  source entry exists first, to fix error for non-existent entry.
  [ruby-core:77885] [Bug #12892]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-04 01:35:49 +00:00
nobu e3503ee218 Octal mode in un.rb
* lib/fileutils.rb (FileUtils#symbolic_modes_to_i): revert r55524.

* lib/un.rb (install, chmod): support octal mode string.  fix up
  r55513.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 22:03:00 +00:00
arton f2f16f2a35 Tue Jun 28 22:09:09 2017 Akio Tajima <artonx@yahoo.co.jp>
* lib/fileutils.rb: rescue Errno:EACCES for chown.
	  [Bug #12520]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 13:14:48 +00:00
nobu d34b3c9a0f Octal mode
* lib/fileutils.rb (symbolic_modes_to_i): support octal mode
  string.  fix up r55513.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 12:33:28 +00:00
nobu 2a5183c2e4 FileUtils#install: symbolic mode
* lib/fileutils.rb (FileUtils#install): accecpt symbolic mode, as
  well as chmod.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-27 07:58:34 +00:00
nobu 10fcca8f15 FileUtils#install: owner/group options
* lib/fileutils.rb (FileUtils#install): add owner and group
  options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-27 07:55:17 +00:00
nobu 71db7bd3d3 Refactor
* lib/fileutils.rb (FileUtils::Entry_#copy_metadata): eliminate
  common statements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-27 01:24:46 +00:00
nobu baa43cd0c2 fileutils.rb: keyword arguments
* lib/fileutils.rb: use keyword arguments instead of option
  hashes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-01 02:26:44 +00:00
nobu 52bdb3ce02 fileutils.rb: LowMethods aliases
* lib/fileutils.rb (LowMethods): make alias methods instead of
  eval for each methods.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-29 12:22:17 +00:00
nobu efa39c3dbd fileutils.rb: reduce private
* lib/fileutils.rb (Verbose, NoWrite, DryRun): make overridden
  methods private by each one calls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-29 08:36:30 +00:00
nobu 6b3e5bb061 fileutils.rb: reduce public
* lib/fileutils.rb (Verbose, NoWrite, DryRun): make extended
  methods public by each one calls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-29 08:36:29 +00:00
nobu 13dadf3f26 fileutils.rb: unify method definition style
* lib/fileutils.rb: Unify to coding-style for method definition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-29 08:36:28 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
hsbt d7908f9a9c * lib/fileutils.rb: rename tailing to trailing.
[Misc #11548]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-26 08:30:20 +00:00
nobu 74842faf64 fileutils.rb: fix rename_cannot_overwrite_file
* lib/fileutils.rb (rename_cannot_overwrite_file): File.rename on
  cygwin and mswin/mingw can overwrite the destination file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 16:05:39 +00:00
nobu 676fe089bd fileutils.rb: fix error message
* lib/fileutils.rb (FileUtils#mv): show the exact target path in
  the error message instead of the destination parent directory
  name.  patched by João Britto <jabcalves AT gmail.com> at
  [ruby-core:68706].  [Bug #11021]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-01 00:59:14 +00:00
hsbt ac210750df * lib/fileutils.rb: enable to remove with non-owner directory.
[ruby-dev:45976] [Bug #6756]
* test/fileutils/test_fileutils.rb: add testcase for #6756.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-12 04:36:31 +00:00
hsbt 0210b487a4 * lib/fileutils.rb: fix typo.
[ruby-dev:47831] [Bug #9180]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-12 03:21:57 +00:00
hsbt 2de10af779 * lib/fileutils.rb: added missing options of FileUtils.touch by @Domon.
[fix GH-669]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 01:16:12 +00:00
hsbt c2eac0e78c * lib/fileutils.rb: handle ENOENT error with symlink targeted to
non-exists file. [ruby-dev:45933] [Bug #6716]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 07:51:19 +00:00
ayumin 529461dff7 * lib/fileutils.rb: show fileutils require at top.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-08 18:32:24 +00:00
akr 17a4a9b993 * lib/fileutils.rb: Don't need to define fu_get_gid and fu_get_gid in
rescue LoadError on 'etc'.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-29 03:51:13 +00:00
ngoto 1377f38c9b * lib/fileutils.rb (rmdir): rescue Errno::EEXIST in addition to
ENOTEMPTY (and ENOENT), because SUSv3 describes that "If the
  directory is not an empty directory, rmdir() shall fail and set
  errno to [EEXIST] or [ENOTEMPTY]" and Solaris uses EEXIST.
  [Bug #9571] [ruby-dev:48017]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-25 14:28:56 +00:00
usa 3c00fe9f41 * lib/fileutils.rb (fu_get_uid, fu_get_gid): Etc.getpwnam/getgrnam may
returns nil.

* lib/webrick/utils.rb (su): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-24 14:19:21 +00:00
nobu 52ca908819 fileutils.rb: [DOC] update rdoc
* lib/fileutils.rb (FileUtils#copy_entry): update rdoc about
  preserve option and permissions, following r31123.
  [ruby-core:62065] [Bug #9748]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17 01:03:55 +00:00
zzak d89e8fb53a * lib/fileutils.rb: [DOC] Fix typo in options_of() example [Bug #9392]
Patch by Giorgos Tsiftsis


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-23 05:28:36 +00:00
hsbt 94ebcc4aa7 * fix typo by @rrrene [fix GH-510]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-22 06:22:06 +00:00
nobu a8aefef874 fileutils.rb: rmdir parents option
* lib/fileutils.rb (FileUtils#rmdir): [DOC] add parents option.
  [Bug #7824]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24 16:56:31 +00:00
hsbt 218755f306 * lib/fileutils.rb: remove unnecessary initialization. by @vipulnsward [fix GH-463]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07 10:25:33 +00:00
a_matsuda 4f5d3c5e53 * lib/fileutils.rb: [DOC] Fix typo (s/perserve/preserve/)
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30 14:41:55 +00:00
zzak c366a99cc5 * lib/cgi.rb: [DOC] Capitalize "Ruby" in documentation [Fixes GH-341]
Patch by Dave Worth https://github.com/ruby/ruby/pull/341
* lib/webrick.rb: ditto
* lib/scanf.rb: ditto
* lib/xmlrpc/config.rb: ditto
* lib/resolv.rb: ditto
* lib/e2mmap.rb: ditto
* lib/fileutils.rb: ditto
* lib/mkmf.rb: ditto
* lib/cgi/session.rb: ditto
* lib/yaml.rb: ditto
* lib/erb.rb: ditto
* lib/irb.rb: ditto
* lib/tracer.rb: ditto
* lib/net/http.rb: ditto
* ext/syslog/lib/syslog/logger.rb: ditto
* sample/pty/expect_sample.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-18 13:50:32 +00:00