dimension 0.0.7 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/Rakefile +1 -2
- data/lib/dimension/middleware.rb +2 -3
- data/lib/dimension/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6dbae5607e9ccef2ba4b50a6697e302bfb4c5ff4
|
4
|
+
data.tar.gz: a56cd38125784d635281c3d49f81be1ae61191f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6085cd98dec84f39dd55e0fbf08b5ea1ec48fef4d81cd63a84962695f12f32a04b371aef9b5139da3f2a2bee14f3a1377a34477887a7169c75f85d7a17ecdb54
|
7
|
+
data.tar.gz: 43fea21b3300552b21a21288d3e69e2bdd18249b2c8375b68018efe8374bff9f9b65b0549222c60dcc3c285c9ec141d3f01fdffe604448f952686fd42caa4b95
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ Fast, simplified image resizing for Ruby. No ImageMagick.
|
|
14
14
|
Or generate and write file automatically.
|
15
15
|
|
16
16
|
``` rb
|
17
|
-
thumb = Dimension.
|
17
|
+
thumb = Dimension.open('tux.png')
|
18
18
|
thumb.generate!('100x300!') # will write file as 'tux-100x300.png'
|
19
19
|
```
|
20
20
|
|
@@ -41,7 +41,7 @@ You can also pass a block, which will ensure the original image is closed after
|
|
41
41
|
|
42
42
|
# Resizing geometries
|
43
43
|
|
44
|
-
This is taken directly from the excellent Dragonfly gem.
|
44
|
+
This is taken directly from the excellent [Dragonfly gem](http://markevans.github.io/dragonfly/imagemagick/#processors). The N/S/W/E gravities are not supported, though.
|
45
45
|
|
46
46
|
Author
|
47
47
|
======
|
data/Rakefile
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
require
|
2
|
-
Bundler::GemHelper.install_tasks
|
1
|
+
require "bundler/gem_tasks"
|
data/lib/dimension/middleware.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'dimension'
|
2
1
|
require 'rack/throttle'
|
3
2
|
|
4
3
|
module Dimension
|
@@ -19,7 +18,7 @@ module Dimension
|
|
19
18
|
|
20
19
|
def call(env)
|
21
20
|
url = env['PATH_INFO']
|
22
|
-
geometry = url[/-([0-9x:-]+)\.(png|gif|jpe?g)
|
21
|
+
geometry = url[/-([0-9x:-]+)\.(png|gif|jpe?g)/, 1]
|
23
22
|
|
24
23
|
return @app.call(env) unless geometry
|
25
24
|
|
@@ -49,4 +48,4 @@ module Dimension
|
|
49
48
|
|
50
49
|
end
|
51
50
|
|
52
|
-
end
|
51
|
+
end
|
data/lib/dimension/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dimension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomás Pollak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack-throttle
|