image8 0.3 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/image8.gemspec +1 -1
  2. data/lib/image8.rb +7 -0
  3. metadata +2 -1
data/image8.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "image8"
3
- s.version = "0.3"
3
+ s.version = "0.3.1"
4
4
  s.date = "2010-06-18"
5
5
  s.summary = "dynamic image resizing."
6
6
  s.email = "harry@vangberg.name"
data/lib/image8.rb CHANGED
@@ -10,6 +10,13 @@ class Image8 < Sinatra::Base
10
10
  register Sinatra::Async
11
11
 
12
12
  aget %r|/([0-9x]+)/(.*)| do |format, uri|
13
+ if uri.strip.empty?
14
+ status 404
15
+ body "No such image."
16
+ end
17
+
18
+ puts "uri: #{uri.inspect} - #{uri.class}"
19
+
13
20
  # This is retarded.
14
21
  if !request.query_string.empty?
15
22
  uri += "?#{request.query_string}"
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- version: "0.3"
8
+ - 1
9
+ version: 0.3.1
9
10
  platform: ruby
10
11
  authors:
11
12
  - Harry Vangberg