discourse_fastimage 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastimage.rb +5 -7
- 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: 37620cc6b20562783bb7d7ac06cb535065a3e935
|
4
|
+
data.tar.gz: 07baa13fdec2f77276878545814d4ef32487bf41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4084b661aa9e3f56af4bac6bf48630b3eedcbdb42f7a28e0fb6f7b64aecd8e42036ec4aeef46c0482439a0ce8be41743977c1d16b782804f85c2327195b1522
|
7
|
+
data.tar.gz: bde96e05a4e9826421cc6335e4d08a6dd838eae1c2a0e34c9f1040296e562f40b0ccef6e94b49a04a005ee434ccf0a2e8a00bb1efad567d5291125f63f010e1e
|
data/lib/fastimage.rb
CHANGED
@@ -477,13 +477,11 @@ class FastImage
|
|
477
477
|
when "<s"
|
478
478
|
:svg
|
479
479
|
when "<?"
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
raise UnknownImageType
|
480
|
+
(10..200).step(10).each do |length|
|
481
|
+
characters = @stream.peek(length) rescue nil
|
482
|
+
raise UnknownImageType if characters.nil?
|
483
|
+
return :svg if characters.include?("<svg")
|
484
|
+
end
|
487
485
|
else
|
488
486
|
raise UnknownImageType
|
489
487
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discourse_fastimage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Sykes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fakeweb
|