ruby-zoom 3.5.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/bin/z +189 -147
  3. data/bin/zc +189 -147
  4. data/bin/zf +189 -147
  5. data/bin/zg +189 -147
  6. data/bin/zl +189 -147
  7. data/bin/zr +189 -147
  8. data/lib/zoom.rb +48 -604
  9. data/lib/zoom/cache.rb +253 -0
  10. data/lib/zoom/cache/result.rb +49 -0
  11. data/lib/zoom/config.rb +156 -0
  12. data/lib/zoom/editor.rb +121 -0
  13. data/lib/zoom/error.rb +6 -6
  14. data/lib/zoom/error/{executable_not_found_error.rb → executable_not_found.rb} +1 -3
  15. data/lib/zoom/error/invalid_color.rb +5 -0
  16. data/lib/zoom/error/{invalid_tag_error.rb → invalid_tag.rb} +1 -3
  17. data/lib/zoom/error/{profile_class_unknown_error.rb → profile_class_unknown.rb} +1 -3
  18. data/lib/zoom/error/{profile_does_not_exist_error.rb → profile_does_not_exist.rb} +1 -3
  19. data/lib/zoom/error/profile_not_named.rb +7 -0
  20. data/lib/zoom/profile.rb +162 -66
  21. data/lib/zoom/profile/ack.rb +5 -30
  22. data/lib/zoom/profile/ag.rb +2 -37
  23. data/lib/zoom/profile/find.rb +2 -25
  24. data/lib/zoom/profile/grep.rb +2 -44
  25. data/lib/zoom/profile/passwords.rb +27 -59
  26. data/lib/zoom/profile/pt.rb +2 -26
  27. data/lib/zoom/profile_manager.rb +49 -0
  28. data/lib/zoom/wish/add_wish.rb +58 -0
  29. data/lib/zoom/wish/color_wish.rb +147 -0
  30. data/lib/zoom/wish/copy_wish.rb +57 -0
  31. data/lib/zoom/wish/delete_wish.rb +51 -0
  32. data/lib/zoom/wish/edit_wish.rb +130 -0
  33. data/lib/zoom/wish/editor_wish.rb +31 -0
  34. data/lib/zoom/wish/list_wish.rb +58 -0
  35. data/lib/zoom/wish/rename_wish.rb +69 -0
  36. data/lib/zoom/wish/reset_wish.rb +40 -0
  37. data/lib/zoom/wish/use_wish.rb +61 -0
  38. metadata +118 -24
  39. data/lib/string.rb +0 -48
  40. data/lib/zoom/error/profile_already_exists_error.rb +0 -8
  41. data/lib/zoom/error/profile_can_not_be_modified_error.rb +0 -8
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-zoom
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-04 00:00:00.000000000 Z
11
+ date: 2016-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '5.8'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 5.8.1
22
+ version: 5.8.4
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,87 @@ dependencies:
29
29
  version: '5.8'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 5.8.1
32
+ version: 5.8.4
33
+ - !ruby/object:Gem::Dependency
34
+ name: rake
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '10.5'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 10.5.0
43
+ type: :development
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '10.5'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 10.5.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: djinni
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '2.0'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 2.0.1
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '2.0'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 2.0.1
73
+ - !ruby/object:Gem::Dependency
74
+ name: hilighter
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '0.1'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 0.1.3
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.1'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 0.1.3
93
+ - !ruby/object:Gem::Dependency
94
+ name: json_config
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: '0.1'
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 0.1.2
103
+ type: :runtime
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '0.1'
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 0.1.2
33
113
  - !ruby/object:Gem::Dependency
34
114
  name: scoobydoo
35
115
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +119,7 @@ dependencies:
39
119
  version: '0.1'
40
120
  - - ">="
41
121
  - !ruby/object:Gem::Version
42
- version: 0.1.1
122
+ version: 0.1.4
43
123
  type: :runtime
44
124
  prerelease: false
45
125
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,23 +129,23 @@ dependencies:
49
129
  version: '0.1'
50
130
  - - ">="
51
131
  - !ruby/object:Gem::Version
52
- version: 0.1.1
53
- description: Do you like to search through code using ag, ack, or grep? Good! This
54
- tool is for you! Zoom adds some convenience to ag/ack/grep by allowing you to quickly
55
- open your search results in your editor of choice. When looking at large code-bases,
56
- it can be a pain to have to scroll to find the filename of each result. Zoom prints
57
- a tag number in front of each result that ag/ack/grep outputs. Then you can quickly
58
- open that tag number with Zoom to jump straight to the source. Zoom is even persistent
59
- across all your sessions! You can search in one terminal and jump to a tag in another
60
- terminal from any directory!
132
+ version: 0.1.4
133
+ description: Do you like to search through code using ag, ack, grep, or pt? Good!
134
+ This tool is for you! Zoom adds some convenience to ag/ack/grep/pt by allowing you
135
+ to quickly open your search results in your editor of choice. When looking at large
136
+ code-bases, it can be a pain to have to scroll to find the filename of each result.
137
+ Zoom prints a tag number in front of each result that ag/ack/grep/pt outputs. Then
138
+ you can quickly open that tag number with Zoom to jump straight to the source. Zoom
139
+ is even persistent across all your sessions! You can search in one terminal and
140
+ jump to a tag in another terminal from any directory!
61
141
  email: mjwhitta@gmail.com
