middleman-imageoptim 0.1.1 → 0.1.2
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.
- data/README.md +4 -1
- data/lib/middleman-imageoptim/optimizer.rb +2 -2
- data/lib/middleman-imageoptim/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Serving big images is fo numb-skulls! Compress and optimise your imagery during
|
|
|
16
16
|
Go set up the [image_optim](https://github.com/toy/image_optim) external utilities, then;
|
|
17
17
|
|
|
18
18
|
```ruby
|
|
19
|
-
gem "middleman-imageoptim", "~> 0.1.
|
|
19
|
+
gem "middleman-imageoptim", "~> 0.1.2"
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
@@ -56,6 +56,9 @@ end
|
|
|
56
56
|
|
|
57
57
|
## Changelog
|
|
58
58
|
|
|
59
|
+
##### `0.1.2`
|
|
60
|
+
- minor bugfix
|
|
61
|
+
|
|
59
62
|
##### `0.1.1`
|
|
60
63
|
- remove legacy requirement for padrino
|
|
61
64
|
|
|
@@ -95,13 +95,13 @@ module Middleman
|
|
|
95
95
|
if bytes.to_i < 1024
|
|
96
96
|
exponent = 0
|
|
97
97
|
else
|
|
98
|
-
max_exp =
|
|
98
|
+
max_exp = units.size - 1
|
|
99
99
|
exponent = (Math.log(bytes) / Math.log(1024)).to_i
|
|
100
100
|
exponent = max_exp if exponent > max_exp
|
|
101
101
|
bytes /= 1024 ** exponent
|
|
102
102
|
end
|
|
103
103
|
|
|
104
|
-
"#{bytes}#{
|
|
104
|
+
"#{bytes}#{units[exponent]}"
|
|
105
105
|
end
|
|
106
106
|
end
|
|
107
107
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: middleman-imageoptim
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -182,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
182
182
|
version: '0'
|
|
183
183
|
segments:
|
|
184
184
|
- 0
|
|
185
|
-
hash:
|
|
185
|
+
hash: 1383217631171886077
|
|
186
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
none: false
|
|
188
188
|
requirements:
|
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
191
191
|
version: '0'
|
|
192
192
|
segments:
|
|
193
193
|
- 0
|
|
194
|
-
hash:
|
|
194
|
+
hash: 1383217631171886077
|
|
195
195
|
requirements: []
|
|
196
196
|
rubyforge_project:
|
|
197
197
|
rubygems_version: 1.8.23
|