ruby-zoom 4.5.6 → 4.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zoom.rb +1 -1
- data/lib/zoom/cache.rb +14 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fd4d6b5b0341f88d88fd5b431f057eb25810bea
|
4
|
+
data.tar.gz: e9f77f2c335bd1f2b32af8516bf479de9864d6ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a1aa7198c296b2a90e8152a82de931bb241db5ee89c4a3a61c92c667e429d3946d8c356739e7b8163b44a4571474027381f25380c8ed88d0b85884450aae4b6
|
7
|
+
data.tar.gz: 795b7d05d0ed37f01f322ea2f9908e1df565002a9259b3340168e2a1977f7314a0e9b5669ee94b4854f54aac62e374799ba640111cd85d1b5cb04427afd025ef
|
data/lib/zoom.rb
CHANGED
data/lib/zoom/cache.rb
CHANGED
@@ -196,7 +196,7 @@ class Zoom::Cache
|
|
196
196
|
end
|
197
197
|
end
|
198
198
|
|
199
|
-
def write(str)
|
199
|
+
def write(str, pattern = nil)
|
200
200
|
return if (str.nil?)
|
201
201
|
|
202
202
|
if (!str.valid_encoding?)
|
@@ -208,7 +208,19 @@ class Zoom::Cache
|
|
208
208
|
end
|
209
209
|
|
210
210
|
File.open(@cache_file, "a") do |f|
|
211
|
-
|
211
|
+
str.gsub(/\r/, "^M").split("\n").each do |line|
|
212
|
+
if (pattern && line.match(/^[^:]+:[0-9]+:.+$/))
|
213
|
+
line.match(/^([^:]+:[0-9]+:)(.+)$/) do |m|
|
214
|
+
m[2].scan(
|
215
|
+
/(.{0,128}#{pattern}.{0,128})/i
|
216
|
+
) do |n|
|
217
|
+
f.write("#{m[1]}#{n[0]}\n")
|
218
|
+
end
|
219
|
+
end
|
220
|
+
else
|
221
|
+
f.write("#{line}\n")
|
222
|
+
end
|
223
|
+
end
|
212
224
|
end
|
213
225
|
end
|
214
226
|
end
|
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: 4.
|
4
|
+
version: 4.6.1
|
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-11-
|
11
|
+
date: 2016-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|