62
142
  executables:
63
- - zf
64
143
  - zg
65
- - z
144
+ - zf
66
145
  - zl
67
- - zr
68
146
  - zc
147
+ - z
148
+ - zr
69
149
  extensions: []
70
150
  extra_rdoc_files: []
71
151
  files:
@@ -75,15 +155,18 @@ files:
75
155
  - bin/zg
76
156
  - bin/zl
77
157
  - bin/zr
78
- - lib/string.rb
79
158
  - lib/zoom.rb
159
+ - lib/zoom/cache.rb
160
+ - lib/zoom/cache/result.rb
161
+ - lib/zoom/config.rb
162
+ - lib/zoom/editor.rb
80
163
  - lib/zoom/error.rb
81
- - lib/zoom/error/executable_not_found_error.rb
82
- - lib/zoom/error/invalid_tag_error.rb
83
- - lib/zoom/error/profile_already_exists_error.rb
84
- - lib/zoom/error/profile_can_not_be_modified_error.rb
85
- - lib/zoom/error/profile_class_unknown_error.rb
86
- - lib/zoom/error/profile_does_not_exist_error.rb
164
+ - lib/zoom/error/executable_not_found.rb
165
+ - lib/zoom/error/invalid_color.rb
166
+ - lib/zoom/error/invalid_tag.rb
167
+ - lib/zoom/error/profile_class_unknown.rb
168
+ - lib/zoom/error/profile_does_not_exist.rb
169
+ - lib/zoom/error/profile_not_named.rb
87
170
  - lib/zoom/profile.rb
88
171
  - lib/zoom/profile/ack.rb
89
172
  - lib/zoom/profile/ag.rb
@@ -91,6 +174,17 @@ files:
91
174
  - lib/zoom/profile/grep.rb
92
175
  - lib/zoom/profile/passwords.rb
93
176
  - lib/zoom/profile/pt.rb
177
+ - lib/zoom/profile_manager.rb
178
+ - lib/zoom/wish/add_wish.rb
179
+ - lib/zoom/wish/color_wish.rb
180
+ - lib/zoom/wish/copy_wish.rb
181
+ - lib/zoom/wish/delete_wish.rb
182
+ - lib/zoom/wish/edit_wish.rb
183
+ - lib/zoom/wish/editor_wish.rb
184
+ - lib/zoom/wish/list_wish.rb
185
+ - lib/zoom/wish/rename_wish.rb
186
+ - lib/zoom/wish/reset_wish.rb
187
+ - lib/zoom/wish/use_wish.rb
94
188
  homepage: https://mjwhitta.github.io/zoom
95
189
  licenses:
96
190
  - GPL-3.0
@@ -1,48 +0,0 @@
1
- # Redefine String class to allow for colorizing, rsplit, and word wrap
2
- class String
3
- def black
4
- return colorize(30)
5
- end
6
-
7
- def blue
8
- return colorize(34)
9
- end
10
-
11
- def colorize(color)
12
- return "\e[#{color}m#{self}\e[0m"
13
- end
14
-
15
- def cyan
16
- return colorize(36)
17
- end
18
-
19
- def green
20
- return colorize(32)
21
- end
22
-
23
- def purple
24
- return colorize(35)
25
- end
26
-
27
- def red
28
- return colorize(31)
29
- end
30
-
31
- def rsplit(pattern)
32
- ret = rpartition(pattern)
33
- ret.delete_at(1)
34
- return ret
35
- end
36
-
37
- def white
38
- return colorize(37)
39
- end
40
-
41
- def word_wrap(width = 70)
42
- return scan(/\S.{0,#{width}}\S(?=\s|$)|\S+/).join("\n")
43
- end
44
-
45
- def yellow
46
- return colorize(33)
47
- end
48
- end
@@ -1,8 +0,0 @@
1
- require "zoom/error"
2
-
3
- class Zoom::Error::ProfileAlreadyExistsError < Zoom::Error
4
- def initialize(profile = nil)
5
- super("Profile already exists: #{profile}") if (profile)
6
- super("Profile already exists") if (profile.nil?)
7
- end
8
- end
@@ -1,8 +0,0 @@
1
- require "zoom/error"
2
-
3
- class Zoom::Error::ProfileCanNotBeModifiedError < Zoom::Error
4
- def initialize(profile = nil)
5
- super("Profile can not be modified: #{profile}") if (profile)
6
- super("Profile can not be modified") if (profile.nil?)
7
- end
8
- end