fileutils 1.7.2 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/{LICENSE.txt → BSDL} +3 -3
- data/COPYING +56 -0
- data/fileutils.gemspec +1 -1
- data/lib/fileutils.rb +15 -13
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9187fa7b726decd18c3126b2ec86e2b4dcc9c867c523563b997708c6a3ef802
|
4
|
+
data.tar.gz: 9b31af2775d26c335a6322a420d6fc248646e2989b563b6698fc4aee93f95863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0187dc049dcc1cf76967f1d3f2b436b34e3b16ad7cc5a6b03482be3937633dbd5822d3c4f1f4d34e959155efa250935d7c7f8de122ace2a1ccda47883dfdd2ef'
|
7
|
+
data.tar.gz: 2381eef71dc0be7c3894e43947557ef56a3c4c4d9c5d12410ca9799ef48ec869340005eaeb7e7180f0af41fc909a1078bd934b3a9c8decf95e69d2acea0d0d63
|
data/{LICENSE.txt → BSDL}
RENAMED
@@ -4,10 +4,10 @@ Redistribution and use in source and binary forms, with or without
|
|
4
4
|
modification, are permitted provided that the following conditions
|
5
5
|
are met:
|
6
6
|
1. Redistributions of source code must retain the above copyright
|
7
|
-
notice, this list of conditions and the following disclaimer.
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
8
8
|
2. Redistributions in binary form must reproduce the above copyright
|
9
|
-
notice, this list of conditions and the following disclaimer in the
|
10
|
-
documentation and/or other materials provided with the distribution.
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
10
|
+
documentation and/or other materials provided with the distribution.
|
11
11
|
|
12
12
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
13
13
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
data/COPYING
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
|
2
|
+
You can redistribute it and/or modify it under either the terms of the
|
3
|
+
2-clause BSDL (see the file BSDL), or the conditions below:
|
4
|
+
|
5
|
+
1. You may make and give away verbatim copies of the source form of the
|
6
|
+
software without restriction, provided that you duplicate all of the
|
7
|
+
original copyright notices and associated disclaimers.
|
8
|
+
|
9
|
+
2. You may modify your copy of the software in any way, provided that
|
10
|
+
you do at least ONE of the following:
|
11
|
+
|
12
|
+
a. place your modifications in the Public Domain or otherwise
|
13
|
+
make them Freely Available, such as by posting said
|
14
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
+
the author to include your modifications in the software.
|
16
|
+
|
17
|
+
b. use the modified software only within your corporation or
|
18
|
+
organization.
|
19
|
+
|
20
|
+
c. give non-standard binaries non-standard names, with
|
21
|
+
instructions on where to get the original software distribution.
|
22
|
+
|
23
|
+
d. make other distribution arrangements with the author.
|
24
|
+
|
25
|
+
3. You may distribute the software in object code or binary form,
|
26
|
+
provided that you do at least ONE of the following:
|
27
|
+
|
28
|
+
a. distribute the binaries and library files of the software,
|
29
|
+
together with instructions (in the manual page or equivalent)
|
30
|
+
on where to get the original distribution.
|
31
|
+
|
32
|
+
b. accompany the distribution with the machine-readable source of
|
33
|
+
the software.
|
34
|
+
|
35
|
+
c. give non-standard binaries non-standard names, with
|
36
|
+
instructions on where to get the original software distribution.
|
37
|
+
|
38
|
+
d. make other distribution arrangements with the author.
|
39
|
+
|
40
|
+
4. You may modify and include the part of the software into any other
|
41
|
+
software (possibly commercial). But some files in the distribution
|
42
|
+
are not written by the author, so that they are not under these terms.
|
43
|
+
|
44
|
+
For the list of those files and their copying conditions, see the
|
45
|
+
file LEGAL.
|
46
|
+
|
47
|
+
5. The scripts and library files supplied as input to or produced as
|
48
|
+
output from the software do not automatically fall under the
|
49
|
+
copyright of the software, but belong to whomever generated them,
|
50
|
+
and may be sold commercially, and may be aggregated with this
|
51
|
+
software.
|
52
|
+
|
53
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
54
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
55
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
56
|
+
PURPOSE.
|
data/fileutils.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.description = "Several file utility methods for copying, moving, removing, etc."
|
18
18
|
|
19
19
|
s.require_path = %w{lib}
|
20
|
-
s.files = ["
|
20
|
+
s.files = ["COPYING", "BSDL", "README.md", "Rakefile", "fileutils.gemspec", "lib/fileutils.rb"]
|
21
21
|
s.required_ruby_version = ">= 2.5.0"
|
22
22
|
|
23
23
|
s.authors = ["Minero Aoki"]
|
data/lib/fileutils.rb
CHANGED
@@ -180,7 +180,8 @@ end
|
|
180
180
|
# - {CVE-2004-0452}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452].
|
181
181
|
#
|
182
182
|
module FileUtils
|
183
|
-
|
183
|
+
# The version number.
|
184
|
+
VERSION = "1.7.3"
|
184
185
|
|
185
186
|
def self.private_module_function(name) #:nodoc:
|
186
187
|
module_function name
|
@@ -1651,7 +1652,7 @@ module FileUtils
|
|
1651
1652
|
when "a"
|
1652
1653
|
mask | 07777
|
1653
1654
|
else
|
1654
|
-
raise ArgumentError, "invalid
|
1655
|
+
raise ArgumentError, "invalid 'who' symbol in file mode: #{chr}"
|
1655
1656
|
end
|
1656
1657
|
end
|
1657
1658
|
end
|
@@ -1705,7 +1706,7 @@ module FileUtils
|
|
1705
1706
|
copy_mask = user_mask(chr)
|
1706
1707
|
(current_mode & copy_mask) / (copy_mask & 0111) * (user_mask & 0111)
|
1707
1708
|
else
|
1708
|
-
raise ArgumentError, "invalid
|
1709
|
+
raise ArgumentError, "invalid 'perm' symbol in file mode: #{chr}"
|
1709
1710
|
end
|
1710
1711
|
end
|
1711
1712
|
|
@@ -2028,21 +2029,22 @@ module FileUtils
|
|
2028
2029
|
|
2029
2030
|
private
|
2030
2031
|
|
2031
|
-
module StreamUtils_
|
2032
|
+
module StreamUtils_ # :nodoc:
|
2033
|
+
|
2032
2034
|
private
|
2033
2035
|
|
2034
2036
|
case (defined?(::RbConfig) ? ::RbConfig::CONFIG['host_os'] : ::RUBY_PLATFORM)
|
2035
2037
|
when /mswin|mingw/
|
2036
|
-
def fu_windows?; true end
|
2038
|
+
def fu_windows?; true end #:nodoc:
|
2037
2039
|
else
|
2038
|
-
def fu_windows?; false end
|
2040
|
+
def fu_windows?; false end #:nodoc:
|
2039
2041
|
end
|
2040
2042
|
|
2041
2043
|
def fu_copy_stream0(src, dest, blksize = nil) #:nodoc:
|
2042
2044
|
IO.copy_stream(src, dest)
|
2043
2045
|
end
|
2044
2046
|
|
2045
|
-
def fu_stream_blksize(*streams)
|
2047
|
+
def fu_stream_blksize(*streams) #:nodoc:
|
2046
2048
|
streams.each do |s|
|
2047
2049
|
next unless s.respond_to?(:stat)
|
2048
2050
|
size = fu_blksize(s.stat)
|
@@ -2051,14 +2053,14 @@ module FileUtils
|
|
2051
2053
|
fu_default_blksize()
|
2052
2054
|
end
|
2053
2055
|
|
2054
|
-
def fu_blksize(st)
|
2056
|
+
def fu_blksize(st) #:nodoc:
|
2055
2057
|
s = st.blksize
|
2056
2058
|
return nil unless s
|
2057
2059
|
return nil if s == 0
|
2058
2060
|
s
|
2059
2061
|
end
|
2060
2062
|
|
2061
|
-
def fu_default_blksize
|
2063
|
+
def fu_default_blksize #:nodoc:
|
2062
2064
|
1024
|
2063
2065
|
end
|
2064
2066
|
end
|
@@ -2503,7 +2505,7 @@ module FileUtils
|
|
2503
2505
|
end
|
2504
2506
|
private_module_function :fu_output_message
|
2505
2507
|
|
2506
|
-
def fu_split_path(path)
|
2508
|
+
def fu_split_path(path) #:nodoc:
|
2507
2509
|
path = File.path(path)
|
2508
2510
|
list = []
|
2509
2511
|
until (parent, base = File.split(path); parent == path or parent == ".")
|
@@ -2524,7 +2526,7 @@ module FileUtils
|
|
2524
2526
|
end
|
2525
2527
|
private_module_function :fu_relative_components_from
|
2526
2528
|
|
2527
|
-
def fu_clean_components(*comp)
|
2529
|
+
def fu_clean_components(*comp) #:nodoc:
|
2528
2530
|
comp.shift while comp.first == "."
|
2529
2531
|
return comp if comp.empty?
|
2530
2532
|
clean = [comp.shift]
|
@@ -2543,11 +2545,11 @@ module FileUtils
|
|
2543
2545
|
private_module_function :fu_clean_components
|
2544
2546
|
|
2545
2547
|
if fu_windows?
|
2546
|
-
def fu_starting_path?(path)
|
2548
|
+
def fu_starting_path?(path) #:nodoc:
|
2547
2549
|
path&.start_with?(%r(\w:|/))
|
2548
2550
|
end
|
2549
2551
|
else
|
2550
|
-
def fu_starting_path?(path)
|
2552
|
+
def fu_starting_path?(path) #:nodoc:
|
2551
2553
|
path&.start_with?("/")
|
2552
2554
|
end
|
2553
2555
|
end
|
metadata
CHANGED
@@ -1,23 +1,24 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fileutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minero Aoki
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Several file utility methods for copying, moving, removing, etc.
|
14
14
|
email:
|
15
|
-
-
|
15
|
+
-
|
16
16
|
executables: []
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
-
|
20
|
+
- BSDL
|
21
|
+
- COPYING
|
21
22
|
- README.md
|
22
23
|
- Rakefile
|
23
24
|
- fileutils.gemspec
|
@@ -28,7 +29,7 @@ licenses:
|
|
28
29
|
- BSD-2-Clause
|
29
30
|
metadata:
|
30
31
|
source_code_uri: https://github.com/ruby/fileutils
|
31
|
-
post_install_message:
|
32
|
+
post_install_message:
|
32
33
|
rdoc_options: []
|
33
34
|
require_paths:
|
34
35
|
- lib
|
@@ -43,8 +44,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
43
44
|
- !ruby/object:Gem::Version
|
44
45
|
version: '0'
|
45
46
|
requirements: []
|
46
|
-
rubygems_version: 3.5.
|
47
|
-
signing_key:
|
47
|
+
rubygems_version: 3.5.11
|
48
|
+
signing_key:
|
48
49
|
specification_version: 4
|
49
50
|
summary: Several file utility methods for copying, moving, removing, etc.
|
50
51
|
test_files: []
|