httpthumbnailer 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
data/bin/httpthumbnailer CHANGED
@@ -64,7 +64,7 @@ sinatra.get '/stats/images' do
64
64
  $thumbnailer.images.to_s
65
65
  end
66
66
 
67
- sinatra.put %r{/thumbnail/(.*)} do |specs|
67
+ sinatra.put %r{^/thumbnail/(.*)} do |specs|
68
68
  thumbnail_specs = ThumbnailSpecs.from_uri(specs)
69
69
  $thumbnailer.load(request.body) do |original_image_handler|
70
70
  status 200
@@ -77,7 +77,7 @@ Feature: Generating set of thumbnails with single PUT request
77
77
  And third part content type will be text/plain
78
78
  And there will be no leaked images
79
79
 
80
- Scenario: Reporitng of missing resource
80
+ Scenario: Reporitng of missing resource for GET
81
81
  When I do GET request http://localhost:3100/blah
82
82
  Then response status will be 404
83
83
  And response content type will be text/plain
@@ -86,6 +86,15 @@ Feature: Generating set of thumbnails with single PUT request
86
86
  Resource '/blah' not found
87
87
  """
88
88
 
89
+ Scenario: Reporitng of missing resource for PUT
90
+ When I do PUT request http://localhost:3100/blah/thumbnail/crop,0,0,PNG/fit,0,0,JPG/pad,0,0,JPEG
91
+ Then response status will be 404
92
+ And response content type will be text/plain
93
+ And response body will be CRLF endend lines
94
+ """
95
+ Resource '/blah/thumbnail/crop,0,0,PNG/fit,0,0,JPG/pad,0,0,JPEG' not found
96
+ """
97
+
89
98
  Scenario: Reporitng of unsupported media type
90
99
  Given test.txt file content as request body
91
100
  When I do PUT request http://localhost:3100/thumbnail/crop,128,128,PNG
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "httpthumbnailer"
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jakub Pastuszek"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httpthumbnailer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jakub Pastuszek