dorian-dir 0.4.0 → 0.5.0

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 +17 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7b8eadb36a8a3c8368e2722f10066bbe8ac135e0000d751dd4dd1184c867665
4
- data.tar.gz: fd91af32c88f26400401f18e8c99210d5ae94b4988854ad2a50a400558c2ae24
3
+ metadata.gz: 80f443fcc3c9e10ca8901a18f316a52dc56e45b67f41b6d920caf1614bede536
4
+ data.tar.gz: 336b91d4af20d12dc4b659cf71a2ad69cba2a76898a1f157c09291fa6c963784
5
5
  SHA512:
6
- metadata.gz: ad05e0cc975fe2a452d0b9b255e8b7159bdd3f5676535035a1915478c16ae7d8600752d32816e8dad7eafac046acb6be56852f91df07662b66e7c376dc80176f
7
- data.tar.gz: 2a6765bcb256de2abaac68f2c9df191e468a9d5cdd32649e9ea971bce6b2e07a4c4606d462d58d91f45cdf14095378c464fe42d83659ec3e9c0ff37300b823f9
6
+ metadata.gz: b3afb5962b36c34ff831ece11a7d07c1aefe9748746e172ac8450fdf98b14ce6336ceb22e2313af9002f1851ba25bc477e0d4c3a9b66fa8de33a83dc42e431c4
7
+ data.tar.gz: b19c640abf843457bfb5707b143240addc240209c4fe5d9b8fd91d65e498cc1aa8e7b3bdd4047aa34eb774e42a2f08fbf48b71f7f5b29c8ba8ac13822004b824
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,15 +1,29 @@
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.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-07-05 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2024-07-11 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'
13
27
  description: |-
14
28
  List directories
15
29