middleman-webp 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +9 -0
- data/CHANGELOG.md +6 -2
- data/Gemfile +3 -0
- data/README.md +25 -3
- data/lib/middleman-webp/converter.rb +7 -2
- data/lib/middleman-webp/extension.rb +30 -3
- data/lib/middleman-webp/options.rb +5 -1
- data/lib/middleman-webp/pathname_matcher.rb +4 -4
- data/lib/middleman-webp/version.rb +1 -1
- data/middleman-webp.gemspec +1 -1
- data/spec/fixtures/{directory → dummy-build/directory}/dummy.html +0 -0
- data/spec/fixtures/{directory → dummy-build/directory}/empty.gif +0 -0
- data/spec/fixtures/{empty.jpg → dummy-build/empty.jpg} +0 -0
- data/spec/fixtures/{empty.png → dummy-build/empty.png} +0 -0
- data/spec/fixtures/ok-build/lizard.jpg +0 -0
- data/spec/fixtures/ok-build/tux.png +0 -0
- data/spec/integration/extension_spec.rb +99 -0
- data/spec/spec_helper.rb +9 -3
- data/spec/unit/converter_spec.rb +13 -2
- data/spec/unit/extension_spec.rb +48 -0
- data/spec/unit/pathname_matcher_spec.rb +2 -2
- metadata +31 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8edf6cefbf5002fdad1decc34a8478c36b84046f
|
4
|
+
data.tar.gz: 34d574375a04fcda5e7aa035288a9039aa0c414b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b78739e99e432f9d6fd2c01bf9d3db6bbe52534147d6511b109eba7eb4813386160c779d37e73eaa06d598c6a4add837916d7bde870720e1515ca580cdb3c88
|
7
|
+
data.tar.gz: 7a43165a4724e126b44b14e8937f1c2ac247d003e36d7040a1a4c1c5342f0fb8088db5015f1b61b77066b6b9e4afc498009e9f344744d40a4dc42585dd53a20e
|
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -4,5 +4,9 @@
|
|
4
4
|
|
5
5
|
## 0.2.4
|
6
6
|
|
7
|
-
- Add ```ignore``` option similar to the one in the [asset_hash extension](http://middlemanapp.com/advanced/improving-cacheability/#uniquely-named-assets)
|
8
|
-
- Allow using Regexp to match files for custom conversion options
|
7
|
+
- Add ```ignore``` option similar to the one in the [asset_hash extension](http://middlemanapp.com/advanced/improving-cacheability/#uniquely-named-assets)
|
8
|
+
- Allow using Regexp to match files for custom conversion options
|
9
|
+
|
10
|
+
## 0.1.0
|
11
|
+
|
12
|
+
- First release
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Middleman::Webp
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/middleman-webp.svg)](http://badge.fury.io/rb/middleman-webp)
|
4
|
+
[![Build Status](https://travis-ci.org/iiska/middleman-webp.svg?branch=master)](https://travis-ci.org/iiska/middleman-webp)
|
5
|
+
[![Coverage Status](https://img.shields.io/coveralls/iiska/middleman-webp.svg)](https://coveralls.io/r/iiska/middleman-webp?branch=master)
|
6
|
+
[![Dependency Status](https://gemnasium.com/iiska/middleman-webp.svg)](https://gemnasium.com/iiska/middleman-webp)
|
7
|
+
|
3
8
|
This is [Middleman][middleman] extension that generates WebP versions
|
4
9
|
of each image used in site during build.
|
5
10
|
|
@@ -23,9 +28,11 @@ details why I think using WebP matters.
|
|
23
28
|
Middleman-webp depends on cwep and gif2webp commandline tools, so
|
24
29
|
install those first for your system.
|
25
30
|
|
26
|
-
- Fedora: yum install libwebp-tools
|
27
|
-
- Ubuntu: apt-get install webp
|
28
|
-
- OS X: brew install webp
|
31
|
+
- Fedora: ```yum install libwebp-tools```
|
32
|
+
- Ubuntu: ```apt-get install webp```
|
33
|
+
- OS X: ```brew install webp```
|
34
|
+
- Or install from the Google's WebP site:
|
35
|
+
https://developers.google.com/speed/webp/download
|
29
36
|
|
30
37
|
Add this line to your Middleman site's Gemfile:
|
31
38
|
|
@@ -73,6 +80,17 @@ end
|
|
73
80
|
Ignore option accepts one or an array of String globs, Regexps or
|
74
81
|
Procs.
|
75
82
|
|
83
|
+
### Append the .webp extension instead of replacing the original extension
|
84
|
+
|
85
|
+
If you want the output images to be named **sample.png.webp**
|
86
|
+
instead of **sample.webp**, set the option `append_extension` to true.
|
87
|
+
|
88
|
+
``` ruby
|
89
|
+
activate :webp do |webp|
|
90
|
+
webp.append_extension = true
|
91
|
+
end
|
92
|
+
```
|
93
|
+
|
76
94
|
|
77
95
|
## Configuring your site to provide WebP alternatives
|
78
96
|
|
@@ -90,3 +108,7 @@ Look for [this example how to do it in .htaccess][htaccess].
|
|
90
108
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
91
109
|
4. Push to the branch (`git push origin my-new-feature`)
|
92
110
|
5. Create new Pull Request
|
111
|
+
|
112
|
+
## Contributors
|
113
|
+
|
114
|
+
- [Johannes Schleifenbaum](https://github.com/jojosch)
|
@@ -38,7 +38,8 @@ module Middleman
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def exec_convert_tool(src, dst)
|
41
|
-
|
41
|
+
cmd = "#{tool_for(src)} #{@options.for(src)} -quiet #{src} -o #{dst}"
|
42
|
+
@builder.run cmd, verbose: @options.verbose, capture: true
|
42
43
|
end
|
43
44
|
|
44
45
|
# Internal: Return proper tool command based on file type
|
@@ -78,7 +79,11 @@ module Middleman
|
|
78
79
|
end
|
79
80
|
|
80
81
|
def destination_path(src_path)
|
81
|
-
|
82
|
+
if @options.append_extension
|
83
|
+
dst_name = "#{src_path.basename.to_s}.webp"
|
84
|
+
else
|
85
|
+
dst_name = src_path.basename.to_s.gsub(SUFFIX_RE, 'webp')
|
86
|
+
end
|
82
87
|
src_path.parent.join(dst_name)
|
83
88
|
end
|
84
89
|
|
@@ -1,18 +1,45 @@
|
|
1
1
|
require 'middleman-core'
|
2
2
|
require 'middleman-webp/converter'
|
3
3
|
|
4
|
+
require 'shell'
|
5
|
+
|
4
6
|
module Middleman
|
5
7
|
class WebPExtension < Extension
|
6
8
|
option(:conversion_options, {},
|
7
9
|
'Custom conversion options for cwebp/gif2webp')
|
10
|
+
option(:append_extension, false,
|
11
|
+
'keep the original filename and extension and append .webp (image.png => image.png.webp)')
|
8
12
|
option(:ignore, [], 'Ignores files with matching paths')
|
13
|
+
option(:verbose, false, 'Display all external command which are executed '\
|
14
|
+
'to help debugging.')
|
15
|
+
|
9
16
|
def initialize(app, options_hash = {}, &block)
|
10
17
|
super
|
18
|
+
@app = app
|
19
|
+
end
|
11
20
|
|
12
|
-
|
21
|
+
def after_build(builder)
|
22
|
+
return unless dependencies_installed?(builder)
|
23
|
+
Middleman::WebP::Converter.new(@app, options, builder).convert
|
24
|
+
end
|
25
|
+
|
26
|
+
# Internal: Check that cwebp and gif2webp commandline tools are available.
|
27
|
+
#
|
28
|
+
# Returns true if all is OK.
|
29
|
+
def dependencies_installed?(builder)
|
30
|
+
sh = Shell.new
|
31
|
+
|
32
|
+
begin
|
33
|
+
sh.find_system_command('gif2webp')
|
34
|
+
rescue Shell::Error::CommandNotFound => e
|
35
|
+
builder.say_status :webp, "#{e.message} Please install latest version of webp library and tools to get gif2webp and be able to convert gif files also.", :red
|
36
|
+
end
|
13
37
|
|
14
|
-
|
15
|
-
|
38
|
+
begin
|
39
|
+
true if sh.find_system_command('cwebp')
|
40
|
+
rescue Shell::Error::CommandNotFound => e
|
41
|
+
builder.say_status :webp, "ERROR: #{e.message} Please install cwebp and gif2webp commandline tools first.", :red
|
42
|
+
false
|
16
43
|
end
|
17
44
|
end
|
18
45
|
end
|
@@ -3,7 +3,7 @@ require 'middleman-webp/pathname_matcher'
|
|
3
3
|
module Middleman
|
4
4
|
module WebP
|
5
5
|
class Options
|
6
|
-
attr_reader :ignore
|
6
|
+
attr_reader :ignore, :verbose, :append_extension
|
7
7
|
|
8
8
|
def initialize(options = {})
|
9
9
|
@ignore = options[:ignore] || []
|
@@ -16,6 +16,10 @@ module Middleman
|
|
16
16
|
h[Middleman::WebP::PathnameMatcher.new(k)] = to_args(v)
|
17
17
|
h
|
18
18
|
end
|
19
|
+
|
20
|
+
@verbose = options[:verbose] || false
|
21
|
+
|
22
|
+
@append_extension = options[:append_extension] || false
|
19
23
|
end
|
20
24
|
|
21
25
|
# Internal: Generate command line args for cwebp or gif2webp command
|
@@ -15,7 +15,7 @@ module Middleman
|
|
15
15
|
def matches?(path)
|
16
16
|
return false if path.nil?
|
17
17
|
|
18
|
-
send match_method, path
|
18
|
+
send match_method, Pathname.new(path)
|
19
19
|
end
|
20
20
|
|
21
21
|
private
|
@@ -32,15 +32,15 @@ module Middleman
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def matches_glob?(path)
|
35
|
-
|
35
|
+
path.fnmatch?(@pattern)
|
36
36
|
end
|
37
37
|
|
38
38
|
def matches_re?(path)
|
39
|
-
!@pattern.match(
|
39
|
+
!@pattern.match(path.to_s).nil?
|
40
40
|
end
|
41
41
|
|
42
42
|
def matches_proc?(path)
|
43
|
-
@pattern.call(
|
43
|
+
@pattern.call(path.to_s)
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
data/middleman-webp.gemspec
CHANGED
@@ -22,6 +22,6 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.5"
|
24
24
|
spec.add_development_dependency "rake"
|
25
|
-
spec.add_development_dependency "simplecov"
|
25
|
+
#spec.add_development_dependency "simplecov"
|
26
26
|
spec.add_development_dependency "mocha"
|
27
27
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
Binary file
|
Binary file
|
@@ -0,0 +1,99 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'middleman-core/cli'
|
3
|
+
require_relative '../../lib/middleman-webp/extension'
|
4
|
+
|
5
|
+
describe Middleman::WebPExtension do
|
6
|
+
before do
|
7
|
+
@builder = Middleman::Cli::Build.new
|
8
|
+
@builder.expects(:say_status).once.with do |action, msg, opts|
|
9
|
+
action == :webp and msg =~ /Total conversion savings/
|
10
|
+
end
|
11
|
+
@builder.stubs(:say_status).with do |action, msg, opts|
|
12
|
+
action == :webp and msg =~ /Please install latest version of webp/
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
after do
|
17
|
+
# Remove temporarily created files
|
18
|
+
Dir.glob('spec/fixtures/ok-build/**/*.webp').each do |file|
|
19
|
+
File.unlink(file)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe '#after_build' do
|
24
|
+
it 'generates WebP versions using external tools' do
|
25
|
+
app_mock = stub({
|
26
|
+
initialized: '',
|
27
|
+
instance_available: true,
|
28
|
+
after_configuration: nil,
|
29
|
+
after_build: nil,
|
30
|
+
inst: stub(build_dir: 'spec/fixtures/ok-build')
|
31
|
+
})
|
32
|
+
|
33
|
+
@builder.expects(:say_status).twice.with do |action, msg, opts|
|
34
|
+
action == :run and msg =~ /cwebp/
|
35
|
+
end
|
36
|
+
|
37
|
+
@builder.expects(:say_status).twice.with do |action, msg, opts|
|
38
|
+
action == :webp and msg =~ /\.webp \([0-9.]+ % smaller\)/
|
39
|
+
end
|
40
|
+
|
41
|
+
@extension = Middleman::WebPExtension.new(app_mock)
|
42
|
+
@extension.after_build(@builder)
|
43
|
+
|
44
|
+
Dir.glob('spec/fixtures/ok-build/**/*.webp').size.must_equal 2
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'shows errors if files couldn\'t be converted' do
|
48
|
+
app_mock = stub({
|
49
|
+
initialized: '',
|
50
|
+
instance_available: true,
|
51
|
+
after_configuration: nil,
|
52
|
+
after_build: nil,
|
53
|
+
inst: stub(build_dir: 'spec/fixtures/dummy-build')
|
54
|
+
})
|
55
|
+
|
56
|
+
Middleman::WebP::Converter.any_instance.
|
57
|
+
expects(:exec_convert_tool).times(3)
|
58
|
+
|
59
|
+
@builder.expects(:say_status).times(3).with do |action, msg, opts|
|
60
|
+
msg =~ /Converting .*empty\.(jpg|gif|png) failed/
|
61
|
+
end
|
62
|
+
|
63
|
+
@extension = Middleman::WebPExtension.new(app_mock)
|
64
|
+
@extension.after_build(@builder)
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'rejects file if it is larger than original' do
|
68
|
+
app_mock = stub({
|
69
|
+
initialized: '',
|
70
|
+
instance_available: true,
|
71
|
+
after_configuration: nil,
|
72
|
+
after_build: nil,
|
73
|
+
inst: stub(build_dir: 'spec/fixtures/dummy-build')
|
74
|
+
})
|
75
|
+
|
76
|
+
Middleman::WebP::Converter.any_instance.
|
77
|
+
expects(:exec_convert_tool).times(3).with do |src, dst|
|
78
|
+
if dst.to_s =~ /spec\/fixtures\/dummy-build\/.*webp$/
|
79
|
+
File.open(dst, 'w') do |f|
|
80
|
+
f << 'Making it larger than empty dummy original'
|
81
|
+
end
|
82
|
+
true
|
83
|
+
else
|
84
|
+
false
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
@builder.expects(:say_status).times(3).with do |action, msg, opts|
|
89
|
+
action == :webp and msg =~ /.*empty.webp skipped/
|
90
|
+
end
|
91
|
+
|
92
|
+
@extension = Middleman::WebPExtension.new(app_mock)
|
93
|
+
@extension.after_build(@builder)
|
94
|
+
|
95
|
+
Dir.glob('spec/fixtures/dummy-build/**/*.webp').size.must_equal 0
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
require 'mocha/mini_test'
|
3
|
-
|
4
1
|
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
|
+
|
4
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
5
|
+
SimpleCov::Formatter::HTMLFormatter,
|
6
|
+
Coveralls::SimpleCov::Formatter
|
7
|
+
]
|
5
8
|
SimpleCov.start do
|
6
9
|
add_filter '/spec/'
|
7
10
|
end
|
11
|
+
|
12
|
+
require 'minitest/autorun'
|
13
|
+
require 'mocha/mini_test'
|
data/spec/unit/converter_spec.rb
CHANGED
@@ -5,7 +5,7 @@ require_relative '../../lib/middleman-webp/converter'
|
|
5
5
|
|
6
6
|
describe Middleman::WebP::Converter do
|
7
7
|
before do
|
8
|
-
@app_mock = stub(inst: stub(build_dir: 'spec/fixtures'))
|
8
|
+
@app_mock = stub(inst: stub(build_dir: 'spec/fixtures/dummy-build'))
|
9
9
|
@converter = Middleman::WebP::Converter.new(@app_mock, {}, nil)
|
10
10
|
end
|
11
11
|
|
@@ -16,6 +16,17 @@ describe Middleman::WebP::Converter do
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
describe '#destination_path with append_extension = true' do
|
20
|
+
before do
|
21
|
+
@converter = Middleman::WebP::Converter.new(@app_mock, {append_extension: true}, nil)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'returns file name with same basename and webp suffix' do
|
25
|
+
d = @converter.destination_path(Pathname.new('build/images/sample.jpg'))
|
26
|
+
d.to_s.must_equal 'build/images/sample.jpg.webp'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
19
30
|
describe '#change_percentage' do
|
20
31
|
it 'returns how many percents smaller destination file is' do
|
21
32
|
@converter.change_percentage(10_000, 8746).must_equal '12.54 %'
|
@@ -68,7 +79,7 @@ describe Middleman::WebP::Converter do
|
|
68
79
|
ignore: [/jpg$/, '**/*.gif']
|
69
80
|
}, nil)
|
70
81
|
|
71
|
-
files_to_include = [Pathname.new('spec/fixtures/empty.png')]
|
82
|
+
files_to_include = [Pathname.new('spec/fixtures/dummy-build/empty.png')]
|
72
83
|
@converter.image_files.must_equal files_to_include
|
73
84
|
end
|
74
85
|
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
#require 'pathname'
|
3
|
+
#require 'middleman-core'
|
4
|
+
require_relative '../../lib/middleman-webp/extension'
|
5
|
+
|
6
|
+
describe Middleman::WebPExtension do
|
7
|
+
|
8
|
+
before do
|
9
|
+
#Middleman::Extension.any_instance.expects(:initialize).returns(true)
|
10
|
+
app_mock = stub({
|
11
|
+
initialized: '',
|
12
|
+
instance_available: true,
|
13
|
+
after_configuration: nil,
|
14
|
+
after_build: nil
|
15
|
+
})
|
16
|
+
@extension = Middleman::WebPExtension.new(app_mock)
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#dependencies_installed?' do
|
20
|
+
it 'returns true if required command line tools are found' do
|
21
|
+
Shell.any_instance.expects(:find_system_command).with('cwebp').returns('/usr/bin/cwebp')
|
22
|
+
Shell.any_instance.expects(:find_system_command).with('gif2webp').returns('/usr/bin/gif2webp')
|
23
|
+
|
24
|
+
@extension.dependencies_installed?(stub(say_status: '')).must_equal true
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'returns false and displays error if cwebp is missing' do
|
28
|
+
Shell.any_instance.expects(:find_system_command).with('cwebp').raises(Shell::Error::CommandNotFound)
|
29
|
+
Shell.any_instance.stubs(:find_system_command).with('gif2webp').returns('/usr/bin/gif2webp')
|
30
|
+
|
31
|
+
builder_mock = stub(:say_status)
|
32
|
+
builder_mock.stubs(:say_status).once
|
33
|
+
|
34
|
+
@extension.dependencies_installed?(builder_mock).must_equal false
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'displays error if only gif2webp is missing and returns still true' do
|
38
|
+
Shell.any_instance.expects(:find_system_command).with('gif2webp').raises(Shell::Error::CommandNotFound)
|
39
|
+
Shell.any_instance.stubs(:find_system_command).with('cwebp').returns('/usr/bin/cwebp')
|
40
|
+
|
41
|
+
builder_mock = stub(:say_status)
|
42
|
+
builder_mock.stubs(:say_status).once
|
43
|
+
|
44
|
+
@extension.dependencies_installed?(builder_mock).must_equal true
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
@@ -9,7 +9,7 @@ describe Middleman::WebP::PathnameMatcher do
|
|
9
9
|
files = [
|
10
10
|
'images/sample.jpg',
|
11
11
|
Pathname.new('images/another.jpg'),
|
12
|
-
File.new('spec/fixtures/empty.jpg')
|
12
|
+
File.new('spec/fixtures/dummy-build/empty.jpg')
|
13
13
|
]
|
14
14
|
|
15
15
|
patterns.each do |p|
|
@@ -26,7 +26,7 @@ describe Middleman::WebP::PathnameMatcher do
|
|
26
26
|
files = [
|
27
27
|
'images/sample.png',
|
28
28
|
Pathname.new('images/another.png'),
|
29
|
-
File.new('spec/fixtures/empty.png')
|
29
|
+
File.new('spec/fixtures/dummy-build/empty.png')
|
30
30
|
]
|
31
31
|
|
32
32
|
patterns.each do |p|
|
metadata
CHANGED
@@ -1,83 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-webp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juhamatti Niemelä
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.3.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.3.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.5'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
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
|
-
- - '>='
|
52
|
+
- - ">="
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: mocha
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
|
-
- -
|
59
|
+
- - ">="
|
74
60
|
- !ruby/object:Gem::Version
|
75
61
|
version: '0'
|
76
62
|
type: :development
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
|
-
- -
|
66
|
+
- - ">="
|
81
67
|
- !ruby/object:Gem::Version
|
82
68
|
version: '0'
|
83
69
|
description: Generate WebP versions of each image used in Middleman site during build.
|
@@ -87,7 +73,8 @@ executables: []
|
|
87
73
|
extensions: []
|
88
74
|
extra_rdoc_files: []
|
89
75
|
files:
|
90
|
-
- .gitignore
|
76
|
+
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
91
78
|
- CHANGELOG.md
|
92
79
|
- Gemfile
|
93
80
|
- LICENSE.txt
|
@@ -101,12 +88,16 @@ files:
|
|
101
88
|
- lib/middleman-webp/version.rb
|
102
89
|
- lib/middleman_extension.rb
|
103
90
|
- middleman-webp.gemspec
|
104
|
-
- spec/fixtures/directory/dummy.html
|
105
|
-
- spec/fixtures/directory/empty.gif
|
106
|
-
- spec/fixtures/empty.jpg
|
107
|
-
- spec/fixtures/empty.png
|
91
|
+
- spec/fixtures/dummy-build/directory/dummy.html
|
92
|
+
- spec/fixtures/dummy-build/directory/empty.gif
|
93
|
+
- spec/fixtures/dummy-build/empty.jpg
|
94
|
+
- spec/fixtures/dummy-build/empty.png
|
95
|
+
- spec/fixtures/ok-build/lizard.jpg
|
96
|
+
- spec/fixtures/ok-build/tux.png
|
97
|
+
- spec/integration/extension_spec.rb
|
108
98
|
- spec/spec_helper.rb
|
109
99
|
- spec/unit/converter_spec.rb
|
100
|
+
- spec/unit/extension_spec.rb
|
110
101
|
- spec/unit/options_spec.rb
|
111
102
|
- spec/unit/pathname_matcher_spec.rb
|
112
103
|
homepage: http://github.com/iiska/middleman-webp
|
@@ -119,27 +110,31 @@ require_paths:
|
|
119
110
|
- lib
|
120
111
|
required_ruby_version: !ruby/object:Gem::Requirement
|
121
112
|
requirements:
|
122
|
-
- -
|
113
|
+
- - ">="
|
123
114
|
- !ruby/object:Gem::Version
|
124
115
|
version: '0'
|
125
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
117
|
requirements:
|
127
|
-
- -
|
118
|
+
- - ">="
|
128
119
|
- !ruby/object:Gem::Version
|
129
120
|
version: '0'
|
130
121
|
requirements: []
|
131
122
|
rubyforge_project:
|
132
|
-
rubygems_version: 2.
|
123
|
+
rubygems_version: 2.2.2
|
133
124
|
signing_key:
|
134
125
|
specification_version: 4
|
135
126
|
summary: WebP image conversion for Middleman
|
136
127
|
test_files:
|
137
|
-
- spec/fixtures/directory/dummy.html
|
138
|
-
- spec/fixtures/directory/empty.gif
|
139
|
-
- spec/fixtures/empty.jpg
|
140
|
-
- spec/fixtures/empty.png
|
128
|
+
- spec/fixtures/dummy-build/directory/dummy.html
|
129
|
+
- spec/fixtures/dummy-build/directory/empty.gif
|
130
|
+
- spec/fixtures/dummy-build/empty.jpg
|
131
|
+
- spec/fixtures/dummy-build/empty.png
|
132
|
+
- spec/fixtures/ok-build/lizard.jpg
|
133
|
+
- spec/fixtures/ok-build/tux.png
|
134
|
+
- spec/integration/extension_spec.rb
|
141
135
|
- spec/spec_helper.rb
|
142
136
|
- spec/unit/converter_spec.rb
|
137
|
+
- spec/unit/extension_spec.rb
|
143
138
|
- spec/unit/options_spec.rb
|
144
139
|
- spec/unit/pathname_matcher_spec.rb
|
145
140
|
has_rdoc:
|