hsume2-aka 0.3.0 → 0.3.1
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/README.md +9 -1
- data/features/aka/help.feature +9 -1
- data/lib/aka/app.rb +24 -1
- data/lib/aka/store.rb +0 -1
- data/lib/aka/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5d026442f9c86fc72053c46721c16483392b992
|
4
|
+
data.tar.gz: c5707953396d050400fa42d4717ce90e21606ff0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d36fdfee6a566e2363e743cee1a83f9c5f370cd1f41c29454b5de026efa6a7590176b63f69256a5bd1627c656275a6e3a4ef5db2147eadff88ba37043a10f0b8
|
7
|
+
data.tar.gz: 6eea6f22ff1654595ccdd695fd4a52cf1d1da49dcb6ff1c46bce4ae3e459020417b97dbb5edd9e6dd0197d983fc2db55d4819b5b1bb649f41752ba04c77864b8
|
data/README.md
CHANGED
@@ -95,7 +95,15 @@ Add a link:
|
|
95
95
|
|
96
96
|
Remove a link:
|
97
97
|
|
98
|
-
$ aka
|
98
|
+
$ aka list
|
99
|
+
...
|
100
|
+
=====
|
101
|
+
Links
|
102
|
+
=====
|
103
|
+
|
104
|
+
[1] ~/.aka.zsh: #osx, #git
|
105
|
+
[2] ~/.aka.zsh: #linux, #git
|
106
|
+
$ aka link delete 2
|
99
107
|
Removed link.
|
100
108
|
|
101
109
|
Synchronize links:
|
data/features/aka/help.feature
CHANGED
@@ -24,12 +24,20 @@ Feature: Help with aka
|
|
24
24
|
aka - Manage Shell Keyboard Shortcuts
|
25
25
|
"""
|
26
26
|
|
27
|
+
Scenario: Get help with invalid arguments
|
28
|
+
When I run `aka -z`
|
29
|
+
Then the exit status should be 64
|
30
|
+
And the output should contain:
|
31
|
+
"""
|
32
|
+
aka - Manage Shell Keyboard Shortcuts
|
33
|
+
"""
|
34
|
+
|
27
35
|
Scenario: Get version
|
28
36
|
When I run `aka --version`
|
29
37
|
Then the exit status should be 0
|
30
38
|
And the output should contain exactly:
|
31
39
|
"""
|
32
|
-
aka version 0.3.
|
40
|
+
aka version 0.3.1
|
33
41
|
|
34
42
|
"""
|
35
43
|
|
data/lib/aka/app.rb
CHANGED
@@ -17,6 +17,25 @@ module Aka
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
def self.go!
|
21
|
+
setup_defaults
|
22
|
+
opts.post_setup
|
23
|
+
opts.parse!
|
24
|
+
opts.check_args!
|
25
|
+
result = call_main
|
26
|
+
if result.kind_of? Fixnum
|
27
|
+
exit result
|
28
|
+
else
|
29
|
+
exit 0
|
30
|
+
end
|
31
|
+
rescue OptionParser::ParseError => ex
|
32
|
+
logger.error ex.message
|
33
|
+
puts
|
34
|
+
store = Aka::Store.new
|
35
|
+
store.help(nil, nil)
|
36
|
+
exit 64 # Linux standard for bad command line
|
37
|
+
end
|
38
|
+
|
20
39
|
main do |command, shortcut, script|
|
21
40
|
if options[:version]
|
22
41
|
puts "aka version #{Aka::VERSION}"
|
@@ -28,7 +47,10 @@ module Aka
|
|
28
47
|
|
29
48
|
store = Aka::Store.new
|
30
49
|
|
31
|
-
|
50
|
+
if options[:help]
|
51
|
+
store.help(command, options)
|
52
|
+
exit
|
53
|
+
end
|
32
54
|
|
33
55
|
case command
|
34
56
|
when 'add'
|
@@ -55,6 +77,7 @@ module Aka
|
|
55
77
|
store.sync(shortcut ? shortcut.to_i : nil)
|
56
78
|
else
|
57
79
|
store.help(command, options)
|
80
|
+
exit
|
58
81
|
end
|
59
82
|
end
|
60
83
|
|
data/lib/aka/store.rb
CHANGED
data/lib/aka/version.rb
CHANGED