hookapp 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +46 -63
- data/README.md +1 -1
- data/bin/hook +16 -17
- data/hookapp.gemspec +1 -1
- data/html/App.html +6 -18
- data/html/GLI/Commands/Doc.html +2 -10
- data/html/GLI/Commands/MarkdownDocumentListener.html +8 -214
- data/html/GLI/Commands.html +2 -10
- data/html/GLI.html +2 -10
- data/html/Hook.html +2 -15
- data/html/HookApp.html +16 -292
- data/html/Hooker.html +46 -24
- data/html/README_rdoc.html +3 -6
- data/html/String.html +7 -121
- data/html/created.rid +6 -6
- data/html/css/rdoc.css +21 -1
- data/html/index.html +3 -18
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search_index.js +1 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +7 -71
- data/lib/hook/hookapp.rb +1 -1
- data/lib/hook/hooker.rb +5 -2
- data/lib/hook/version.rb +1 -1
- data/lib/hook.rb +5 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5abee5b7bc7c16e5b6c62d5b2046698345585e65cd1b969a4b83152dd38ce0e
|
4
|
+
data.tar.gz: 29f6e35e120e75e4c7353ecd79287f5c6a434a2d4b18587e4713b97aeab3fd0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9b100c3e4fc1ef06de8143ae6ba1a8f7b18f38cd005a4b8c032f686e6c6aa7ab8d6cc275a8921eb4c00a96beb1c0b1e58617f19a3ec493b57e633f65309a5b2
|
7
|
+
data.tar.gz: a8d3076585337c6be0228098bdd9d02e1bb7794e720ba3e6172b01ea8ca1e090c150287b7da186c622e187c92abc636bf5235572f2528f16ea8c688fe165efb9
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -7,12 +7,6 @@ PATH
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (6.0.3.2)
|
11
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
-
i18n (>= 0.7, < 2)
|
13
|
-
minitest (~> 5.1)
|
14
|
-
tzinfo (~> 1.1)
|
15
|
-
zeitwerk (~> 2.2, >= 2.2.2)
|
16
10
|
aruba (0.14.14)
|
17
11
|
childprocess (>= 0.6.3, < 4.0.0)
|
18
12
|
contracts (~> 0.9)
|
@@ -22,65 +16,54 @@ GEM
|
|
22
16
|
thor (>= 0.19, < 2.0)
|
23
17
|
builder (3.2.4)
|
24
18
|
childprocess (3.0.0)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
cucumber-
|
30
|
-
cucumber-
|
31
|
-
cucumber-
|
32
|
-
cucumber-
|
33
|
-
cucumber-
|
34
|
-
cucumber-
|
35
|
-
|
36
|
-
|
19
|
+
contracts (0.17)
|
20
|
+
cucumber (7.0.0)
|
21
|
+
builder (~> 3.2, >= 3.2.4)
|
22
|
+
cucumber-core (~> 10.0, >= 10.0.1)
|
23
|
+
cucumber-create-meta (~> 6.0, >= 6.0.1)
|
24
|
+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.1)
|
25
|
+
cucumber-gherkin (~> 20.0, >= 20.0.1)
|
26
|
+
cucumber-html-formatter (~> 16.0, >= 16.0.1)
|
27
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
28
|
+
cucumber-wire (~> 6.0, >= 6.0.1)
|
29
|
+
diff-lcs (~> 1.4, >= 1.4.4)
|
30
|
+
mime-types (~> 3.3, >= 3.3.1)
|
37
31
|
multi_test (~> 0.1, >= 0.1.2)
|
38
|
-
sys-uname (~> 1.
|
39
|
-
cucumber-core (
|
40
|
-
cucumber-gherkin (~>
|
41
|
-
cucumber-messages (~>
|
42
|
-
cucumber-tag-expressions (~>
|
43
|
-
cucumber-create-meta (
|
44
|
-
cucumber-messages (~>
|
45
|
-
sys-uname (~> 1.2, >= 1.2.
|
46
|
-
cucumber-cucumber-expressions (
|
47
|
-
cucumber-gherkin (
|
48
|
-
cucumber-messages (~>
|
49
|
-
cucumber-html-formatter (
|
50
|
-
cucumber-messages (~>
|
51
|
-
cucumber-messages (
|
52
|
-
|
53
|
-
cucumber-
|
54
|
-
|
55
|
-
cucumber-
|
56
|
-
cucumber-
|
57
|
-
|
58
|
-
|
59
|
-
ffi (1.13.1)
|
32
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
33
|
+
cucumber-core (10.0.1)
|
34
|
+
cucumber-gherkin (~> 20.0, >= 20.0.1)
|
35
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
36
|
+
cucumber-tag-expressions (~> 3.0, >= 3.0.1)
|
37
|
+
cucumber-create-meta (6.0.1)
|
38
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
39
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
40
|
+
cucumber-cucumber-expressions (12.1.3)
|
41
|
+
cucumber-gherkin (20.0.1)
|
42
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
43
|
+
cucumber-html-formatter (16.0.1)
|
44
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
45
|
+
cucumber-messages (17.1.1)
|
46
|
+
cucumber-tag-expressions (3.0.1)
|
47
|
+
cucumber-wire (6.1.1)
|
48
|
+
cucumber-core (~> 10.0, >= 10.0.1)
|
49
|
+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.2)
|
50
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
51
|
+
diff-lcs (1.4.4)
|
52
|
+
ffi (1.15.4)
|
60
53
|
gli (2.19.0)
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
minitest (5.14.1)
|
54
|
+
mime-types (3.3.1)
|
55
|
+
mime-types-data (~> 3.2015)
|
56
|
+
mime-types-data (3.2021.0901)
|
65
57
|
multi_test (0.1.2)
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
thor
|
70
|
-
thread_safe
|
71
|
-
rake (13.0.1)
|
72
|
-
rdoc (6.1.2)
|
73
|
-
rspec-expectations (3.9.2)
|
58
|
+
rake (13.0.6)
|
59
|
+
rdoc (6.3.2)
|
60
|
+
rspec-expectations (3.10.1)
|
74
61
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
-
rspec-support (~> 3.
|
76
|
-
rspec-support (3.
|
77
|
-
sys-uname (1.2.
|
78
|
-
ffi (
|
79
|
-
thor (1.0
|
80
|
-
thread_safe (0.3.6)
|
81
|
-
tzinfo (1.2.7)
|
82
|
-
thread_safe (~> 0.1)
|
83
|
-
zeitwerk (2.3.1)
|
62
|
+
rspec-support (~> 3.10.0)
|
63
|
+
rspec-support (3.10.2)
|
64
|
+
sys-uname (1.2.2)
|
65
|
+
ffi (~> 1.1)
|
66
|
+
thor (1.1.0)
|
84
67
|
|
85
68
|
PLATFORMS
|
86
69
|
ruby
|
@@ -89,7 +72,7 @@ DEPENDENCIES
|
|
89
72
|
aruba (~> 0.14.14)
|
90
73
|
hookapp!
|
91
74
|
rake (~> 13.0.1)
|
92
|
-
rdoc (~> 6.
|
75
|
+
rdoc (~> 6.3.2)
|
93
76
|
|
94
77
|
BUNDLED WITH
|
95
|
-
2.
|
78
|
+
2.2.24
|
data/README.md
CHANGED
data/bin/hook
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require 'gli'
|
5
4
|
require 'hook'
|
6
5
|
|
7
6
|
# Main class for GLI app
|
@@ -19,7 +18,7 @@ class App
|
|
19
18
|
subcommand_option_handling :normal
|
20
19
|
arguments :strict
|
21
20
|
|
22
|
-
|
21
|
+
hookapp = nil
|
23
22
|
|
24
23
|
desc 'List hooks on a file or url'
|
25
24
|
long_desc %{
|
@@ -46,12 +45,12 @@ Run `hook list` with no file/url argument to list all bookmarks.}
|
|
46
45
|
|
47
46
|
c.action do |_global_options, options, args|
|
48
47
|
if options[:s]
|
49
|
-
return
|
48
|
+
return hookapp.open_linked(args[0])
|
50
49
|
end
|
51
|
-
valid_format =
|
50
|
+
valid_format = hookapp.validate_format(options[:o], valid_formats)
|
52
51
|
exit_now!("Invalid output format: \"#{options[:o]}\"", 6) unless valid_format
|
53
52
|
|
54
|
-
result =
|
53
|
+
result = hookapp.linked_bookmarks(args, { files_only: options[:f],
|
55
54
|
format: valid_format,
|
56
55
|
null_separator: options[:null] })
|
57
56
|
|
@@ -111,10 +110,10 @@ Run `hook find` with no search argument to list all bookmarks.}
|
|
111
110
|
c.switch %i[n names_only], { negatable: false, default_value: false }
|
112
111
|
|
113
112
|
c.action do |_global_options, options, args|
|
114
|
-
valid_format =
|
113
|
+
valid_format = hookapp.validate_format(options[:o], valid_formats)
|
115
114
|
exit_now!("Invalid output format: \"#{options[:o]}\"", 6) unless valid_format
|
116
115
|
|
117
|
-
result =
|
116
|
+
result = hookapp.search_bookmarks(args.join(" "), { files_only: options[:f],
|
118
117
|
format: valid_format,
|
119
118
|
null_separator: options[:null],
|
120
119
|
names_only: options[:n] })
|
@@ -151,9 +150,9 @@ to be combined with one or more file/url arguments.
|
|
151
150
|
exit_now!('Wrong number of arguments. At least 2 files must be specified, or one file with --paste', 5)
|
152
151
|
end
|
153
152
|
if options[:a]
|
154
|
-
puts
|
153
|
+
puts hookapp.link_all(args)
|
155
154
|
else
|
156
|
-
puts
|
155
|
+
puts hookapp.link_files(args)
|
157
156
|
end
|
158
157
|
end
|
159
158
|
end
|
@@ -177,9 +176,9 @@ or to paste into another app as a link. Use the -m flag to copy a full Markdown
|
|
177
176
|
exit_now!('Wrong number of arguments. Requires a path/url or -a APP_NAME', 5) if args.length != 1 && !options[:a]
|
178
177
|
|
179
178
|
if options[:a]
|
180
|
-
puts
|
179
|
+
puts hookapp.bookmark_from_app(options[:a], { copy: true, markdown: options[:m] })
|
181
180
|
else
|
182
|
-
puts
|
181
|
+
puts hookapp.clip_bookmark(args[0], { markdown: options[:m] })
|
183
182
|
end
|
184
183
|
end
|
185
184
|
end
|
@@ -202,7 +201,7 @@ Use -m to get the response as Markdown, and/or -c to copy the result directly to
|
|
202
201
|
c.action do |_global_options, options, args|
|
203
202
|
exit_now!("Wrong number of arguments (1 expected, #{args.length} given)", 5) if args.length != 1
|
204
203
|
|
205
|
-
puts
|
204
|
+
puts hookapp.bookmark_from_app(args[0], { copy: options[:c], markdown: options[:m] })
|
206
205
|
end
|
207
206
|
end
|
208
207
|
|
@@ -218,7 +217,7 @@ If --all isn't specified, exactly two arguments (Files/URLs) are required.
|
|
218
217
|
c.switch %i[a all], { negatable: false, default_value: false }
|
219
218
|
|
220
219
|
c.action do |_global_options, options, args|
|
221
|
-
result =
|
220
|
+
result = hookapp.delete_hooks(args, { all: options[:a] })
|
222
221
|
puts result
|
223
222
|
end
|
224
223
|
end
|
@@ -232,7 +231,7 @@ Copy all the files and urls that the first file is hooked to onto another file.
|
|
232
231
|
c.action do |_global_options, _options, args|
|
233
232
|
exit_now!("Wrong number of arguments. Two file paths or urls required (#{args.length} given)", 5) if args.length != 2
|
234
233
|
|
235
|
-
result =
|
234
|
+
result = hookapp.clone_hooks(args)
|
236
235
|
puts result
|
237
236
|
end
|
238
237
|
end
|
@@ -248,7 +247,7 @@ filetype by macOS. Allows multiple selections with tab key, and type-ahead fuzzy
|
|
248
247
|
c.action do |_global_options, _options, args|
|
249
248
|
exit_now!("Wrong number of arguments. One file path or url required (#{args.length} given)", 5) if args.length != 1
|
250
249
|
|
251
|
-
|
250
|
+
hookapp.open_linked(args[0])
|
252
251
|
end
|
253
252
|
end
|
254
253
|
|
@@ -261,7 +260,7 @@ Opens Hook.app on the specified file/URL for browsing and performing actions. Ex
|
|
261
260
|
c.action do |_global_options, _options, args|
|
262
261
|
exit_now!("Wrong number of arguments. One file path or url required (#{args.length} given)", 5) if args.length != 1
|
263
262
|
|
264
|
-
|
263
|
+
hookapp.open_gui(args[0])
|
265
264
|
end
|
266
265
|
end
|
267
266
|
|
@@ -271,7 +270,7 @@ Opens Hook.app on the specified file/URL for browsing and performing actions. Ex
|
|
271
270
|
# chosen command
|
272
271
|
# Use skips_pre before a command to skip this block
|
273
272
|
# on that command only
|
274
|
-
|
273
|
+
hookapp = HookApp.new
|
275
274
|
true
|
276
275
|
end
|
277
276
|
|
data/hookapp.gemspec
CHANGED
@@ -18,6 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables << 'hook'
|
19
19
|
s.add_development_dependency('aruba', '~> 0.14.14')
|
20
20
|
s.add_development_dependency('rake', '~> 13.0.1')
|
21
|
-
s.add_development_dependency('rdoc', '~> 6.
|
21
|
+
s.add_development_dependency('rdoc', '~> 6.3.2')
|
22
22
|
s.add_runtime_dependency('gli', '2.19.0')
|
23
23
|
end
|
data/html/App.html
CHANGED
@@ -21,8 +21,6 @@
|
|
21
21
|
<link href="./css/rdoc.css" rel="stylesheet">
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
24
|
<body id="top" role="document" class="class">
|
27
25
|
<nav role="navigation">
|
28
26
|
<div id="project-navigation">
|
@@ -59,24 +57,20 @@
|
|
59
57
|
|
60
58
|
<div id="class-metadata">
|
61
59
|
|
62
|
-
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
63
62
|
<h3>Parent</h3>
|
64
63
|
|
65
|
-
|
66
64
|
<p class="link">Object
|
67
|
-
|
68
65
|
</div>
|
69
66
|
|
70
67
|
|
71
|
-
|
68
|
+
|
69
|
+
<div id="extends-section" class="nav-section">
|
72
70
|
<h3>Extended With Modules</h3>
|
73
71
|
|
74
72
|
<ul class="link-list">
|
75
|
-
|
76
|
-
|
77
73
|
<li><span class="extend">GLI::App</span>
|
78
|
-
|
79
|
-
|
80
74
|
</ul>
|
81
75
|
</div>
|
82
76
|
|
@@ -95,25 +89,19 @@
|
|
95
89
|
|
96
90
|
</section>
|
97
91
|
|
98
|
-
|
99
92
|
<section id="5Buntitled-5D" class="documentation-section">
|
100
|
-
|
101
93
|
|
102
|
-
|
103
94
|
|
104
|
-
|
105
95
|
|
106
|
-
|
107
96
|
|
108
|
-
|
109
|
-
</section>
|
110
97
|
|
98
|
+
</section>
|
111
99
|
</main>
|
112
100
|
|
113
101
|
|
114
102
|
<footer id="validator-badges" role="contentinfo">
|
115
103
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
116
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.
|
104
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.2.
|
117
105
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
118
106
|
</footer>
|
119
107
|
|
data/html/GLI/Commands/Doc.html
CHANGED
@@ -21,8 +21,6 @@
|
|
21
21
|
<link href="../../css/rdoc.css" rel="stylesheet">
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
24
|
<body id="top" role="document" class="module">
|
27
25
|
<nav role="navigation">
|
28
26
|
<div id="project-navigation">
|
@@ -75,25 +73,19 @@
|
|
75
73
|
|
76
74
|
</section>
|
77
75
|
|
78
|
-
|
79
76
|
<section id="5Buntitled-5D" class="documentation-section">
|
80
|
-
|
81
77
|
|
82
|
-
|
83
78
|
|
84
|
-
|
85
79
|
|
86
|
-
|
87
80
|
|
88
|
-
|
89
|
-
</section>
|
90
81
|
|
82
|
+
</section>
|
91
83
|
</main>
|
92
84
|
|
93
85
|
|
94
86
|
<footer id="validator-badges" role="contentinfo">
|
95
87
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
96
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.
|
88
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.2.
|
97
89
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
98
90
|
</footer>
|
99
91
|
|