path_expander 1.1.1 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +13 -0
- data/lib/path_expander.rb +4 -2
- data/test/test_path_expander.rb +7 -1
- data.tar.gz.sig +0 -0
- metadata +13 -13
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eeec1c048574cc4f0d12d4827fd428aad427165599cc9ebfc291a2584410fb5
|
4
|
+
data.tar.gz: 427e3257b3683f4cceb531579a1451cba3ca64c9877dda8f1b311bebb131880f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18ee4bd508494c318766fd46dde203281cb6db721d34af35ac123163ee21bf7bef3cabbd3522be440c076280282fdf74f0fd89ca5c4aae684620b9ea12daa164
|
7
|
+
data.tar.gz: abe9be4d62c6302f93d012d4ea2757c80b2828dd1faee86c9ab99dffe4aeaf7ab7d29ee2330633810cb11a638d33c69b66c12d03a07fd26c1f6c5e543fdb6a1f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
=== 1.1.3 / 2024-09-11
|
2
|
+
|
3
|
+
* 1 bug fix:
|
4
|
+
|
5
|
+
* Call to_s before delete_prefix. Maybe don't pass Pathname objects
|
6
|
+
to things that process ARGV?
|
7
|
+
|
8
|
+
=== 1.1.2 / 2024-07-11
|
9
|
+
|
10
|
+
* 1 bug fix:
|
11
|
+
|
12
|
+
* Normalize './' off the front of all paths so options like '.' and '-test' work together better
|
13
|
+
|
1
14
|
=== 1.1.1 / 2022-07-03
|
2
15
|
|
3
16
|
* 1 bug fix:
|
data/lib/path_expander.rb
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
# PathExpander.
|
14
14
|
|
15
15
|
class PathExpander
|
16
|
-
VERSION = "1.1.
|
16
|
+
VERSION = "1.1.3" # :nodoc:
|
17
17
|
|
18
18
|
##
|
19
19
|
# The args array to process.
|
@@ -45,6 +45,8 @@ class PathExpander
|
|
45
45
|
# Takes an array of paths and returns an array of paths where all
|
46
46
|
# directories are expanded to all files found via the glob provided
|
47
47
|
# to PathExpander.
|
48
|
+
#
|
49
|
+
# Paths are normalized to not have a leading "./".
|
48
50
|
|
49
51
|
def expand_dirs_to_files *dirs
|
50
52
|
dirs.flatten.map { |p|
|
@@ -53,7 +55,7 @@ class PathExpander
|
|
53
55
|
else
|
54
56
|
p
|
55
57
|
end
|
56
|
-
}.flatten.sort
|
58
|
+
}.flatten.sort.map { |s| s.to_s.delete_prefix "./" }
|
57
59
|
end
|
58
60
|
|
59
61
|
##
|
data/test/test_path_expander.rb
CHANGED
@@ -34,7 +34,7 @@ class TestPathExpander < Minitest::Test
|
|
34
34
|
assert_equal %w[Rakefile], expander.expand_dirs_to_files("Rakefile")
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
37
|
+
def test_expand_dirs_to_files__sorting
|
38
38
|
exp = %w[test/test_bad.rb test/test_path_expander.rb]
|
39
39
|
input = %w[test/test_path_expander.rb test/test_bad.rb]
|
40
40
|
|
@@ -42,6 +42,12 @@ class TestPathExpander < Minitest::Test
|
|
42
42
|
assert_equal %w[Rakefile], expander.expand_dirs_to_files("Rakefile")
|
43
43
|
end
|
44
44
|
|
45
|
+
def test_expand_dirs_to_files__leading_dot
|
46
|
+
exp = %w[test/test_bad.rb test/test_path_expander.rb]
|
47
|
+
|
48
|
+
assert_equal exp, expander.expand_dirs_to_files("./test")
|
49
|
+
end
|
50
|
+
|
45
51
|
def test_filter_files_dir
|
46
52
|
assert_filter_files [], "test/"
|
47
53
|
assert_filter_files_absolute_paths [], "test/"
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: path_expander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -10,9 +10,9 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDPjCCAiagAwIBAgIBCDANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
14
14
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
-
|
15
|
+
GRYDY29tMB4XDTI0MDEwMjIxMjEyM1oXDTI1MDEwMTIxMjEyM1owRTETMBEGA1UE
|
16
16
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
17
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
18
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -22,14 +22,14 @@ cert_chain:
|
|
22
22
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
23
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
24
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
AQCygvpmncmkiSs9r/Kceo4bBPDszhTv6iBi4LwMReqnFrpNLMOWJw7xi8x+3eL2
|
26
|
+
XS09ZPNOt2zm70KmFouBMgOysnDY4k2dE8uF6B8JbZOO8QfalW+CoNBliefOTcn2
|
27
|
+
bg5IOP7UoGM5lC174/cbDJrJnRG9bzig5FAP0mvsgA8zgTRXQzIUAZEo92D5K7p4
|
28
|
+
B4/O998ho6BSOgYBI9Yk1ttdCtti6Y+8N9+fZESsjtWMykA+WXWeGUScHqiU+gH8
|
29
|
+
S7043fq9EbQdBr2AXdj92+CDwuTfHI6/Hj5FVBDULufrJaan4xUgL70Hvc6pTTeW
|
30
|
+
deKfBjgVAq7EYHu1AczzlUly
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
32
|
+
date: 2024-09-11 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rdoc
|
@@ -57,14 +57,14 @@ dependencies:
|
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '4.2'
|
61
61
|
type: :development
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '4.2'
|
68
68
|
description: |-
|
69
69
|
PathExpander helps pre-process command-line arguments expanding
|
70
70
|
directories into their constituent files. It further helps by
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
121
|
+
rubygems_version: 3.5.18
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: PathExpander helps pre-process command-line arguments expanding directories
|
metadata.gz.sig
CHANGED
Binary file
|