chunky_png 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,8 +3,8 @@ Gem::Specification.new do |s|
3
3
 
4
4
  # Do not change the version and date fields by hand. This will be done
5
5
  # automatically by the gem release script.
6
- s.version = "0.5.6"
7
- s.date = "2010-02-16"
6
+ s.version = "0.5.7"
7
+ s.date = "2010-02-24"
8
8
 
9
9
  s.summary = "Pure ruby library for read/write, chunk-level access to PNG files"
10
10
  s.description = <<-EOT
@@ -26,7 +26,7 @@ module ChunkyPNG
26
26
 
27
27
  # The current version of ChunkyPNG. This value will be updated automatically
28
28
  # by them gem:release rake task.
29
- VERSION = "0.5.6"
29
+ VERSION = "0.5.7"
30
30
 
31
31
  ###################################################
32
32
  # PNG international standard defined constants
@@ -188,7 +188,7 @@ module ChunkyPNG
188
188
  class ImageData < Generic
189
189
 
190
190
  def self.combine_chunks(data_chunks)
191
- Zlib::Inflate.inflate(data_chunks.map(&:content).join(''))
191
+ Zlib::Inflate.inflate(data_chunks.map { |c| c.content }.join(''))
192
192
  end
193
193
 
194
194
  def self.split_in_chunks(data, chunk_size = 2147483647)
@@ -1,19 +1,23 @@
1
1
  require 'spec_helper'
2
2
 
3
- require 'chunky_png/rmagick'
3
+ begin
4
+ require 'chunky_png/rmagick'
4
5
 
5
- describe ChunkyPNG::RMagick do
6
+ describe ChunkyPNG::RMagick do
6
7
 
7
- it "should import an image from RMagick correctly" do
8
- image = Magick::Image.read(resource_file('16x16_non_interlaced.png')).first
9
- canvas = ChunkyPNG::RMagick.import(image)
10
- canvas.should == reference_canvas('16x16_non_interlaced')
11
- end
8
+ it "should import an image from RMagick correctly" do
9
+ image = Magick::Image.read(resource_file('16x16_non_interlaced.png')).first
10
+ canvas = ChunkyPNG::RMagick.import(image)
11
+ canvas.should == reference_canvas('16x16_non_interlaced')
12
+ end
12
13
 
13
- it "should export an image to RMagick correctly" do
14
- canvas = reference_canvas('16x16_non_interlaced')
15
- image = ChunkyPNG::RMagick.export(canvas)
16
- image.format = 'PNG32'
17
- canvas.should == ChunkyPNG::Canvas.from_blob(image.to_blob)
14
+ it "should export an image to RMagick correctly" do
15
+ canvas = reference_canvas('16x16_non_interlaced')
16
+ image = ChunkyPNG::RMagick.export(canvas)
17
+ image.format = 'PNG32'
18
+ canvas.should == ChunkyPNG::Canvas.from_blob(image.to_blob)
19
+ end
18
20
  end
19
- end
21
+ rescue LoadError => e
22
+ # skipping RMagick tests
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chunky_png
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willem van Bergen
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-16 00:00:00 +01:00
12
+ date: 2010-02-24 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency