fileutils 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +3 -3
- data/fileutils.gemspec +13 -12
- data/lib/fileutils.rb +6 -9
- metadata +2 -3
- data/lib/fileutils/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a996246ac1d77406d404ad05edf85ad12709c5228c721e8410a723542740e4c
|
4
|
+
data.tar.gz: 14ddbc3ce2d2bb2504e096c3a9826d9c5d6b3a116405b40dac6c1bd7e9870b3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d56948714f7d9fc5c8e98973bdd41489db7b4d107ee6060214e89a972062a23b8665cf8b0cbeb2ebcaf04140234111a4cc0ca672acdc766615868fcee3e64a20
|
7
|
+
data.tar.gz: ac2e352e239eb2fca476b0d5bd7704ca29d2cc49dd46690f1222c5df255129a5860428cf7352d4dd64915c686973497886314bde305a655e1de5cb9dd25d4dbc
|
data/Rakefile
CHANGED
@@ -4,9 +4,9 @@ require "rake/testtask"
|
|
4
4
|
JRuby.objectspace = true if RUBY_PLATFORM == 'java'
|
5
5
|
|
6
6
|
Rake::TestTask.new(:test) do |t|
|
7
|
-
t.libs << "test
|
8
|
-
t.
|
9
|
-
t.test_files = FileList[
|
7
|
+
t.libs << "test/lib"
|
8
|
+
t.ruby_opts << "-rhelper"
|
9
|
+
t.test_files = FileList["test/**/test_*.rb"]
|
10
10
|
end
|
11
11
|
|
12
12
|
task :default => :test
|
data/fileutils.gemspec
CHANGED
@@ -1,20 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
source_version = ["", "lib/"].find do |dir|
|
4
|
+
begin
|
5
|
+
break File.open(File.join(__dir__, "#{dir}fileutils.rb")) {|f|
|
6
|
+
f.gets("\n VERSION = ")
|
7
|
+
f.gets[/\s*"(.+)"/, 1]
|
8
|
+
}
|
9
|
+
rescue Errno::ENOENT
|
10
|
+
end
|
8
11
|
end
|
9
12
|
|
10
13
|
Gem::Specification.new do |s|
|
11
14
|
s.name = "fileutils"
|
12
|
-
s.version =
|
15
|
+
s.version = source_version
|
13
16
|
s.summary = "Several file utility methods for copying, moving, removing, etc."
|
14
17
|
s.description = "Several file utility methods for copying, moving, removing, etc."
|
15
18
|
|
16
19
|
s.require_path = %w{lib}
|
17
|
-
s.files = ["LICENSE.txt", "README.md", "Rakefile", "fileutils.gemspec", "lib/fileutils.rb"
|
20
|
+
s.files = ["LICENSE.txt", "README.md", "Rakefile", "fileutils.gemspec", "lib/fileutils.rb"]
|
18
21
|
s.required_ruby_version = ">= 2.3.0"
|
19
22
|
|
20
23
|
s.authors = ["Minero Aoki"]
|
@@ -22,9 +25,7 @@ Gem::Specification.new do |s|
|
|
22
25
|
s.homepage = "https://github.com/ruby/fileutils"
|
23
26
|
s.license = "BSD-2-Clause"
|
24
27
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
29
|
-
end
|
28
|
+
s.metadata = {
|
29
|
+
"source_code_uri" => "https://github.com/ruby/fileutils"
|
30
|
+
}
|
30
31
|
end
|
data/lib/fileutils.rb
CHANGED
@@ -6,8 +6,6 @@ rescue LoadError
|
|
6
6
|
# for make mjit-headers
|
7
7
|
end
|
8
8
|
|
9
|
-
require_relative "fileutils/version"
|
10
|
-
|
11
9
|
#
|
12
10
|
# = fileutils.rb
|
13
11
|
#
|
@@ -104,6 +102,7 @@ require_relative "fileutils/version"
|
|
104
102
|
# <tt>:verbose</tt> flags to methods in FileUtils.
|
105
103
|
#
|
106
104
|
module FileUtils
|
105
|
+
VERSION = "1.4.0"
|
107
106
|
|
108
107
|
def self.private_module_function(name) #:nodoc:
|
109
108
|
module_function name
|
@@ -918,11 +917,8 @@ module FileUtils
|
|
918
917
|
private_module_function :apply_mask
|
919
918
|
|
920
919
|
def symbolic_modes_to_i(mode_sym, path) #:nodoc:
|
921
|
-
|
922
|
-
|
923
|
-
else
|
924
|
-
File.stat(path).mode
|
925
|
-
end
|
920
|
+
path = File.stat(path) unless File::Stat === path
|
921
|
+
mode = path.mode
|
926
922
|
mode_sym.split(/,/).inject(mode & 07777) do |current_mode, clause|
|
927
923
|
target, *actions = clause.split(/([=+-])/)
|
928
924
|
raise ArgumentError, "invalid file mode: #{mode_sym}" if actions.empty?
|
@@ -939,7 +935,7 @@ module FileUtils
|
|
939
935
|
when "x"
|
940
936
|
mask | 0111
|
941
937
|
when "X"
|
942
|
-
if
|
938
|
+
if path.directory?
|
943
939
|
mask | 0111
|
944
940
|
else
|
945
941
|
mask
|
@@ -1300,7 +1296,8 @@ module FileUtils
|
|
1300
1296
|
.reject {|n| n == '.' or n == '..' }
|
1301
1297
|
end
|
1302
1298
|
|
1303
|
-
|
1299
|
+
untaint = RUBY_VERSION < '2.7'
|
1300
|
+
files.map {|n| Entry_.new(prefix(), join(rel(), untaint ? n.untaint : n)) }
|
1304
1301
|
end
|
1305
1302
|
|
1306
1303
|
def stat
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fileutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minero Aoki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Several file utility methods for copying, moving, removing, etc.
|
14
14
|
email:
|
@@ -22,7 +22,6 @@ files:
|
|
22
22
|
- Rakefile
|
23
23
|
- fileutils.gemspec
|
24
24
|
- lib/fileutils.rb
|
25
|
-
- lib/fileutils/version.rb
|
26
25
|
homepage: https://github.com/ruby/fileutils
|
27
26
|
licenses:
|
28
27
|
- BSD-2-Clause
|