hiiro 0.1.49 → 0.1.50
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-app +15 -9
- 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: bec62fbab5b37a26be0c5ebb4dcd22ab074a34742591639ff307ccd5fced02e8
|
|
4
|
+
data.tar.gz: 8581b7676239c1a528a6d47defe0389b6e4494624e25e7c3978a2c5bc8e92d39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0143e20a9ed37176b309ee43ad2ce9bf2ad64a0f266fa8628f9321581b6c3cd31f250025bacefd941b79e48c9b2da6c931be7895e298ef6a2260539b28d2f07f
|
|
7
|
+
data.tar.gz: 2a37a1b8cc2991154a334aa54b60bb3243f5d3f4776936eb2b6c3b3f8b7166f00e6aafa1374d19faa7fbef535f85d6a1a658be4ff26aad42590ca7d8a4f60ba1
|
data/bin/h-app
CHANGED
|
@@ -56,20 +56,26 @@ Hiiro.run(*ARGV, plugins: [:Tasks]) {
|
|
|
56
56
|
system(editor, APPS_FILE)
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
add_subcmd(:cd) { |app_name|
|
|
59
|
+
add_subcmd(:cd) { |app_name=nil|
|
|
60
|
+
root = git_root || task_root
|
|
61
|
+
|
|
62
|
+
unless root
|
|
63
|
+
puts "Not in a git repo or task - cannot resolve path"
|
|
64
|
+
next
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
if app_name.nil? || app_name.empty?
|
|
68
|
+
send_cd(relative_cd_path(root))
|
|
69
|
+
next
|
|
70
|
+
end
|
|
71
|
+
|
|
60
72
|
apps = load_apps
|
|
61
73
|
match = apps.find { |name, _| name.start_with?(app_name) }
|
|
62
74
|
|
|
63
75
|
if match
|
|
64
76
|
name, app_relative_path = match
|
|
65
|
-
target =
|
|
66
|
-
|
|
67
|
-
if target
|
|
68
|
-
cd_path = relative_cd_path(target)
|
|
69
|
-
send_cd(cd_path)
|
|
70
|
-
else
|
|
71
|
-
puts "Not in a git repo or task - cannot resolve app path"
|
|
72
|
-
end
|
|
77
|
+
target = File.join(root, app_relative_path)
|
|
78
|
+
send_cd(relative_cd_path(target))
|
|
73
79
|
else
|
|
74
80
|
puts "App '#{app_name}' not found"
|
|
75
81
|
puts
|
data/lib/hiiro/version.rb
CHANGED