dorian-dir 0.4.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/dir +12 -14
  3. metadata +19 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7b8eadb36a8a3c8368e2722f10066bbe8ac135e0000d751dd4dd1184c867665
4
- data.tar.gz: fd91af32c88f26400401f18e8c99210d5ae94b4988854ad2a50a400558c2ae24
3
+ metadata.gz: c114a3f06a002b406c6220334fd57fee1ff3c44ad1977b1a25bf2df7f059d928
4
+ data.tar.gz: aaa31552d3e3b8d6e8879ca35b177cde79a7590ba6d5a979f7003934276ca446
5
5
  SHA512:
6
- metadata.gz: ad05e0cc975fe2a452d0b9b255e8b7159bdd3f5676535035a1915478c16ae7d8600752d32816e8dad7eafac046acb6be56852f91df07662b66e7c376dc80176f
7
- data.tar.gz: 2a6765bcb256de2abaac68f2c9df191e468a9d5cdd32649e9ea971bce6b2e07a4c4606d462d58d91f45cdf14095378c464fe42d83659ec3e9c0ff37300b823f9
6
+ metadata.gz: 4960f67fd328395f40a6bdc4a4555389eba723b419fe2b477d2feffaa1e020114f6c468fa25d59d10679bd08b03e379e7f4490f8f297a7a3c71cb847d24f3b82
7
+ data.tar.gz: c3271e1f4d69095c04936ba499319561bdf7147894a33bb440eb24095aedd4ea40abe30a676d5dca46aa506d36e7e73a641df10053c1d43d137d5131b4fad2e3
data/bin/dir CHANGED
@@ -1,18 +1,16 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- if ARGV.first == "-h" || ARGV.first == "--help"
5
- puts "USAGE: dir [PATHS...]"
6
- exit
7
- end
4
+ require "git"
8
5
 
9
- PATHS = ARGV.any? ? ARGV : ["."]
10
-
11
- PATHS.each do |path|
12
- puts(
13
- Dir
14
- .glob("#{path}/*")
15
- .select { |path| Dir.exist?(path) }
16
- .map { |path| File.basename(path) }
17
- )
18
- end
6
+ puts(
7
+ Git
8
+ .open(".")
9
+ .ls_files
10
+ .map(&:first)
11
+ .map { |path| path.split("/").first }
12
+ .select { |path| Dir.exist?(path) }
13
+ .reject { |path| path.start_with?(".") }
14
+ .sort
15
+ .uniq
16
+ )
metadata CHANGED
@@ -1,19 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorian-dir
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.1
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-07-05 00:00:00.000000000 Z
12
- dependencies: []
13
- description: |-
14
- List directories
15
-
16
- e.g. `dir`
11
+ date: 2024-08-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: git
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: list directories
17
28
  email: dorian@dorianmarie.com
18
29
  executables:
19
30
  - dir
@@ -44,5 +55,5 @@ requirements: []
44
55
  rubygems_version: 3.5.11
45
56
  signing_key:
46
57
  specification_version: 4
47
- summary: List directories
58
+ summary: list directories
48
59
  test_files: []