path_expander 2.0.0 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8529b4f928a7169c1f791a8e30a721314ce449671340ec99368930915b1ea8f
4
- data.tar.gz: 6ce9afc38678370b5ece8b7500749b24491be92911d378904bd608fa710e9ddb
3
+ metadata.gz: e36919ef787b530755a0706b85ac1e9718fbe8645ecd544d330b7aa391f7c5b9
4
+ data.tar.gz: adc4bcc85e12d66912486d2c6624f208a0e09d4d0351bf78c0840d960a32a150
5
5
  SHA512:
6
- metadata.gz: ea6fddb1ebe0e11bc152e2c73571d06b5609eacfe2b52ebf4e47d245c48aef096b6dfb8ddf16f2506daa89e98d3096eace1f586130714a2ebf5e74f5beefa038
7
- data.tar.gz: 629edc765830f790ba10263dfcf77af4777926f986f8095c06b38ef624e5f9740e6c9e27ebe31704690fb56be1d90000bd37aa180cca8c36c9da29438f518ff8
6
+ metadata.gz: 44f28957ef37e141489b449064b2e945fc8ce9777b93bd1653cbb506eabdba7ee0fdc4b1c89f837ac0ad3fdd25ff44300b5a7b96411d2f56cfa073a6b8f62bca
7
+ data.tar.gz: 7b97304cc78414ae7d91625538943161d7721b6d3f21d479f88c65b437014432984c3f96bfa4d0e0eca62b195c42db259eedfd02f8a8be52ded96cbabe7fcc70
checksums.yaml.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,12 @@
1
+ === 2.0.1 / 2026-01-08
2
+
3
+ * 4 bug fixes:
4
+
5
+ * Fix path_expander processing of regexp args on windows.
6
+ * Normalize paths when expanding dirs.
7
+ * Added CI setup from minitest 6.
8
+ * Normalize GHA workflow with minitest and others.
9
+
1
10
  === 2.0.0 / 2025-12-11
2
11
 
3
12
  * 3 major enhancements:
data/lib/path_expander.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require "pathname" unless defined? Pathname
2
+
1
3
  ##
2
4
  # PathExpander helps pre-process command-line arguments expanding
3
5
  # directories into their constituent files. It further helps by
@@ -13,7 +15,7 @@
13
15
  # PathExpander.
14
16
 
15
17
  class PathExpander
16
- VERSION = "2.0.0" # :nodoc:
18
+ VERSION = "2.0.1" # :nodoc:
17
19
 
18
20
  ##
19
21
  # The args array to process.
@@ -55,9 +57,11 @@ class PathExpander
55
57
  else
56
58
  p
57
59
  end
58
- }.flatten.sort.map { |s| s.to_s.delete_prefix "./" }
60
+ }.flatten.sort.map { |s| _normalize s }
59
61
  end
60
62
 
63
+ def _normalize(f) = Pathname.new(f).cleanpath.to_s # :nodoc:
64
+
61
65
  ##
62
66
  # Process a file into more arguments. Override this to add
63
67
  # additional capabilities.
@@ -92,6 +96,8 @@ class PathExpander
92
96
  flags = []
93
97
  clean = true
94
98
 
99
+ root_dir = File.expand_path "/" # needed for windows paths
100
+
95
101
  args.each do |arg|
96
102
  case arg
97
103
  when /^@(.*)/ then # push back on, so they can have dirs/-/@ as well
@@ -107,7 +113,7 @@ class PathExpander
107
113
  flags << arg
108
114
  end
109
115
  else
110
- root_path = File.expand_path(arg) == "/" # eg: -n /./
116
+ root_path = File.expand_path(arg) == root_dir # eg: -n /./
111
117
  if File.exist? arg and not root_path then
112
118
  clean = false
113
119
  pos_files += expand_dirs_to_files(arg)
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: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -9,9 +9,9 @@ bindir: bin
9
9
  cert_chain:
10
10
  - |
11
11
  -----BEGIN CERTIFICATE-----
12
- MIIDPjCCAiagAwIBAgIBCTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
12
+ MIIDPjCCAiagAwIBAgIBCjANBgkqhkiG9w0BAQs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LJzmLcz6f2ZWrtBvPsYvqRuwI1bWUtil
25
+ 2ibJEfIuSIHX6BsUTX18+hlaIussf6EWq/YkE7e2BKmgQE42vSOZMce0kCEAPbx0
26
+ rQtqonfWTHQ8UbQ7GqCL3gDQ0QDD2B+HUlb4uaCZ2icxqa/eOtxMvHC2tj+h0xKY
27
+ xL84ipM5kr0bHGf9/MRZJWcw51urueNycBXu1Xh+pEN8qBmYsFRR4SIODLClybAO
28
+ 6cbm2PyPQgKNiqE4H+IQrDVHd9bJs1XgLElk3qoaJBWXc/5fy0J1imYb25UqmiHG
29
+ snGe1hrppvBRdcyEzvhfIPjI
30
30
  -----END CERTIFICATE-----
31
31
  date: 1980-01-02 00:00:00.000000000 Z
32
32
  dependencies:
@@ -36,20 +36,20 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '4.0'
39
+ version: '6.0'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '7'
42
+ version: '8'
43
43
  type: :development
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '4.0'
49
+ version: '6.0'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '7'
52
+ version: '8'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: simplecov
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -70,14 +70,14 @@ dependencies:
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '4.3'
73
+ version: '4.5'
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: '4.3'
80
+ version: '4.5'
81
81
  description: |-
82
82
  PathExpander helps pre-process command-line arguments expanding
83
83
  directories into their constituent files. It further helps by
metadata.gz.sig CHANGED
@@ -1,2 +1 @@
1
- e/!sf#��'i_���d@Ά1ue���l����[��
2
- ���Fv��6��x�M��;��iF��wp� {OT�
1
+ p0�A_m5�~��|Kjt� j=!��\4���CesF^����B4&�2h