hookapp 0.0.7 → 2.0.3

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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/CHANGELOG.md +14 -0
  4. data/Gemfile +1 -1
  5. data/Gemfile.lock +2 -2
  6. data/LICENSE.md +31 -0
  7. data/OVERVIEW.md +80 -0
  8. data/README.md +282 -21
  9. data/Rakefile +1 -1
  10. data/bin/hook +127 -10
  11. data/buildnotes.md +29 -0
  12. data/hook.rdoc +63 -4
  13. data/hookapp.gemspec +9 -8
  14. data/html/App.html +119 -0
  15. data/html/GLI.html +99 -0
  16. data/html/GLI/Commands.html +99 -0
  17. data/html/GLI/Commands/Doc.html +99 -0
  18. data/html/GLI/Commands/MarkdownDocumentListener.html +717 -0
  19. data/html/Hook.html +113 -0
  20. data/html/HookApp.html +1222 -0
  21. data/html/Hooker.html +119 -0
  22. data/html/README_rdoc.html +328 -0
  23. data/html/String.html +427 -0
  24. data/html/created.rid +9 -0
  25. data/html/css/fonts.css +167 -0
  26. data/html/css/rdoc.css +619 -0
  27. data/html/fonts/Lato-Light.ttf +0 -0
  28. data/html/fonts/Lato-LightItalic.ttf +0 -0
  29. data/html/fonts/Lato-Regular.ttf +0 -0
  30. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  31. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  32. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  33. data/html/images/add.png +0 -0
  34. data/html/images/arrow_up.png +0 -0
  35. data/html/images/brick.png +0 -0
  36. data/html/images/brick_link.png +0 -0
  37. data/html/images/bug.png +0 -0
  38. data/html/images/bullet_black.png +0 -0
  39. data/html/images/bullet_toggle_minus.png +0 -0
  40. data/html/images/bullet_toggle_plus.png +0 -0
  41. data/html/images/date.png +0 -0
  42. data/html/images/delete.png +0 -0
  43. data/html/images/find.png +0 -0
  44. data/html/images/loadingAnimation.gif +0 -0
  45. data/html/images/macFFBgHack.png +0 -0
  46. data/html/images/package.png +0 -0
  47. data/html/images/page_green.png +0 -0
  48. data/html/images/page_white_text.png +0 -0
  49. data/html/images/page_white_width.png +0 -0
  50. data/html/images/plugin.png +0 -0
  51. data/html/images/ruby.png +0 -0
  52. data/html/images/tag_blue.png +0 -0
  53. data/html/images/tag_green.png +0 -0
  54. data/html/images/transparent.png +0 -0
  55. data/html/images/wrench.png +0 -0
  56. data/html/images/wrench_orange.png +0 -0
  57. data/html/images/zoom.png +0 -0
  58. data/html/index.html +308 -0
  59. data/html/js/darkfish.js +84 -0
  60. data/html/js/navigation.js +105 -0
  61. data/html/js/navigation.js.gz +0 -0
  62. data/html/js/search.js +110 -0
  63. data/html/js/search_index.js +1 -0
  64. data/html/js/search_index.js.gz +0 -0
  65. data/html/js/searcher.js +229 -0
  66. data/html/js/searcher.js.gz +0 -0
  67. data/html/table_of_contents.html +409 -0
  68. data/lib/completion/hook_completion.bash +22 -0
  69. data/lib/completion/hook_completion.fish +31 -0
  70. data/lib/completion/hook_completion.zsh +22 -0
  71. data/lib/helpers/fuzzyfilefinder +0 -0
  72. data/lib/hook.rb +5 -1
  73. data/lib/hook/hookapp.rb +489 -0
  74. data/lib/hook/hooker.rb +1 -344
  75. data/lib/hook/markdown_document_listener.rb +164 -0
  76. data/lib/hook/string.rb +60 -0
  77. data/lib/hook/version.rb +3 -1
  78. metadata +76 -12
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ # String helpers
4
+ class String
5
+ def nil_if_missing
6
+ if self =~ /missing value/
7
+ return nil
8
+ else
9
+ self
10
+ end
11
+ end
12
+
13
+ def split_hook
14
+ elements = split(/\|\|/)
15
+ {
16
+ name: elements[0].nil_if_missing,
17
+ url: elements[1].nil_if_missing,
18
+ path: elements[2].nil_if_missing
19
+ }
20
+ end
21
+
22
+ def split_hooks
23
+ split(/\^\^/).map(&:split_hook)
24
+ end
25
+
26
+ def valid_hook
27
+ if File.exist?(self)
28
+ File.expand_path(self)
29
+ elsif self =~ /^\[.*?\]\((.*?)\)$/
30
+ mdlink = $1
31
+ mdlink.valid_hook
32
+ else
33
+ self
34
+ end
35
+ end
36
+
37
+ def valid_hook!
38
+ replace valid_hook
39
+ end
40
+
41
+ # Capitalize only if no uppercase
42
+ def cap
43
+ if self !~ /[A-Z]/
44
+ capitalize
45
+ else
46
+ self
47
+ end
48
+ end
49
+
50
+ def cap!
51
+ replace cap
52
+ end
53
+
54
+ def clip
55
+ res = `/bin/echo -n #{Shellwords.escape(self)} | pbcopy`.strip
56
+ raise 'Failed to copy to clipboard' unless res.empty?
57
+
58
+ true
59
+ end
60
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Hook
2
- VERSION = '0.0.7'
4
+ VERSION = '2.0.3'
3
5
  end
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hookapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-10 00:00:00.000000000 Z
11
+ date: 2020-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake
14
+ name: aruba
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 13.0.1
19
+ version: 0.14.14
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 13.0.1
26
+ version: 0.14.14
27
27
  - !ruby/object:Gem::Dependency
