hiiro 0.1.168 → 0.1.169
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/bin/h-misc +4 -2
- data/lib/hiiro/paths.rb +5 -0
- data/lib/hiiro/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d9a90de4bbf5f17d90890078b14a3b5ce6eccd4aed9a7c4a7c7b5fc3b7da4f97
|
|
4
|
+
data.tar.gz: 43f9ef18fd88cfdc7a1535dad5c88c6df56c264ff2fcd659d79e0180730e52b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c69d5f1c2a0eacad95e7e8aefd985c31bcbf8ddc3ab29357806706d5da52dc207eeab9010535d1d8aa9191b485d6dc96a7bc81ac4af416e76d50150e5e9fd441
|
|
7
|
+
data.tar.gz: 0fb174d064742171d5592a79c554582856989b6bbfcba5631ddcf7f8526a8789bd26a1a5b1bffab01d53804cb082319935583a475b43661fc155c06bad60ed17
|
data/bin/h-misc
CHANGED
|
@@ -9,6 +9,7 @@ Hiiro.run {
|
|
|
9
9
|
option(:root, short: :r, desc: 'root path')
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
repo_root = Pathname.new(opts.root || git.root)
|
|
12
13
|
pwd = Hiiro::Paths.new(Dir.pwd)
|
|
13
14
|
outside = Hash.new { |h,k| h[k] = [] }
|
|
14
15
|
|
|
@@ -20,9 +21,10 @@ Hiiro.run {
|
|
|
20
21
|
|
|
21
22
|
outside.each do |base, links|
|
|
22
23
|
puts "# symlinks outside of => #{base}"
|
|
23
|
-
dest_width = links.map{|l| l.
|
|
24
|
+
dest_width = links.map{|l| l.dest_relative_to(repo_root).to_s.length }.max
|
|
24
25
|
links.each do |link|
|
|
25
|
-
|
|
26
|
+
rel_dest = link.dest_relative_to(repo_root)
|
|
27
|
+
printf("%-*s # => %s\n", dest_width, rel_dest, link.path)
|
|
26
28
|
end
|
|
27
29
|
end
|
|
28
30
|
end
|
data/lib/hiiro/paths.rb
CHANGED
data/lib/hiiro/version.rb
CHANGED