diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-12-14 14:16:59 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-12-14 15:04:22 +0000 |
commit | a79a1d30289b326c8b6c6deb00f1431c693a4b50 (patch) | |
tree | 20358a34306bfe9e4b230735bb6460ccf2edf873 /lib/bundler/vendor/fileutils/lib/fileutils.rb | |
parent | 912016f626fab3e79e3ef8d9da53d1b148c8b5bf (diff) |
[rubygems/rubygems] Upgrade vendored libraries
To match the versions that will be included in final ruby release.
https://github.com/rubygems/rubygems/commit/84394919fb
Diffstat (limited to 'lib/bundler/vendor/fileutils/lib/fileutils.rb')
-rw-r--r-- | lib/bundler/vendor/fileutils/lib/fileutils.rb | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/lib/bundler/vendor/fileutils/lib/fileutils.rb b/lib/bundler/vendor/fileutils/lib/fileutils.rb index 211311c069..6db19caf6f 100644 --- a/lib/bundler/vendor/fileutils/lib/fileutils.rb +++ b/lib/bundler/vendor/fileutils/lib/fileutils.rb @@ -180,7 +180,7 @@ end # - {CVE-2004-0452}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452]. # module Bundler::FileUtils - VERSION = "1.7.0" + VERSION = "1.7.2" def self.private_module_function(name) #:nodoc: module_function name @@ -192,8 +192,6 @@ module Bundler::FileUtils # # Bundler::FileUtils.pwd # => "/rdoc/fileutils" # - # Bundler::FileUtils.getwd is an alias for Bundler::FileUtils.pwd. - # # Related: Bundler::FileUtils.cd. # def pwd @@ -235,8 +233,6 @@ module Bundler::FileUtils # cd .. # cd fileutils # - # Bundler::FileUtils.chdir is an alias for Bundler::FileUtils.cd. - # # Related: Bundler::FileUtils.pwd. # def cd(dir, verbose: nil, &block) # :yield: dir @@ -515,8 +511,6 @@ module Bundler::FileUtils # Raises an exception if +dest+ is the path to an existing file # and keyword argument +force+ is not +true+. # - # Bundler::FileUtils#link is an alias for Bundler::FileUtils#ln. - # # Related: Bundler::FileUtils.link_entry (has different options). # def ln(src, dest, force: nil, noop: nil, verbose: nil) @@ -707,8 +701,6 @@ module Bundler::FileUtils # ln -sf src2.txt dest2.txt # ln -s srcdir3/src0.txt srcdir3/src1.txt destdir3 # - # Bundler::FileUtils.symlink is an alias for Bundler::FileUtils.ln_s. - # # Related: Bundler::FileUtils.ln_sf. # def ln_s(src, dest, force: nil, relative: false, target_directory: true, noop: nil, verbose: nil) @@ -876,8 +868,6 @@ module Bundler::FileUtils # # Raises an exception if +src+ is a directory. # - # Bundler::FileUtils.copy is an alias for Bundler::FileUtils.cp. - # # Related: {methods for copying}[rdoc-ref:FileUtils@Copying]. # def cp(src, dest, preserve: nil, noop: nil, verbose: nil) @@ -1164,8 +1154,6 @@ module Bundler::FileUtils # mv src0 dest0 # mv src1.txt src1 dest1 # - # Bundler::FileUtils.move is an alias for Bundler::FileUtils.mv. - # def mv(src, dest, force: nil, noop: nil, verbose: nil, secure: nil) fu_output_message "mv#{force ? ' -f' : ''} #{[src,dest].flatten.join ' '}" if verbose return if noop @@ -1223,8 +1211,6 @@ module Bundler::FileUtils # # rm src0.dat src0.txt # - # Bundler::FileUtils.remove is an alias for Bundler::FileUtils.rm. - # # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting]. # def rm(list, force: nil, noop: nil, verbose: nil) @@ -1250,8 +1236,6 @@ module Bundler::FileUtils # # See Bundler::FileUtils.rm for keyword arguments. # - # Bundler::FileUtils.safe_unlink is an alias for Bundler::FileUtils.rm_f. - # # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting]. # def rm_f(list, noop: nil, verbose: nil) @@ -1339,8 +1323,6 @@ module Bundler::FileUtils # # See Bundler::FileUtils.rm_r for keyword arguments. # - # Bundler::FileUtils.rmtree is an alias for Bundler::FileUtils.rm_rf. - # # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting]. # def rm_rf(list, noop: nil, verbose: nil, secure: nil) @@ -1642,7 +1624,13 @@ module Bundler::FileUtils st = File.stat(s) unless File.exist?(d) and compare_file(s, d) remove_file d, true - copy_file s, d + if d.end_with?('/') + mkdir_p d + copy_file s, d + File.basename(s) + else + mkdir_p File.expand_path('..', d) + copy_file s, d + end File.utime st.atime, st.mtime, d if preserve File.chmod fu_mode(mode, st), d if mode File.chown uid, gid, d if uid or gid |