28
- name: rdoc
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 6.1.2
33
+ version: 13.0.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 6.1.2
40
+ version: 13.0.1
41
41
  - !ruby/object:Gem::Dependency
42
- name: aruba
42
+ name: rdoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.14.14
47
+ version: 6.1.2
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.14.14
54
+ version: 6.1.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: gli
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -79,17 +79,81 @@ files:
79
79
  - CHANGELOG.md
80
80
  - Gemfile
81
81
  - Gemfile.lock
82
+ - LICENSE.md
83
+ - OVERVIEW.md
82
84
  - README.md
83
85
  - README.rdoc
84
86
  - Rakefile
85
87
  - bin/hook
88
+ - buildnotes.md
86
89
  - features/hook.feature
87
90
  - features/step_definitions/hook_steps.rb
88
91
  - features/support/env.rb
89
92
  - hook.rdoc
90
93
  - hookapp.gemspec
94
+ - html/App.html
95
+ - html/GLI.html
96
+ - html/GLI/Commands.html
97
+ - html/GLI/Commands/Doc.html
98
+ - html/GLI/Commands/MarkdownDocumentListener.html
99
+ - html/Hook.html
100
+ - html/HookApp.html
101
+ - html/Hooker.html
102
+ - html/README_rdoc.html
103
+ - html/String.html
104
+ - html/created.rid
105
+ - html/css/fonts.css
106
+ - html/css/rdoc.css
107
+ - html/fonts/Lato-Light.ttf
108
+ - html/fonts/Lato-LightItalic.ttf
109
+ - html/fonts/Lato-Regular.ttf
110
+ - html/fonts/Lato-RegularItalic.ttf
111
+ - html/fonts/SourceCodePro-Bold.ttf
112
+ - html/fonts/SourceCodePro-Regular.ttf
113
+ - html/images/add.png
114
+ - html/images/arrow_up.png
115
+ - html/images/brick.png
116
+ - html/images/brick_link.png
117
+ - html/images/bug.png
118
+ - html/images/bullet_black.png
119
+ - html/images/bullet_toggle_minus.png
120
+ - html/images/bullet_toggle_plus.png
121
+ - html/images/date.png
122
+ - html/images/delete.png
123
+ - html/images/find.png
124
+ - html/images/loadingAnimation.gif
125
+ - html/images/macFFBgHack.png
126
+ - html/images/package.png
127
+ - html/images/page_green.png
128
+ - html/images/page_white_text.png
129
+ - html/images/page_white_width.png
130
+ - html/images/plugin.png
131
+ - html/images/ruby.png
132
+ - html/images/tag_blue.png
133
+ - html/images/tag_green.png
134
+ - html/images/transparent.png
135
+ - html/images/wrench.png
136
+ - html/images/wrench_orange.png
137
+ - html/images/zoom.png
138
+ - html/index.html
139
+ - html/js/darkfish.js
140
+ - html/js/navigation.js
141
+ - html/js/navigation.js.gz
142
+ - html/js/search.js
143
+ - html/js/search_index.js
144
+ - html/js/search_index.js.gz
145
+ - html/js/searcher.js
146
+ - html/js/searcher.js.gz
147
+ - html/table_of_contents.html
148
+ - lib/completion/hook_completion.bash
149
+ - lib/completion/hook_completion.fish
150
+ - lib/completion/hook_completion.zsh
151
+ - lib/helpers/fuzzyfilefinder
91
152
  - lib/hook.rb
153
+ - lib/hook/hookapp.rb
92
154
  - lib/hook/hooker.rb
155
+ - lib/hook/markdown_document_listener.rb
156
+ - lib/hook/string.rb
93
157
  - lib/hook/version.rb
94
158
  - test/default_test.rb
95
159
  - test/hookfiles/01.test
@@ -129,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
193
  - !ruby/object:Gem::Version
130
194
  version: '0'
131
195
  requirements: []
132
- rubygems_version: 3.0.6
196
+ rubygems_version: 3.1.4
133
197
  signing_key:
134
198
  specification_version: 4
135
199
  summary: A CLI for Hook.app (macOS)