dorian-dir-and-self 0.1.0

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/bin/dir-and-self +20 -0
  3. metadata +48 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 42a5799d5af063f1059b466225b124ae982b4a6fc424ed578e4d3b209b4e1df9
4
+ data.tar.gz: 8f0eb268fbf8222d576b34fa6549402424fd0cffd926c0bf8c7284cbfdf05c90
5
+ SHA512:
6
+ metadata.gz: d09f54bdece31f6a3fa18abd195fcc4a871f28ac0aec6e636b39ee0eaf04f621f0ab172d78789ba11b3b0ae8f49bb4fb7f40464ea8eee3dc779b2e16838688fa
7
+ data.tar.gz: 8710e512800a78bc6ef57c4b06d94e2d7909b33102d29cf46b07e81a7ec7f3f9f59ad0317efdf2159cf024a3fbad6c2d510b38435b0ea264d5cae32d21098840
data/bin/dir-and-self ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ if ARGV.first == "-h" || ARGV.first == "--help"
5
+ puts "USAGE: dir [PATHS...]"
6
+ exit
7
+ end
8
+
9
+ PATHS = ARGV.any? ? ARGV : ["."]
10
+
11
+ puts PATHS
12
+
13
+ PATHS.each do |path|
14
+ puts(
15
+ Dir
16
+ .glob("#{path}/*")
17
+ .select { |path| Dir.exist?(path) }
18
+ .map { |path| File.basename(path) }
19
+ )
20
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dorian-dir-and-self
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Dorian Marié
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-07-11 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: |-
14
+ List directories and self
15
+
16
+ e.g. `dir-and-self`
17
+ email: dorian@dorianmarie.com
18
+ executables:
19
+ - dir-and-self
20
+ extensions: []
21
+ extra_rdoc_files: []
22
+ files:
23
+ - bin/dir-and-self
24
+ homepage: https://github.com/dorianmariecom/dorian-dir-and-self
25
+ licenses:
26
+ - MIT
27
+ metadata:
28
+ rubygems_mfa_required: 'true'
29
+ post_install_message:
30
+ rdoc_options: []
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubygems_version: 3.5.11
45
+ signing_key:
46
+ specification_version: 4
47
+ summary: List directories and self
48
+ test_files: []