image8 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README +3 -0
- data/image8.gemspec +2 -2
- data/lib/image8.rb +4 -4
- metadata +4 -4
data/README
CHANGED
@@ -24,6 +24,9 @@ proportionality.
|
|
24
24
|
|
25
25
|
this has only been tested on ruby 1.9.1.
|
26
26
|
|
27
|
+
the name of the different functions (max, resize, crop) etc are
|
28
|
+
a bit misleading at the moment. will be fixed in the future.
|
29
|
+
|
27
30
|
image8 is released under the mit license. (c) 2010 harry vangberg
|
28
31
|
<harry@vangberg.name>, memolane <info@memolane.com>.
|
29
32
|
|
data/image8.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "image8"
|
3
|
-
s.version = "0.3.
|
4
|
-
s.date = "2010-
|
3
|
+
s.version = "0.3.7"
|
4
|
+
s.date = "2010-08-14"
|
5
5
|
s.summary = "dynamic image resizing."
|
6
6
|
s.email = "harry@vangberg.name"
|
7
7
|
s.homepage = "http://github.com/ichverstehe/image8"
|
data/lib/image8.rb
CHANGED
@@ -18,10 +18,10 @@ class Image8 < Sinatra::Base
|
|
18
18
|
|
19
19
|
if uri.strip.empty?
|
20
20
|
status 404
|
21
|
-
body "No such image."
|
21
|
+
body ["No such image."]
|
22
22
|
else
|
23
23
|
# This is retarded.
|
24
|
-
uri = append_query_string(uri)
|
24
|
+
uri = URI.encode append_query_string(uri)
|
25
25
|
doc = doc_uri(uri, format, action)
|
26
26
|
|
27
27
|
expires 31_536_000 # 1 year
|
@@ -29,7 +29,7 @@ class Image8 < Sinatra::Base
|
|
29
29
|
if request.response_header.status == 200
|
30
30
|
puts "Serving straight from cache.."
|
31
31
|
content_type request.response_header["CONTENT_TYPE"]
|
32
|
-
body
|
32
|
+
body [request.response]
|
33
33
|
else
|
34
34
|
original, rev = download_original(uri)
|
35
35
|
image = transform_image(original, action, format)
|
@@ -41,7 +41,7 @@ class Image8 < Sinatra::Base
|
|
41
41
|
:params => {:rev => rev}
|
42
42
|
)
|
43
43
|
content_type image.mime_type
|
44
|
-
body
|
44
|
+
body [image.to_blob]
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: image8
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 7
|
10
|
+
version: 0.3.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Harry Vangberg
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-08-14 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|