image_optimizer 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  class ImageOptimizer
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -6,13 +6,13 @@ describe ImageOptimizer::JPEGOptimizer do
6
6
  let(:jpeg_optimizer) { ImageOptimizer::JPEGOptimizer.new(file_path) }
7
7
 
8
8
  it 'optimizes the jpeg' do
9
- jpeg_optimizer.stub(jpeg_optimizer_present?: true)
9
+ jpeg_optimizer.stub(:jpeg_optimizer_present? => true)
10
10
  jpeg_optimizer.should_receive(:system).with("jpegoptim -f --strip-all #{jpeg_optimizer.path}")
11
11
  jpeg_optimizer.optimize
12
12
  end
13
13
 
14
14
  it 'warns the user if the jpeg optimizing utility is not installed' do
15
- jpeg_optimizer.stub(jpeg_optimizer_present?: false)
15
+ jpeg_optimizer.stub(:jpeg_optimizer_present? => false)
16
16
  jpeg_optimizer.should_receive(:warn).with('Attempting to optimize a jpeg without jpegoptim installed. Skipping...')
17
17
  jpeg_optimizer.optimize
18
18
  end
@@ -6,13 +6,13 @@ describe ImageOptimizer::PNGOptimizer do
6
6
  let(:png_optimizer) { ImageOptimizer::PNGOptimizer.new(file_path) }
7
7
 
8
8
  it 'optimizes the png' do
9
- png_optimizer.stub(png_optimizer_present?: true)
9
+ png_optimizer.stub(:png_optimizer_present? => true)
10
10
  png_optimizer.should_receive(:system).with("optipng -o7 #{png_optimizer.path}")
11
11
  png_optimizer.optimize
12
12
  end
13
13
 
14
14
  it 'warns the user if the png optimizing utility is not installed' do
15
- png_optimizer.stub(png_optimizer_present?: false)
15
+ png_optimizer.stub(:png_optimizer_present? => false)
16
16
  png_optimizer.should_receive(:warn).with('Attempting to optimize a png without optipng installed. Skipping...')
17
17
  png_optimizer.optimize
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_optimizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -80,7 +80,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  segments:
82
82
  - 0
83
- hash: 914025074646364729
83
+ hash: 1347445832643445208
84
84
  required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  segments:
91
91
  - 0
92
- hash: 914025074646364729
92
+ hash: 1347445832643445208
93
93
  requirements: []
94
94
  rubyforge_project:
95
95
  rubygems_version: 1.8.24