dorian-dir 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/dir +11 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e1523a968b4f4ead263e5a085587c49e12c2e39ad8fa9d546d6843ad84be2f0
|
4
|
+
data.tar.gz: 31b089b9f96e36e447fdb5f7f26e84fd0d5b2bd24fc10caa1d140b51e85d6273
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 270b02d1e7d72f27333de43ef26bc06ccaf9754529e555c68c4008eda4bb1e64220055c6ecfe62d5af505e1f80bcf9e2f26576334c592bcf537e3ecb4c574f2d
|
7
|
+
data.tar.gz: 96cf503446c99f6bf673c6be4eeb1c6331614137acd26f4f2cd6d9e17ea3ab62cf9447c61fd62991b73b734b1fc025406d90532ba6e0df9cad0132ebc3e3f206
|
data/bin/dir
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
if ARGV.
|
5
|
-
puts "USAGE: dir"
|
4
|
+
if ARGV.first == "-h" || ARGV.first == "--help"
|
5
|
+
puts "USAGE: dir [PATHS...]"
|
6
6
|
exit
|
7
7
|
end
|
8
8
|
|
9
|
-
|
9
|
+
PATHS = ARGV.any? ? ARGV : ["."]
|
10
|
+
|
11
|
+
PATHS.each do |path|
|
12
|
+
puts(
|
13
|
+
Dir.glob("#{path}/*").select { |path| Dir.exist?(path) }.map do |path|
|
14
|
+
File.basename(path)
|
15
|
+
end
|
16
|
+
)
|
17
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dorian-dir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Marié
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |-
|
14
14
|
List directories
|