sprockets-svg 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 754b938dcc4ae9cdf282159f482120b93c096d77
4
- data.tar.gz: bd0445002ca5a5c540f6eb90f71f24fde1b6c7f8
3
+ metadata.gz: b42a572a73bd361164f32df1f502be95be3b9701
4
+ data.tar.gz: bcee94585135c1536ca850faafbdb2e60b6d80db
5
5
  SHA512:
6
- metadata.gz: f4141105a7217d237b509854ee742d7dab01476c316e414f496559578ac7a78e4758bbfbd857299fb0b287e18c09ebfdbeec06d513a59c890ba78ad660270099
7
- data.tar.gz: 1f99f9f4163adc9cc230e869aabd431342571351317fc477f602aaa1e294a770b046c3ea6c9dff160c495f382c91c716c3610e504ade6fa24962933879a8e2fa
6
+ metadata.gz: 997fab96ba72f38a7daf36b2416017b1765992e07ad68aa354e6140f054e76d5a26e13973476a8cc22c815248dd657eba9f28ec205e84ff842408ce89a582f85
7
+ data.tar.gz: 3bdaf83efda5ba224e182c75e17b7cdec93cc16a287ad4a07304640547f6bda27ced4d4056a3c678b8751b5b1548309ec58e51d76dc44c5336fb63801bb93a00
@@ -18,9 +18,16 @@ module Sprockets
18
18
  end
19
19
 
20
20
  def strip_png_metadata(png_blob)
21
- image = ChunkyPNG::Image.from_blob(png_blob)
22
- USELESS_PNG_METADATA.each(&image.metadata.method(:delete))
23
- image.to_blob
21
+ image = ChunkyPNG::Datastream.from_blob(png_blob)
22
+
23
+ image.other_chunks.reject! do |chunk|
24
+ chunk.type == "tIME" ||
25
+ (chunk.respond_to?(:keyword) && USELESS_PNG_METADATA.include?(chunk.keyword))
26
+ end
27
+
28
+ str = StringIO.new
29
+ image.write(str)
30
+ str.string
24
31
  end
25
32
 
26
33
  def install(assets)
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Svg
3
- VERSION = '1.1.1'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-svg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-12 00:00:00.000000000 Z
11
+ date: 2016-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler