recls-ruby 2.13.1 → 2.13.4
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/AUTHORS.md +21 -0
- data/CHANGES.md +216 -0
- data/CONTRIBUTING.md +36 -0
- data/EXAMPLES.md +11 -0
- data/FAQ.md +28 -0
- data/INSTALL.md +41 -0
- data/LICENSE +3 -5
- data/NEWS.md +42 -0
- data/README.md +79 -35
- data/Rakefile +21 -1
- data/SECURITY.md +23 -0
- data/TODO.md +24 -0
- data/examples/find_files_and_directories.md +3 -2
- data/examples/find_files_and_directories.recursive.md +3 -2
- data/examples/show_hidden_files.md +9 -4
- data/examples/show_readonly_files.md +8 -4
- data/lib/recls/api.rb +2 -1
- data/lib/recls/combine_paths_1.rb +29 -4
- data/lib/recls/combine_paths_2plus.rb +29 -4
- data/lib/recls/entry.rb +18 -6
- data/lib/recls/file_search.rb +3 -2
- data/lib/recls/flags.rb +2 -1
- data/lib/recls/foreach.rb +2 -1
- data/lib/recls/obsolete.rb +2 -1
- data/lib/recls/recls.rb +2 -1
- data/lib/recls/stat.rb +2 -1
- data/lib/recls/util.rb +2 -1
- data/lib/recls/version.rb +4 -3
- data/lib/recls/ximpl/os.rb +2 -1
- data/lib/recls/ximpl/unix.rb +19 -4
- data/lib/recls/ximpl/util.rb +10 -4
- data/lib/recls/ximpl/windows.rb +29 -6
- data/lib/recls.rb +2 -1
- data/test/unit/tc_recls_util.rb +0 -109
- data/test/unit/util/tc_combine_paths.rb +157 -0
- data/test/unit/util/ts_all.rb +22 -0
- metadata +45 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 244443de9e6f8a6beb1f07d016dd29eae799aca56921f30c9594949952a6316e
|
|
4
|
+
data.tar.gz: a949e0f6e81fba50179eb752c4326ecbf3ae633083ca19b6321a5482c9bc03f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fcba1fa6cb3daa2e7c5459ed75877b199ae560ea758fcd332499e7e52292c0133def3d1c089ffe62eacbc510179c4fc4d1688fea4ace291c57d8bb0c4fa44b82
|
|
7
|
+
data.tar.gz: fa7df6af558a46b78113f573d37e722dbc89fba3632b9e45bf94638d0b6d301715151406ac8e1791dd28b23d69363615a9a251e8154758f1d85435a5079b939b
|
data/AUTHORS.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# recls.Ruby - Authors <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Major Contributors
|
|
5
|
+
|
|
6
|
+
| Name | GitHub |
|
|
7
|
+
| ----------- | --------------------------------- |
|
|
8
|
+
| Matt Wilson | [mwsis](https://github.com/mwsis) |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Defect reports, fixes and suggestions (for which we are very grateful)
|
|
12
|
+
|
|
13
|
+
| Name | GitHub |
|
|
14
|
+
| ----------- | --------------------------------- |
|
|
15
|
+
| \<none> | |
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Contributions are welcomed.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
<!-- ########################### end of file ########################### -->
|
data/CHANGES.md
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# recls.Ruby - Changes <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## 2.13.4 - 19th August 2026
|
|
5
|
+
|
|
6
|
+
* renamed **recls.gemspec** to **recls-ruby.gemspec** so the filename stem matches `spec.name`;
|
|
7
|
+
* expanded **recls-ruby.gemspec** `spec.summary` to the README tagline; packaged **CONTRIBUTING**, **FAQ**, **INSTALL**, and **SECURITY**; **Gemfile.lock** and **.ruby-version** excluded from `spec.files`;
|
|
8
|
+
* **Gemfile** sets `lockfile false` when Bundler supports it; stop tracking **Gemfile.lock** (already gitignored);
|
|
9
|
+
* CI uses `bundler-cache: false` then `bundle install` because Bundler 4 writes no lockfile and **ruby/setup-ruby** cache cats **Gemfile.lock**; **Warnings** job now runs on Ruby **3.4**;
|
|
10
|
+
* updated **run_all_unit_tests.sh** (from https://github.com/synesissoftware/misc-dev-scripts) to skip **tput** when **$TERM** is unset or stdout is not a TTY;
|
|
11
|
+
* **EXAMPLES.md** example links are repo-relative (`./examples/…`);
|
|
12
|
+
* updated **README.md** afferent dependents and related-project lists;
|
|
13
|
+
* expanded **README.md** tagline/introduction and **recls-ruby.gemspec** summary/description so the library is understandable without prior knowledge of **recls**;
|
|
14
|
+
* bumped **VERSION** to **2.13.4**;
|
|
15
|
+
* **README.md** afferent runtime dependents now include **oss-src-tools**;
|
|
16
|
+
* TODO: CI `on.push.branches` is the canonical seven names (dropped **bp-2**);
|
|
17
|
+
* **README.md** Installation now shows `require 'recls'`; **recls-ruby.gemspec** `add_development_dependency` follows `spec.files`;
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## 2.13.3 - 13th August 2026 (internal release only)
|
|
21
|
+
|
|
22
|
+
* added `# frozen_string_literal: true` to all **lib/** sources;
|
|
23
|
+
* documentation and project-boilerplate modernisation;
|
|
24
|
+
* added **AUTHORS.md**, **NEWS.md**, and **TODO.md**;
|
|
25
|
+
* completed **.github/workflows/ruby.yml** (OS × Ruby matrix, gem smoke, warnings job);
|
|
26
|
+
* implemented **Rakefile** `test` / `default` tasks;
|
|
27
|
+
* fixed **recls.gemspec** homepage/metadata to **recls.Ruby** (HTTPS);
|
|
28
|
+
* fixed `Recls.combine_paths` array slice to remain compatible with Ruby 1.9.3–2.5 (no endless ranges);
|
|
29
|
+
* warnings CI job now runs via `bundle exec` so development gems (e.g. **xqsr3**) are loadable;
|
|
30
|
+
* Ruby 4+ (incl. MinGW): pull in **fiddle** from the **Gemfile** (no longer a default gem; still required on Windows);
|
|
31
|
+
* documented the Ruby 4+ Windows **fiddle** requirement in **README.md** (**Installation** and **Dependencies**);
|
|
32
|
+
* Ruby 4+ (incl. MinGW): `Recls::Ximpl::FileStat` no longer subclasses `File::Stat` (avoids `TypeError: wrong instance allocation`);
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## 2.13.2 - 25th April 2025
|
|
36
|
+
|
|
37
|
+
* fixed `Recls.combine_paths` for combining `Recls::Entry` instance(s) that may be directories;
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## 2.13.1 - 2nd June 2024
|
|
41
|
+
|
|
42
|
+
* Windows-specific functionality now compatible with Ruby v2+;
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## 2.13.0.1 - 21st April 2024
|
|
46
|
+
|
|
47
|
+
* substantial documentation improvements;
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## 2.13.0 - 20th April 2024
|
|
51
|
+
|
|
52
|
+
* full support for `Recls::Entry` to "act as" a `String` (via its extant attribute `#to_str`), particularly to enable instances to be used in unit-test assertion statements;
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## 2.12.0.1 - 20th April 2024
|
|
56
|
+
|
|
57
|
+
* added module methods `Recls.windows?`;
|
|
58
|
+
* compatibility with **cygwin**;
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
## 2.11.0.3 - 20th April 2024
|
|
62
|
+
|
|
63
|
+
* documentation improvements;
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## 2.11.0.2 - 20th April 2024
|
|
67
|
+
|
|
68
|
+
* more canonicalisation of code;
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## 2.11.0.1 - 20th April 2024
|
|
72
|
+
|
|
73
|
+
* canonicalisation of code;
|
|
74
|
+
* preparatory changes (for imminent work);
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
## 2.11.0 - 26th May 2020
|
|
78
|
+
|
|
79
|
+
* added alias `Recls::Entry#dir?` for `Recls::Entry#directory?`;
|
|
80
|
+
* added **test/scratch/test_pattern_arrays.rb**;
|
|
81
|
+
* improved **CHANGES.md** markup;
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
## 2.10.1 - 14th April 2019
|
|
85
|
+
|
|
86
|
+
* fixed (Windows-only) defect whereby searching for both `DIRECTORIES` and `FILES` caused nothing to be found;
|
|
87
|
+
* added **examples/find_files_and_directories.rb**;
|
|
88
|
+
* added **examples/find_files_and_directories.recursive.rb**;
|
|
89
|
+
* added explanatory .md files for all examples;
|
|
90
|
+
* making examples executable;
|
|
91
|
+
* hiding private/impl constructs from YARD;
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## 2.10.0 - 14th April 2019
|
|
95
|
+
|
|
96
|
+
* added `Recls::absolute_path?`;
|
|
97
|
+
* added `Recls::exist?`;
|
|
98
|
+
* wholesale documentation markup improvements;
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
## 2.9.3 - 29th October 2018
|
|
102
|
+
|
|
103
|
+
* Recls.derive_relative_path() : ~ fix to defect when '.' is source;
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## 2.9.2 - 19th October 2018
|
|
107
|
+
|
|
108
|
+
* warnings;
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
## 2.9.1 - 11th April 2019
|
|
112
|
+
|
|
113
|
+
* various tidyings;
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## 2.9.0 - 21st March 2019
|
|
117
|
+
|
|
118
|
+
* compatibility with Ruby versions 1.9.3+;
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## 2.8.5 - 28th January 2019
|
|
122
|
+
|
|
123
|
+
* capturing more of the extant behaviour in tests;
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## 2.8.4 - 21st January 2019
|
|
127
|
+
|
|
128
|
+
* sorting out dependencies;
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
## 2.8.3 - 9th July 2018
|
|
132
|
+
|
|
133
|
+
* ensuring utility methods - absolute_path(), canonicalise_path(), combine_paths() - work correctly if passed Recls::Entry arguments;
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
## 2.8.2 - 5th February 2018
|
|
137
|
+
|
|
138
|
+
* merge;
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
## 2.8.1 - 27th January 2018
|
|
142
|
+
|
|
143
|
+
* Recls.combine_paths() now takes multiple path part parameters;
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
## 2.7.6 - 23rd January 2018
|
|
147
|
+
|
|
148
|
+
* version;
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
## 2.7.5 - 22nd June 2017
|
|
152
|
+
|
|
153
|
+
* fixed debug-visible warnings;
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## 2.7.4 - 30th October 2016
|
|
157
|
+
|
|
158
|
+
* merge;
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
## 2.7.3 - 11th July 2016
|
|
162
|
+
|
|
163
|
+
* Recls::Entry properties now work, and return falsy-ish values, when executed on DETAILS_LATER non-existent entry;
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## 2.7.2 - 18th June 2016
|
|
167
|
+
|
|
168
|
+
* fixed frozen string problem;
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
## 2.7.1 - 13th June 2016
|
|
172
|
+
|
|
173
|
+
* gem now 'recls-ruby' (rather than 'recls');
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
## 2.6.5 - 9th June 2016
|
|
177
|
+
|
|
178
|
+
* build_gem.sh;
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
## 2.6.4 - 31st May 2016
|
|
182
|
+
|
|
183
|
+
* fixed gemspec details;
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
## 2.6.3 - 18th April 2016
|
|
187
|
+
|
|
188
|
+
* merge;
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
## 2.6.2 - 29th December 2015
|
|
192
|
+
|
|
193
|
+
* implemented Recls::Entry.file_short_name and added Recls::Entry.short_path;
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
## 2.3.8 - 5th February 2018
|
|
197
|
+
|
|
198
|
+
* tagged release;
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
## 2.3.7 - 1st November 2015
|
|
202
|
+
|
|
203
|
+
* removed bodgy catch-all;
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
## 2.3.1 - 27th August 2015
|
|
207
|
+
|
|
208
|
+
* v2.3 : + added Recls::Entry.nlink attribute, and implemented dev and ino for Windows;
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
## 0.8.3 - 9th July 2018
|
|
212
|
+
|
|
213
|
+
* ensuring utility methods - absolute_path(), canonicalise_path(), combine_paths() - work correctly if passed Recls::Entry arguments;
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
<!-- ########################### end of file ########################### -->
|
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# recls.Ruby - Contributing <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Table of Contents <!-- omit in toc -->
|
|
5
|
+
|
|
6
|
+
- [Defects and features](#defects-and-features)
|
|
7
|
+
- [Pull requests](#pull-requests)
|
|
8
|
+
- [Tests](#tests)
|
|
9
|
+
- [License](#license)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Defects and features
|
|
13
|
+
|
|
14
|
+
Open an issue on https://github.com/synesissoftware/recls.Ruby/issues.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Pull requests
|
|
18
|
+
|
|
19
|
+
Pull requests are welcome on https://github.com/synesissoftware/recls.Ruby. Keep diffs local to the change; match existing indentation (2 spaces in Ruby) and the Synesis markdown set (**README.md**, **CHANGES.md**, **NEWS.md**, **TODO.md**, **INSTALL.md**, **CONTRIBUTING.md**, **SECURITY.md**).
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Tests
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
bundle exec rake test
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
or `./run_all_unit_tests.sh`.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## License
|
|
32
|
+
|
|
33
|
+
Contributions are accepted under the 3-clause BSD license. See [LICENSE](./LICENSE).
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<!-- ########################### end of file ########################### -->
|
data/EXAMPLES.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# recls.Ruby - Examples <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
|Name|Source & Description|Summary|
|
|
4
|
+
|---|---|---|
|
|
5
|
+
|**find_files_and_directories**|[examples/find_files_and_directories.rb](./examples/find_files_and_directories.rb)<br/>[examples/find_files_and_directories.md](./examples/find_files_and_directories.md)|Illustrates non-recursive finding of FILES, then DIRECTORIES, then both|
|
|
6
|
+
|**find_files_and_directories.recursive**|[examples/find_files_and_directories.recursive.rb](./examples/find_files_and_directories.recursive.rb)<br/>[examples/find_files_and_directories.recursive.md](./examples/find_files_and_directories.recursive.md)|Illustrates recursive finding of FILES, then DIRECTORIES, then both|
|
|
7
|
+
|**show_hidden_files**|[examples/show_hidden_files.rb](./examples/show_hidden_files.rb)<br/>[examples/show_hidden_files.md](./examples/show_hidden_files.md)|Illustrates searching of hidden files|
|
|
8
|
+
|**show_readonly_files**|[examples/show_readonly_files.rb](./examples/show_readonly_files.rb)<br/>[examples/show_readonly_files.md](./examples/show_readonly_files.md)|Illustrates searching of read-only files|
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<!-- ########################### end of file ########################### -->
|
data/FAQ.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# recls.Ruby - FAQ <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
The FAQ list is under (constant) development. If you post a question on the
|
|
4
|
+
[Issues](https://github.com/synesissoftware/recls.Ruby/issues) forum
|
|
5
|
+
it will be used to create one.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Table of Contents <!-- omit in toc -->
|
|
9
|
+
|
|
10
|
+
- [Q1: "How do I install this library?"](#q1-how-do-i-install-this-library)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# FAQs: <!-- omit in toc -->
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Q1: "How do I install this library?"
|
|
17
|
+
|
|
18
|
+
Install via **gem**:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
gem install recls-ruby
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
See [README.md](./README.md) for usage.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<!-- ########################### end of file ########################### -->
|
data/INSTALL.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# recls.Ruby - Installation and Use <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Table of Contents <!-- omit in toc -->
|
|
5
|
+
|
|
6
|
+
- [Install the gem](#install-the-gem)
|
|
7
|
+
- [From a source checkout](#from-a-source-checkout)
|
|
8
|
+
- [Using the library](#using-the-library)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Install the gem
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
gem install recls-ruby
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
or add to a **Gemfile**:
|
|
18
|
+
|
|
19
|
+
```Ruby
|
|
20
|
+
gem 'recls-ruby'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
then `bundle install`.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## From a source checkout
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
bundle install
|
|
30
|
+
bundle exec rake test
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Using the library
|
|
35
|
+
|
|
36
|
+
```Ruby
|
|
37
|
+
require 'recls'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
<!-- ########################### end of file ########################### -->
|
data/LICENSE
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
recls.Ruby - BSD 3-Clause License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2019-
|
|
3
|
+
Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems
|
|
4
4
|
Copyright (c) 2003-2019, Matthew Wilson and Synesis Software
|
|
5
|
-
|
|
6
5
|
All rights reserved.
|
|
7
6
|
|
|
8
7
|
Redistribution and use in source and binary forms, with or without
|
|
@@ -15,9 +14,8 @@ modification, are permitted provided that the following conditions are met:
|
|
|
15
14
|
this list of conditions and the following disclaimer in the documentation
|
|
16
15
|
and/or other materials provided with the distribution.
|
|
17
16
|
|
|
18
|
-
3. Neither the names of
|
|
19
|
-
|
|
20
|
-
its contributors may be used to endorse or promote products derived from
|
|
17
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
18
|
+
contributors may be used to endorse or promote products derived from
|
|
21
19
|
this software without specific prior written permission.
|
|
22
20
|
|
|
23
21
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
data/NEWS.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# recls.Ruby - News <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
| Date | News Item |
|
|
4
|
+
| ------------------ | ---------------------------------------------------------------------------------------------- |
|
|
5
|
+
| 19th August 2026 | [**recls.Ruby** 2.13.4](https://github.com/synesissoftware/recls.Ruby/releases/tag/2.13.4) |
|
|
6
|
+
| 25th April 2025 | [**recls.Ruby** 2.13.2](https://github.com/synesissoftware/recls.Ruby/releases/tag/2.13.2) |
|
|
7
|
+
| 2nd June 2024 | [**recls.Ruby** 2.13.1](https://github.com/synesissoftware/recls.Ruby/releases/tag/2.13.1) |
|
|
8
|
+
| 21st April 2024 | **recls.Ruby** 2.13.0.1 released |
|
|
9
|
+
| 20th April 2024 | [**recls.Ruby** 2.13.0](https://github.com/synesissoftware/recls.Ruby/releases/tag/2.13.0) |
|
|
10
|
+
| 20th April 2024 | [**recls.Ruby** 2.12.0.1](https://github.com/synesissoftware/recls.Ruby/releases/tag/2.12.0.1) |
|
|
11
|
+
| 20th April 2024 | **recls.Ruby** 2.11.0.3 released |
|
|
12
|
+
| 20th April 2024 | **recls.Ruby** 2.11.0.2 released |
|
|
13
|
+
| 20th April 2024 | **recls.Ruby** 2.11.0.1 released |
|
|
14
|
+
| 26th May 2020 | [**recls.Ruby** 2.11.0](https://github.com/synesissoftware/recls.Ruby/releases/tag/2.11.0) |
|
|
15
|
+
| 14th April 2019 | [**recls.Ruby** 2.10.1](https://github.com/synesissoftware/recls.Ruby/releases/tag/2.10.1) |
|
|
16
|
+
| 14th April 2019 | [**recls.Ruby** 2.10.0](https://github.com/synesissoftware/recls.Ruby/releases/tag/2.10.0) |
|
|
17
|
+
| 11th April 2019 | **recls.Ruby** 2.9.1 released |
|
|
18
|
+
| 21st March 2019 | **recls.Ruby** 2.9.0 released |
|
|
19
|
+
| 28th January 2019 | **recls.Ruby** 2.8.5 released |
|
|
20
|
+
| 21st January 2019 | **recls.Ruby** 2.8.4 released |
|
|
21
|
+
| 29th October 2018 | **recls.Ruby** 2.9.3 released |
|
|
22
|
+
| 19th October 2018 | **recls.Ruby** 2.9.2 released |
|
|
23
|
+
| 9th July 2018 | **recls.Ruby** 2.8.3 released |
|
|
24
|
+
| 9th July 2018 | **recls.Ruby** 0.8.3 released |
|
|
25
|
+
| 5th February 2018 | **recls.Ruby** 2.8.2 released |
|
|
26
|
+
| 5th February 2018 | **recls.Ruby** 2.3.8 released |
|
|
27
|
+
| 27th January 2018 | **recls.Ruby** 2.8.1 released |
|
|
28
|
+
| 23rd January 2018 | **recls.Ruby** 2.7.6 released |
|
|
29
|
+
| 22nd June 2017 | **recls.Ruby** 2.7.5 released |
|
|
30
|
+
| 30th October 2016 | **recls.Ruby** 2.7.4 released |
|
|
31
|
+
| 11th July 2016 | **recls.Ruby** 2.7.3 released |
|
|
32
|
+
| 18th June 2016 | **recls.Ruby** 2.7.2 released |
|
|
33
|
+
| 13th June 2016 | **recls.Ruby** 2.7.1 released |
|
|
34
|
+
| 9th June 2016 | **recls.Ruby** 2.6.5 released |
|
|
35
|
+
| 31st May 2016 | **recls.Ruby** 2.6.4 released |
|
|
36
|
+
| 18th April 2016 | **recls.Ruby** 2.6.3 released |
|
|
37
|
+
| 29th December 2015 | **recls.Ruby** 2.6.2 released |
|
|
38
|
+
| 1st November 2015 | **recls.Ruby** 2.3.7 released |
|
|
39
|
+
| 27th August 2015 | **recls.Ruby** 2.3.1 released |
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<!-- ########################### end of file ########################### -->
|
data/README.md
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
# recls.Ruby <!-- omit in toc -->
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The platform-independent recursive file-system search library, for Ruby.
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
5
7
|
[](https://badge.fury.io/rb/recls-ruby)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Introduction
|
|
9
|
-
|
|
10
|
-
**recls** stands for **rec**-ursive **ls**. The first recls library was a C
|
|
11
|
-
library with a C++ wrapper. There have been several implementations in other
|
|
12
|
-
languages. **recls.Ruby** is the Ruby version.
|
|
8
|
+
[](https://github.com/synesissoftware/recls.Ruby/commits/master)
|
|
9
|
+
[](https://github.com/synesissoftware/recls.Ruby/actions/workflows/ruby.yml)
|
|
13
10
|
|
|
14
11
|
|
|
15
12
|
## Table of Contents <!-- omit in toc -->
|
|
@@ -24,16 +21,44 @@ languages. **recls.Ruby** is the Ruby version.
|
|
|
24
21
|
- [Where to get help](#where-to-get-help)
|
|
25
22
|
- [Contribution guidelines](#contribution-guidelines)
|
|
26
23
|
- [Dependencies](#dependencies)
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
- [Efferent (fan-out)](#efferent-fan-out)
|
|
25
|
+
- [Runtime Dependencies (aka "Normal Dependencies")](#runtime-dependencies-aka-normal-dependencies)
|
|
26
|
+
- [Development Dependencies](#development-dependencies)
|
|
27
|
+
- [Afferent (fan-in)](#afferent-fan-in)
|
|
28
|
+
- [Runtime dependents](#runtime-dependents)
|
|
29
|
+
- [Development dependents](#development-dependents)
|
|
29
30
|
- [Related projects](#related-projects)
|
|
30
31
|
- [License](#license)
|
|
31
|
-
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Introduction
|
|
35
|
+
|
|
36
|
+
**recls.Ruby** searches the file system from Ruby and returns each hit as a rich **Recls::Entry** — not just a path string. Use it to list files and directories in one directory (`Recls.search`) or recursively (`Recls.rsearch`), optionally filtered by wildcards and type flags (files, directories, hidden, read-only, and so on). Each entry exposes path components (drive, directory parts, stem, extension), nature (`file?`, `directory?`, `link?`, …), size, and timestamps, including Windows-only attributes where they exist.
|
|
37
|
+
|
|
38
|
+
It also provides path utilities (`Recls.absolute_path`, `Recls.combine_paths`, `Recls.canonicalise_path`, `Recls.derive_relative_path`) and existence/type probes (`Recls.exist?`, `Recls.file?`, `Recls.directory?`, `Recls.stat`) so client code can stay on one API rather than mixing `Dir`, `File`, `Find`, and `Pathname`.
|
|
39
|
+
|
|
40
|
+
**recls** stands for **rec**-ursive **ls**. The original library was C with a C++ wrapper; this gem is the Ruby implementation. Other language ports are listed under [Related projects](#related-projects).
|
|
32
41
|
|
|
33
42
|
|
|
34
43
|
## Installation
|
|
35
44
|
|
|
36
|
-
Install
|
|
45
|
+
Install via **gem** as in:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
gem install recls-ruby
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
or add it to your `Gemfile`.
|
|
52
|
+
|
|
53
|
+
**recls.Ruby** requires Ruby **1.9.3+**.
|
|
54
|
+
|
|
55
|
+
Use is via ``require``, as in:
|
|
56
|
+
|
|
57
|
+
```Ruby
|
|
58
|
+
require 'recls'
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
> **NOTE**: On **Windows** with **Ruby 4+**, also install [**fiddle**](https://rubygems.org/gems/fiddle) (`gem install fiddle`, or `gem 'fiddle'` in your Gemfile). See [Runtime Dependencies](#runtime-dependencies-aka-normal-dependencies).
|
|
37
62
|
|
|
38
63
|
|
|
39
64
|
## Components
|
|
@@ -41,12 +66,18 @@ Install using `gem install recls-ruby` or add it to your `Gemfile`.
|
|
|
41
66
|
The main components of **recls.Ruby** are:
|
|
42
67
|
|
|
43
68
|
* the ``Recls`` module; and
|
|
44
|
-
* the ``Recls::Entry`` class
|
|
69
|
+
* the ``Recls::Entry`` class.
|
|
45
70
|
|
|
46
71
|
|
|
47
72
|
### The ``Recls`` module
|
|
48
73
|
|
|
49
|
-
|
|
74
|
+
The ``Recls`` module is the primary API surface. Significant facilities include:
|
|
75
|
+
|
|
76
|
+
* path utilities — `Recls.absolute_path`, `Recls.absolute_path?`, `Recls.canonicalise_path`, `Recls.combine_paths`, `Recls.derive_relative_path`;
|
|
77
|
+
* existence / type probes — `Recls.directory?`, `Recls.exist?`, `Recls.file?`, `Recls.stat`;
|
|
78
|
+
* search — `Recls.search` (non-recursive) and `Recls.rsearch` (recursive), returning enumerables of ``Recls::Entry``;
|
|
79
|
+
* line-oriented search — `Recls.foreach`;
|
|
80
|
+
* ambient OS helpers — `Recls.windows?`, plus constants such as `Recls::PATH_NAME_SEPARATOR`, `Recls::PATH_SEPARATOR`, and `Recls::WILDCARDS_ALL`.
|
|
50
81
|
|
|
51
82
|
|
|
52
83
|
### The ``Recls::Entry`` class
|
|
@@ -261,11 +292,6 @@ module Recls
|
|
|
261
292
|
end
|
|
262
293
|
end # class Entry
|
|
263
294
|
end # module Recls
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
# ############################## end of file ############################# #
|
|
267
|
-
|
|
268
|
-
|
|
269
295
|
```
|
|
270
296
|
|
|
271
297
|
|
|
@@ -289,37 +315,55 @@ Defect reports, feature requests, and pull requests are welcome on https://githu
|
|
|
289
315
|
|
|
290
316
|
### Dependencies
|
|
291
317
|
|
|
292
|
-
None
|
|
293
318
|
|
|
319
|
+
#### Efferent (fan-out)
|
|
294
320
|
|
|
295
|
-
|
|
321
|
+
Libraries upon which **recls.Ruby** depends:
|
|
296
322
|
|
|
297
|
-
None
|
|
298
323
|
|
|
324
|
+
##### Runtime Dependencies (aka "Normal Dependencies")
|
|
299
325
|
|
|
300
|
-
|
|
326
|
+
* \<none> declared in **recls-ruby.gemspec**;
|
|
301
327
|
|
|
302
|
-
**
|
|
328
|
+
> **NOTE**: On **Windows** with **Ruby 4+**, **fiddle** is required at runtime (`lib/recls/ximpl/windows.rb`) but is no longer a default gem and is not listed in **recls-ruby.gemspec** (so older Rubies in the `[1.9.3, 4)` range still resolve). Install it explicitly, e.g. `gem install fiddle`, or add `gem 'fiddle'` to your Gemfile. This repository’s **Gemfile** pulls it in when `RUBY_VERSION >= '4'`.
|
|
303
329
|
|
|
304
330
|
|
|
305
|
-
|
|
331
|
+
##### Development Dependencies
|
|
306
332
|
|
|
307
|
-
* [**
|
|
308
|
-
* [**
|
|
309
|
-
* [**
|
|
310
|
-
* [**recls.Python**](https://github.com/synesissoftware/recls.Python/)
|
|
333
|
+
* [**rake**](https://rubygems.org/gems/rake);
|
|
334
|
+
* [**test-unit**](https://rubygems.org/gems/test-unit);
|
|
335
|
+
* [**xqsr3**](https://github.com/synesissoftware/xqsr3);
|
|
311
336
|
|
|
312
337
|
|
|
313
|
-
|
|
338
|
+
#### Afferent (fan-in)
|
|
314
339
|
|
|
315
|
-
|
|
340
|
+
Projects that depend on **recls.Ruby**:
|
|
316
341
|
|
|
317
342
|
|
|
318
|
-
|
|
343
|
+
##### Runtime dependents
|
|
319
344
|
|
|
320
|
-
|
|
321
|
-
|
|
345
|
+
* [**oss-src-tools**](https://github.com/mwsis/oss-src-tools);
|
|
346
|
+
* [**recls-helpers.Ruby**](https://github.com/synesissoftware/recls-helpers.Ruby/);
|
|
322
347
|
|
|
323
348
|
|
|
324
|
-
|
|
349
|
+
##### Development dependents
|
|
350
|
+
|
|
351
|
+
* \<none>;
|
|
352
|
+
|
|
325
353
|
|
|
354
|
+
### Related projects
|
|
355
|
+
|
|
356
|
+
* [**recls**](https://github.com/synesissoftware/recls/) — C library with a C++ wrapper;
|
|
357
|
+
* [**recls-helpers.Ruby**](https://github.com/synesissoftware/recls-helpers.Ruby/);
|
|
358
|
+
* [**recls.Go**](https://github.com/synesissoftware/recls.Go/);
|
|
359
|
+
* [**recls.NET**](https://github.com/synesissoftware/recls.NET/);
|
|
360
|
+
* [**recls.Python**](https://github.com/synesissoftware/recls.Python/);
|
|
361
|
+
* [**recls.Rust**](https://github.com/synesissoftware/recls.Rust/);
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
### License
|
|
365
|
+
|
|
366
|
+
**recls.Ruby** is released under the 3-clause BSD license. See [LICENSE](./LICENSE) for details.
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
<!-- ########################### end of file ########################### -->
|
data/Rakefile
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Rakefile for recls.Ruby
|
|
4
|
+
|
|
5
|
+
require 'rake/testtask'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Rake::TestTask.new do |tt|
|
|
9
|
+
|
|
10
|
+
tt.libs << 'lib'
|
|
11
|
+
tt.libs << 'test'
|
|
12
|
+
tt.name = 'test'
|
|
13
|
+
tt.test_files = FileList['test/**/tc_*.rb']
|
|
14
|
+
tt.verbose = true
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
task :default => :test
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# ############################## end of file ############################# #
|
data/SECURITY.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# recls.Ruby - Security <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Table of Contents <!-- omit in toc -->
|
|
5
|
+
|
|
6
|
+
- [Reporting a vulnerability](#reporting-a-vulnerability)
|
|
7
|
+
- [Supported versions](#supported-versions)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Reporting a vulnerability
|
|
11
|
+
|
|
12
|
+
Please report security issues privately via GitHub Security Advisories on https://github.com/synesissoftware/recls.Ruby/security, or by opening an issue if an advisory cannot be filed. Do not attach exploit proofs of concept against third-party systems.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Supported versions
|
|
16
|
+
|
|
17
|
+
| Version | Supported |
|
|
18
|
+
| ------- | --------- |
|
|
19
|
+
| 2.13.x | ✅ |
|
|
20
|
+
| < 2.13 | ❌ |
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<!-- ########################### end of file ########################### -->
|