image_optimizer_holder 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.travis.yml +21 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +94 -0
- data/Rakefile +6 -0
- data/bin/pngcrush.x86_64.linux +0 -0
- data/image_optimizer_holder.gemspec +28 -0
- data/lib/carrierwave_image_optimizer.rb +7 -0
- data/lib/image_optimizer_holder.rb +20 -0
- data/lib/image_optimizer_holder/base.rb +26 -0
- data/lib/image_optimizer_holder/jpeg_optimizer.rb +78 -0
- data/lib/image_optimizer_holder/png_optimizer.rb +68 -0
- data/lib/image_optimizer_holder/version.rb +3 -0
- data/spec/image_optimizer/jpeg_optimizer_spec.rb +44 -0
- data/spec/image_optimizer/png_optimizer_spec.rb +33 -0
- data/spec/image_optimizer/version_spec.rb +7 -0
- data/spec/image_optimizer_spec.rb +11 -0
- data/spec/spec_helper.rb +7 -0
- metadata +154 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c6c82e55a4d3f823ec3b1379bfafdf9ec22e2523
|
4
|
+
data.tar.gz: 166f88acee174cc00b3f0f41916e99922cd2f349
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1f13a07d23bd59254f102390a7cfd454182824b6d8b53a648aec0de69a69ff28315a89720b25b0b5a47b0ca291f96a02308dacb8155892f16ac1d1435bfbaeab
|
7
|
+
data.tar.gz: 47e6f4a24d6115cd52efc90593058541a40ac7ff6cc5face08fd2632c3d1ce201d2c1f955b32bdba799fd49c0a6b88a70b486fc251ba61088a2a88109bba52c3
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- jruby-18mode
|
4
|
+
- jruby-19mode
|
5
|
+
- jruby-head
|
6
|
+
- 1.8.7
|
7
|
+
- 1.9.2
|
8
|
+
- 1.9.3
|
9
|
+
- 2.0.0
|
10
|
+
- 2.1.0
|
11
|
+
- ruby-head
|
12
|
+
- rbx-2.1.0
|
13
|
+
- rbx-2.2.0
|
14
|
+
- ree
|
15
|
+
matrix:
|
16
|
+
allow_failures:
|
17
|
+
- rvm: jruby-18mode
|
18
|
+
- rvm: 1.8.7
|
19
|
+
- rvm: rbx-2.1.0
|
20
|
+
- rvm: rbx-2.2.0
|
21
|
+
- rvm: ree
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Julian Tescher
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
# ImageOptimizer
|
2
|
+
|
3
|
+
This gem allows you to simply optimize images via jpegoptim or OptiPNG.
|
4
|
+
|
5
|
+
Tested against ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1.0, ruby-head, jruby-18mode, jruby-19mode, jruby-head, rbx-2.1.0,
|
6
|
+
rbx-2.2.0, and ree
|
7
|
+
|
8
|
+
[]
|
9
|
+
(http://travis-ci.org/jtescher/image_optimizer)
|
10
|
+
[]
|
11
|
+
(https://gemnasium.com/jtescher/image_optimizer)
|
12
|
+
[]
|
13
|
+
(https://codeclimate.com/github/jtescher/image_optimizer)
|
14
|
+
[]
|
15
|
+
(https://coveralls.io/r/jtescher/image_optimizer)
|
16
|
+
[](http://badge.fury.io/rb/image_optimizer)
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
##### This gem uses the following utilities for optimizing images:
|
21
|
+
|
22
|
+
1. jpegoptim, which can be installed from [freecode.com](http://freecode.com/projects/jpegoptim)
|
23
|
+
|
24
|
+
2. OptiPNG, which can be installed from [sourceforge.net](http://optipng.sourceforge.net/)
|
25
|
+
|
26
|
+
Or install the utilities via homebrew:
|
27
|
+
|
28
|
+
```bash
|
29
|
+
$ brew install optipng jpegoptim
|
30
|
+
```
|
31
|
+
|
32
|
+
Then add this line to your application's Gemfile:
|
33
|
+
|
34
|
+
gem 'image_optimizer'
|
35
|
+
|
36
|
+
And then execute:
|
37
|
+
|
38
|
+
```bash
|
39
|
+
$ bundle
|
40
|
+
```
|
41
|
+
|
42
|
+
Or install it yourself as:
|
43
|
+
```bash
|
44
|
+
$ gem install image_optimizer
|
45
|
+
```
|
46
|
+
|
47
|
+
## Usage
|
48
|
+
|
49
|
+
#### Optimize PNG or GIF formats:
|
50
|
+
|
51
|
+
OptiPNG is a PNG optimizer that recompresses image files to a smaller size without losing any information and
|
52
|
+
performs PNG integrity checks and corrections.
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
ImageOptimizer.new('path/to/file.png').optimize
|
56
|
+
```
|
57
|
+
|
58
|
+
#### Optimize JPEG formats:
|
59
|
+
|
60
|
+
jpegoptim provides lossless optimization for JPEG files based on optimizing the Huffman tables.
|
61
|
+
All jpegs will be progressively optimized for a better web experience
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
ImageOptimizer.new('path/to/file.jpg').optimize
|
65
|
+
```
|
66
|
+
|
67
|
+
## Optimization Options
|
68
|
+
|
69
|
+
##### Quiet optimization
|
70
|
+
|
71
|
+
To have optimization performed in quiet mode without logging progress, an optional `quiet` parameter may be passed.
|
72
|
+
Default is false.
|
73
|
+
|
74
|
+
```ruby
|
75
|
+
ImageOptimizer.new('path/to/file.jpg', quiet: true).optimize
|
76
|
+
```
|
77
|
+
|
78
|
+
##### Lossy JPEG optimization
|
79
|
+
|
80
|
+
Pass an optional `quality` parameter to target a specific lossy JPG quality level (0-100), default is lossless
|
81
|
+
optimization. PNGs will ignore the quality setting.
|
82
|
+
|
83
|
+
```ruby
|
84
|
+
ImageOptimizer.new('path/to/file.jpg', quality: 80).optimize
|
85
|
+
```
|
86
|
+
|
87
|
+
|
88
|
+
## Contributing
|
89
|
+
|
90
|
+
1. Fork it
|
91
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
92
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
93
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
94
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
Binary file
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'image_optimizer_holder/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "image_optimizer_holder"
|
8
|
+
gem.version = ImageOptimizerHolder::VERSION
|
9
|
+
gem.authors = ["Peter Arentsen"]
|
10
|
+
gem.email = ["peter.arentsen@holder.nl"]
|
11
|
+
gem.description = %q{A simple image optimizer}
|
12
|
+
gem.summary = %q{Simply optimize images via imagemagick or pngcrush fork from image_optimizer with carrierwave included}
|
13
|
+
gem.homepage = "https://github.com/nulian/image_optimizer"
|
14
|
+
gem.license = 'MIT'
|
15
|
+
|
16
|
+
gem.files = `git ls-files`.split($/)
|
17
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
|
+
gem.require_paths = ["lib"]
|
20
|
+
|
21
|
+
gem.add_dependency "carrierwave", ["~> 0.8"]
|
22
|
+
|
23
|
+
gem.add_development_dependency "rspec"
|
24
|
+
gem.add_development_dependency "rake"
|
25
|
+
gem.add_development_dependency "simplecov"
|
26
|
+
gem.add_development_dependency "coveralls"
|
27
|
+
gem.add_development_dependency "mime-types", "~> 1.25.1"
|
28
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'image_optimizer_holder/version'
|
2
|
+
require 'image_optimizer_holder/jpeg_optimizer'
|
3
|
+
require 'image_optimizer_holder/png_optimizer'
|
4
|
+
require 'carrierwave_image_optimizer'
|
5
|
+
|
6
|
+
class ImageOptimizerHolder
|
7
|
+
attr_reader :path, :options
|
8
|
+
|
9
|
+
def initialize(path, options = {})
|
10
|
+
@path = path
|
11
|
+
@options = options
|
12
|
+
end
|
13
|
+
|
14
|
+
def optimize
|
15
|
+
JPEGOptimizer.new(path, options).optimize
|
16
|
+
PNGOptimizer.new(path, options).optimize
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class ImageOptimizerHolder
|
2
|
+
GEM_ROOT = File.expand_path File.join(File.dirname(__FILE__), "../../")
|
3
|
+
|
4
|
+
class Base
|
5
|
+
def binary_path
|
6
|
+
@binary_path ||= begin
|
7
|
+
try_system_binary or try_vendored_binaries or ""
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def try_system_binary
|
14
|
+
system_binary = `which #{@name}`.chomp
|
15
|
+
system_binary if system_binary.length > 0
|
16
|
+
end
|
17
|
+
|
18
|
+
def try_vendored_binaries
|
19
|
+
# use the first vendored binary that doesn't shit the bed when we ask for its version
|
20
|
+
vendored_binaries = Dir["#{GEM_ROOT}/bin/#{@name}.*"].sort
|
21
|
+
vendored_binaries.find do |path|
|
22
|
+
system("#{path} -version 2> /dev/null > /dev/null")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require "image_optimizer_holder/base"
|
2
|
+
|
3
|
+
class ImageOptimizerHolder
|
4
|
+
class JPEGOptimizer < Base
|
5
|
+
attr_reader :path, :options
|
6
|
+
|
7
|
+
def initialize(path, options = {})
|
8
|
+
@path = path
|
9
|
+
@options = options
|
10
|
+
@name = 'convert'
|
11
|
+
end
|
12
|
+
|
13
|
+
def optimize
|
14
|
+
return unless jpeg_format?
|
15
|
+
|
16
|
+
if jpeg_optimizer_present?
|
17
|
+
optimize_jpeg
|
18
|
+
else
|
19
|
+
warn 'Attempting to optimize a jpeg without image magick installed. Skipping...'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def jpeg_format?
|
26
|
+
['jpeg', 'jpg'].include? extension(path)
|
27
|
+
end
|
28
|
+
|
29
|
+
def extension(path)
|
30
|
+
path.split('.').last.downcase
|
31
|
+
end
|
32
|
+
|
33
|
+
def optimize_jpeg
|
34
|
+
success = false
|
35
|
+
Tempfile.open(filename) do |in_file|
|
36
|
+
in_file.binmode
|
37
|
+
in_file.write IO.binread(path)
|
38
|
+
in_file.close
|
39
|
+
success = system(jpeg_optimizer_bin + ' ' + command_options(in_file.path))
|
40
|
+
end
|
41
|
+
success
|
42
|
+
end
|
43
|
+
|
44
|
+
def command_options(temp_path)
|
45
|
+
flags = ['-strip','-interlace Plane']
|
46
|
+
flags << max_quantity if (0..100).include?(options[:quality])
|
47
|
+
if options[:quiet]
|
48
|
+
flags << quiet
|
49
|
+
else
|
50
|
+
flags << '-verbose'
|
51
|
+
end
|
52
|
+
flags << temp_path
|
53
|
+
flags << path
|
54
|
+
flags.join(' ')
|
55
|
+
end
|
56
|
+
|
57
|
+
def max_quantity
|
58
|
+
"-quality #{options[:quality]}"
|
59
|
+
end
|
60
|
+
|
61
|
+
def filename
|
62
|
+
path.split('/').last
|
63
|
+
end
|
64
|
+
|
65
|
+
def quiet
|
66
|
+
'-quiet'
|
67
|
+
end
|
68
|
+
|
69
|
+
def jpeg_optimizer_present?
|
70
|
+
!jpeg_optimizer_bin.nil? && !jpeg_optimizer_bin.empty?
|
71
|
+
end
|
72
|
+
|
73
|
+
def jpeg_optimizer_bin
|
74
|
+
@jpeg_optimizer_bin ||= binary_path
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require "image_optimizer_holder/base"
|
2
|
+
|
3
|
+
class ImageOptimizerHolder
|
4
|
+
class PNGOptimizer < Base
|
5
|
+
attr_reader :path, :options
|
6
|
+
|
7
|
+
def initialize(path, options = {})
|
8
|
+
@path = path
|
9
|
+
@options = options
|
10
|
+
@name = 'pngcrush'
|
11
|
+
end
|
12
|
+
|
13
|
+
def optimize
|
14
|
+
return unless png_format?
|
15
|
+
|
16
|
+
if png_optimizer_present?
|
17
|
+
optimize_png
|
18
|
+
else
|
19
|
+
warn 'Attempting to optimize a png without pngcrush installed. Skipping...'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def png_format?
|
26
|
+
['png'].include? extension(path)
|
27
|
+
end
|
28
|
+
|
29
|
+
def extension(path)
|
30
|
+
path.split('.').last.downcase
|
31
|
+
end
|
32
|
+
|
33
|
+
def optimize_png
|
34
|
+
success = false
|
35
|
+
Tempfile.open(filename) do |in_file|
|
36
|
+
in_file.binmode
|
37
|
+
in_file.write IO.binread(path)
|
38
|
+
in_file.close
|
39
|
+
success = system(png_optimizer_bin, *command_options(in_file.path))
|
40
|
+
end
|
41
|
+
success
|
42
|
+
end
|
43
|
+
|
44
|
+
def command_options(temp_path)
|
45
|
+
flags = ['-rem alla', '-rem text']
|
46
|
+
flags << quiet if options[:quiet]
|
47
|
+
flags << temp_path
|
48
|
+
flags << path
|
49
|
+
end
|
50
|
+
|
51
|
+
def filename
|
52
|
+
path.split('/').last
|
53
|
+
end
|
54
|
+
|
55
|
+
def quiet
|
56
|
+
'-q'
|
57
|
+
end
|
58
|
+
|
59
|
+
def png_optimizer_present?
|
60
|
+
!png_optimizer_bin.nil? && !png_optimizer_bin.empty?
|
61
|
+
end
|
62
|
+
|
63
|
+
def png_optimizer_bin
|
64
|
+
@png_optimzer_bin ||= binary_path
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ImageOptimizer::JPEGOptimizer do
|
4
|
+
describe '#optimize' do
|
5
|
+
let(:jpeg_optimizer) { ImageOptimizer::JPEGOptimizer.new('/path/to/file.jpg') }
|
6
|
+
|
7
|
+
it 'optimizes the jpeg' do
|
8
|
+
jpeg_optimizer.stub(:jpeg_optimizer_bin => '/usr/local/bin/jpegoptim')
|
9
|
+
optimizer_options = %w[-f --strip-all --all-progressive /path/to/file.jpg]
|
10
|
+
jpeg_optimizer.should_receive(:system).with('/usr/local/bin/jpegoptim', *optimizer_options)
|
11
|
+
jpeg_optimizer.optimize
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'warns the user if the jpeg optimizing utility is not installed' do
|
15
|
+
jpeg_optimizer.stub(:jpeg_optimizer_bin => '')
|
16
|
+
jpeg_optimizer.should_receive(:warn).with('Attempting to optimize a jpeg without jpegoptim installed. Skipping...')
|
17
|
+
jpeg_optimizer.optimize
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'detects if there is an ENV variable path to jpegoptim' do
|
21
|
+
image_optim_jpegoptim_bin_path = '/app/vendor/bundle/ruby/2.0.0/gems/image_optim_bin-0.0.2/bin/jpegoptim'
|
22
|
+
ENV['JPEGOPTIM_BIN'] = image_optim_jpegoptim_bin_path
|
23
|
+
optimizer_options = %w[-f --strip-all --all-progressive /path/to/file.jpg]
|
24
|
+
jpeg_optimizer.should_receive(:system).with(image_optim_jpegoptim_bin_path, *optimizer_options)
|
25
|
+
jpeg_optimizer.optimize
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'accepts an optional quality parameter' do
|
29
|
+
jpeg_optimizer = ImageOptimizer::JPEGOptimizer.new('/path/to/file.jpg', :quality => 50)
|
30
|
+
jpeg_optimizer.stub(:jpeg_optimizer_bin => '/usr/local/bin/jpegoptim')
|
31
|
+
optimizer_options = %w[-f --strip-all --all-progressive --max=50 /path/to/file.jpg]
|
32
|
+
jpeg_optimizer.should_receive(:system).with('/usr/local/bin/jpegoptim', *optimizer_options)
|
33
|
+
jpeg_optimizer.optimize
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'accepts an optional quiet parameter' do
|
37
|
+
jpeg_optimizer = ImageOptimizer::JPEGOptimizer.new('/path/to/file.jpg', :quiet => true)
|
38
|
+
jpeg_optimizer.stub(:jpeg_optimizer_bin => '/usr/local/bin/jpegoptim')
|
39
|
+
optimizer_options = %w[-f --strip-all --all-progressive --quiet /path/to/file.jpg]
|
40
|
+
jpeg_optimizer.should_receive(:system).with('/usr/local/bin/jpegoptim', *optimizer_options)
|
41
|
+
jpeg_optimizer.optimize
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ImageOptimizer::PNGOptimizer do
|
4
|
+
describe '#optimize' do
|
5
|
+
let(:png_optimizer) { ImageOptimizer::PNGOptimizer.new('/path/to/file.png') }
|
6
|
+
|
7
|
+
it 'optimizes the png' do
|
8
|
+
png_optimizer.stub(:png_optimizer_bin => '/usr/local/bin/pngcrush')
|
9
|
+
png_optimizer.should_receive(:system).with('/usr/local/bin/pngcrush', '-o7', '/path/to/file.png')
|
10
|
+
png_optimizer.optimize
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'warns the user if the png optimizing utility is not installed' do
|
14
|
+
png_optimizer.stub(:png_optimizer_bin => '')
|
15
|
+
png_optimizer.should_receive(:warn).with('Attempting to optimize a png without optipng installed. Skipping...')
|
16
|
+
png_optimizer.optimize
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'detects if there is an ENV variable path to optipng' do
|
20
|
+
image_optim_optipng_bin_path = '/app/vendor/bundle/ruby/2.0.0/gems/image_optim_bin-0.0.2/bin/optipng'
|
21
|
+
ENV['OPTIPNG_BIN'] = image_optim_optipng_bin_path
|
22
|
+
png_optimizer.should_receive(:system).with(image_optim_optipng_bin_path, '-o7', '/path/to/file.png')
|
23
|
+
png_optimizer.optimize
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'accepts an optional quiet parameter' do
|
27
|
+
png_optimizer = ImageOptimizer::PNGOptimizer.new('/path/to/file.png', :quiet => true)
|
28
|
+
png_optimizer.stub(:png_optimizer_bin => '/usr/local/bin/optipng')
|
29
|
+
png_optimizer.should_receive(:system).with('/usr/local/bin/optipng', '-o7', '-quiet', '/path/to/file.png')
|
30
|
+
png_optimizer.optimize
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ImageOptimizer do
|
4
|
+
describe '#optimize' do
|
5
|
+
it 'delegates to jpeg and png optimizers' do
|
6
|
+
ImageOptimizer::JPEGOptimizer.any_instance.should_receive(:optimize)
|
7
|
+
ImageOptimizer::PNGOptimizer.any_instance.should_receive(:optimize)
|
8
|
+
ImageOptimizer.new('/path/to/image.jpg').optimize
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,154 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: image_optimizer_holder
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Peter Arentsen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: carrierwave
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.8'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.8'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: simplecov
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: coveralls
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: mime-types
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.25.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.25.1
|
97
|
+
description: A simple image optimizer
|
98
|
+
email:
|
99
|
+
- peter.arentsen@holder.nl
|
100
|
+
executables:
|
101
|
+
- pngcrush.x86_64.linux
|
102
|
+
extensions: []
|
103
|
+
extra_rdoc_files: []
|
104
|
+
files:
|
105
|
+
- ".gitignore"
|
106
|
+
- ".travis.yml"
|
107
|
+
- Gemfile
|
108
|
+
- LICENSE.txt
|
109
|
+
- README.md
|
110
|
+
- Rakefile
|
111
|
+
- bin/pngcrush.x86_64.linux
|
112
|
+
- image_optimizer_holder.gemspec
|
113
|
+
- lib/carrierwave_image_optimizer.rb
|
114
|
+
- lib/image_optimizer_holder.rb
|
115
|
+
- lib/image_optimizer_holder/base.rb
|
116
|
+
- lib/image_optimizer_holder/jpeg_optimizer.rb
|
117
|
+
- lib/image_optimizer_holder/png_optimizer.rb
|
118
|
+
- lib/image_optimizer_holder/version.rb
|
119
|
+
- spec/image_optimizer/jpeg_optimizer_spec.rb
|
120
|
+
- spec/image_optimizer/png_optimizer_spec.rb
|
121
|
+
- spec/image_optimizer/version_spec.rb
|
122
|
+
- spec/image_optimizer_spec.rb
|
123
|
+
- spec/spec_helper.rb
|
124
|
+
homepage: https://github.com/nulian/image_optimizer
|
125
|
+
licenses:
|
126
|
+
- MIT
|
127
|
+
metadata: {}
|
128
|
+
post_install_message:
|
129
|
+
rdoc_options: []
|
130
|
+
require_paths:
|
131
|
+
- lib
|
132
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
requirements: []
|
143
|
+
rubyforge_project:
|
144
|
+
rubygems_version: 2.4.2
|
145
|
+
signing_key:
|
146
|
+
specification_version: 4
|
147
|
+
summary: Simply optimize images via imagemagick or pngcrush fork from image_optimizer
|
148
|
+
with carrierwave included
|
149
|
+
test_files:
|
150
|
+
- spec/image_optimizer/jpeg_optimizer_spec.rb
|
151
|
+
- spec/image_optimizer/png_optimizer_spec.rb
|
152
|
+
- spec/image_optimizer/version_spec.rb
|
153
|
+
- spec/image_optimizer_spec.rb
|
154
|
+
- spec/spec_helper.rb
|