ruby-zoom 3.4.0 → 3.5.0
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/z +9 -1
- data/bin/zc +9 -1
- data/bin/zf +9 -1
- data/bin/zg +9 -1
- data/bin/zl +9 -1
- data/bin/zr +9 -1
- data/lib/zoom.rb +4 -2
- data/lib/zoom/profile.rb +8 -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: 517419dd8be17242c6cfc38d97135a8ddfec8aa7
|
4
|
+
data.tar.gz: df6fbd65cf6a222d5b1563ea00b546142ffea688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94e7090be2059ec13abf0b4ef1f766b23ec52ab2612a87f413afa17405670222fdac7efc38042622f65ec398e29c6a3be466206a91dc28574c33201c0d017be9
|
7
|
+
data.tar.gz: d5a75653eb943b6c3211f218d42b154d9c15198647a45e5574a62f2508ec0e44748685d15b8f6b45b496a3c8111014a1f61a0c69e650d9e61fac8054da686626
|
data/bin/z
CHANGED
@@ -14,6 +14,7 @@ end
|
|
14
14
|
def parse(args)
|
15
15
|
options = Hash.new
|
16
16
|
options["action"] = "exec"
|
17
|
+
options["cache_file"] = nil
|
17
18
|
options["use"] = nil
|
18
19
|
|
19
20
|
info = "Do you like to search through code using ag, ack, or " \
|
@@ -46,6 +47,13 @@ def parse(args)
|
|
46
47
|
options["action"] = "cache"
|
47
48
|
end
|
48
49
|
|
50
|
+
opts.on(
|
51
|
+
"--cache-file=FILE",
|
52
|
+
"Use the specified cache file"
|
53
|
+
) do |file|
|
54
|
+
options["cache_file"] = file
|
55
|
+
end
|
56
|
+
|
49
57
|
opts.on(
|
50
58
|
"-d",
|
51
59
|
"--delete=NAME",
|
@@ -200,7 +208,7 @@ end
|
|
200
208
|
|
201
209
|
options = parse(ARGV)
|
202
210
|
|
203
|
-
zoom = Zoom.new
|
211
|
+
zoom = Zoom.new(options["cache_file"])
|
204
212
|
begin
|
205
213
|
case options["action"]
|
206
214
|
when "add"
|
data/bin/zc
CHANGED
@@ -14,6 +14,7 @@ end
|
|
14
14
|
def parse(args)
|
15
15
|
options = Hash.new
|
16
16
|
options["action"] = "exec"
|
17
|
+
options["cache_file"] = nil
|
17
18
|
options["use"] = nil
|
18
19
|
|
19
20
|
info = "Do you like to search through code using ag, ack, or " \
|
@@ -46,6 +47,13 @@ def parse(args)
|
|
46
47
|
options["action"] = "cache"
|
47
48
|
end
|
48
49
|
|
50
|
+
opts.on(
|
51
|
+
"--cache-file=FILE",
|
52
|
+
"Use the specified cache file"
|
53
|
+
) do |file|
|
54
|
+
options["cache_file"] = file
|
55
|
+
end
|
56
|
+
|
49
57
|
opts.on(
|
50
58
|
"-d",
|
51
59
|
"--delete=NAME",
|
@@ -200,7 +208,7 @@ end
|
|
200
208
|
|
201
209
|
options = parse(ARGV)
|
202
210
|
|
203
|
-
zoom = Zoom.new
|
211
|
+
zoom = Zoom.new(options["cache_file"])
|
204
212
|
begin
|
205
213
|
case options["action"]
|
206
214
|
when "add"
|
data/bin/zf
CHANGED
@@ -14,6 +14,7 @@ end
|
|
14
14
|
def parse(args)
|
15
15
|
options = Hash.new
|
16
16
|
options["action"] = "exec"
|
17
|
+
options["cache_file"] = nil
|
17
18
|
options["use"] = nil
|
18
19
|
|
19
20
|
info = "Do you like to search through code using ag, ack, or " \
|
@@ -46,6 +47,13 @@ def parse(args)
|
|
46
47
|
options["action"] = "cache"
|
47
48
|
end
|
48
49
|
|
50
|
+
opts.on(
|
51
|
+
"--cache-file=FILE",
|
52
|
+
"Use the specified cache file"
|
53
|
+
) do |file|
|
54
|
+
options["cache_file"] = file
|
55
|
+
end
|
56
|
+
|
49
57
|
opts.on(
|
50
58
|
"-d",
|
51
59
|
"--delete=NAME",
|
@@ -200,7 +208,7 @@ end
|
|
200
208
|
|
201
209
|
options = parse(ARGV)
|
202
210
|
|
203
|
-
zoom = Zoom.new
|
211
|
+
zoom = Zoom.new(options["cache_file"])
|
204
212
|
begin
|
205
213
|
case options["action"]
|
206
214
|
when "add"
|
data/bin/zg
CHANGED
@@ -14,6 +14,7 @@ end
|
|
14
14
|
def parse(args)
|
15
15
|
options = Hash.new
|
16
16
|
options["action"] = "exec"
|
17
|
+
options["cache_file"] = nil
|
17
18
|
options["use"] = nil
|
18
19
|
|
19
20
|
info = "Do you like to search through code using ag, ack, or " \
|
@@ -46,6 +47,13 @@ def parse(args)
|
|
46
47
|
options["action"] = "cache"
|
47
48
|
end
|
48
49
|
|
50
|
+
opts.on(
|
51
|
+
"--cache-file=FILE",
|
52
|
+
"Use the specified cache file"
|
53
|
+
) do |file|
|
54
|
+
options["cache_file"] = file
|
55
|
+
end
|
56
|
+
|
49
57
|
opts.on(
|
50
58
|
"-d",
|
51
59
|
"--delete=NAME",
|
@@ -200,7 +208,7 @@ end
|
|
200
208
|
|
201
209
|
options = parse(ARGV)
|
202
210
|
|
203
|
-
zoom = Zoom.new
|
211
|
+
zoom = Zoom.new(options["cache_file"])
|
204
212
|
begin
|
205
213
|
case options["action"]
|
206
214
|
when "add"
|
data/bin/zl
CHANGED
@@ -14,6 +14,7 @@ end
|
|
14
14
|
def parse(args)
|
15
15
|
options = Hash.new
|
16
16
|
options["action"] = "exec"
|
17
|
+
options["cache_file"] = nil
|
17
18
|
options["use"] = nil
|
18
19
|
|
19
20
|
info = "Do you like to search through code using ag, ack, or " \
|
@@ -46,6 +47,13 @@ def parse(args)
|
|
46
47
|
options["action"] = "cache"
|
47
48
|
end
|
48
49
|
|
50
|
+
opts.on(
|
51
|
+
"--cache-file=FILE",
|
52
|
+
"Use the specified cache file"
|
53
|
+
) do |file|
|
54
|
+
options["cache_file"] = file
|
55
|
+
end
|
56
|
+
|
49
57
|
opts.on(
|
50
58
|
"-d",
|
51
59
|
"--delete=NAME",
|
@@ -200,7 +208,7 @@ end
|
|
200
208
|
|
201
209
|
options = parse(ARGV)
|
202
210
|
|
203
|
-
zoom = Zoom.new
|
211
|
+
zoom = Zoom.new(options["cache_file"])
|
204
212
|
begin
|
205
213
|
case options["action"]
|
206
214
|
when "add"
|
data/bin/zr
CHANGED
@@ -14,6 +14,7 @@ end
|
|
14
14
|
def parse(args)
|
15
15
|
options = Hash.new
|
16
16
|
options["action"] = "exec"
|
17
|
+
options["cache_file"] = nil
|
17
18
|
options["use"] = nil
|
18
19
|
|
19
20
|
info = "Do you like to search through code using ag, ack, or " \
|
@@ -46,6 +47,13 @@ def parse(args)
|
|
46
47
|
options["action"] = "cache"
|
47
48
|
end
|
48
49
|
|
50
|
+
opts.on(
|
51
|
+
"--cache-file=FILE",
|
52
|
+
"Use the specified cache file"
|
53
|
+
) do |file|
|
54
|
+
options["cache_file"] = file
|
55
|
+
end
|
56
|
+
|
49
57
|
opts.on(
|
50
58
|
"-d",
|
51
59
|
"--delete=NAME",
|
@@ -200,7 +208,7 @@ end
|
|
200
208
|
|
201
209
|
options = parse(ARGV)
|
202
210
|
|
203
|
-
zoom = Zoom.new
|
211
|
+
zoom = Zoom.new(options["cache_file"])
|
204
212
|
begin
|
205
213
|
case options["action"]
|
206
214
|
when "add"
|
data/lib/zoom.rb
CHANGED
@@ -221,8 +221,10 @@ class Zoom
|
|
221
221
|
end
|
222
222
|
private :get_new_value
|
223
223
|
|
224
|
-
def initialize
|
225
|
-
|
224
|
+
def initialize(cache_file = nil)
|
225
|
+
cache_file ||= "~/.zoom_cache"
|
226
|
+
Zoom::Profile.cache_file(cache_file)
|
227
|
+
@cache_file = Pathname.new(cache_file).expand_path
|
226
228
|
@info_file = Pathname.new("~/.zoominfo").expand_path
|
227
229
|
@rc_file = Pathname.new("~/.zoomrc").expand_path
|
228
230
|
@shortcut_file = Pathname.new("~/.zoom_shortcuts").expand_path
|
data/lib/zoom/profile.rb
CHANGED
@@ -6,11 +6,18 @@ class Zoom::Profile < Hash
|
|
6
6
|
attr_accessor :immutable
|
7
7
|
attr_accessor :taggable
|
8
8
|
|
9
|
+
@@cache_file = "~/.zoom_cache"
|
10
|
+
|
9
11
|
def append(append = nil)
|
10
12
|
self["append"] = append if (append)
|
11
13
|
return self["append"]
|
12
14
|
end
|
13
15
|
|
16
|
+
def self.cache_file(cache_file)
|
17
|
+
@@cache_file = cache_file
|
18
|
+
@@cache_file ||= "~/.zoom_cache"
|
19
|
+
end
|
20
|
+
|
14
21
|
def colors
|
15
22
|
# TODO color support
|
16
23
|
""
|
@@ -63,7 +70,7 @@ class Zoom::Profile < Hash
|
|
63
70
|
self.operator(operator)
|
64
71
|
|
65
72
|
@immutable = false
|
66
|
-
@pager = "z --pager"
|
73
|
+
@pager = "z --pager --cache-file #{@@cache_file}"
|
67
74
|
@taggable = false
|
68
75
|
end
|
69
76
|
|