httpthumbnailer-client 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +10 -7
- data/Gemfile.lock +56 -49
- data/README.md +39 -15
- data/VERSION +1 -1
- data/bin/httpthumbnailer-client +73 -0
- data/httpthumbnailer-client.gemspec +38 -26
- data/lib/httpthumbnailer-client.rb +122 -48
- data/spec/httpthumbnailer-client_spec.rb +9 -138
- data/spec/spec_helper.rb +11 -4
- data/spec/{test-large.jpg → support/test-large.jpg} +0 -0
- data/spec/{test.jpg → support/test.jpg} +0 -0
- data/spec/{test.txt → support/test.txt} +0 -0
- data/spec/thumbnail_spec.rb +66 -0
- data/spec/thumbnails_spec.rb +110 -0
- data/spec/uri_builder_spec.rb +16 -0
- metadata +83 -32
- data/lib/httpthumbnailer-client/multipart_response.rb +0 -45
- data/spec/multipart_response_spec.rb +0 -95
@@ -1,147 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require 'httpthumbnailer-client'
|
4
|
-
|
5
|
-
describe HTTPThumbnailerClient::URIBuilder do
|
6
|
-
it "should allow building request for thumbnail set" do
|
7
|
-
HTTPThumbnailerClient::URIBuilder.thumbnail do
|
8
|
-
thumbnail 'crop', 16, 16, 'JPEG'
|
9
|
-
thumbnail 'pad', 32, 64, 'PNG', :magick => 'xdfa', :number => 2
|
10
|
-
end.should == '/thumbnail/crop,16,16,JPEG/pad,32,64,PNG,magick:xdfa,number:2'
|
11
|
-
end
|
12
|
-
end
|
1
|
+
require_relative 'spec_helper'
|
13
2
|
|
14
3
|
describe HTTPThumbnailerClient do
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
start_server(
|
20
|
-
"httpthumbnailer",
|
21
|
-
'/tmp/httpthumbnailer.pid',
|
22
|
-
log,
|
23
|
-
'http://localhost:3100/'
|
24
|
-
)
|
25
|
-
end
|
26
|
-
|
27
|
-
after :all do
|
28
|
-
stop_server('/tmp/httpthumbnailer.pid')
|
29
|
-
end
|
30
|
-
|
31
|
-
it "should return set of thumbnails matching specified specification" do
|
32
|
-
thumbs = HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((spec_dir + 'test.jpg').read) do
|
33
|
-
thumbnail 'crop', 6, 3, 'JPEG'
|
34
|
-
thumbnail 'crop', 8, 8, 'PNG'
|
35
|
-
thumbnail 'crop', 4, 4, 'PNG'
|
36
|
-
end
|
37
|
-
|
38
|
-
thumbs[0].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
39
|
-
thumbs[0].mime_type.should == 'image/jpeg'
|
40
|
-
i = identify(thumbs[0].data)
|
41
|
-
i.format.should == 'JPEG'
|
42
|
-
i.width.should == 6
|
43
|
-
i.height.should == 3
|
44
|
-
|
45
|
-
thumbs[1].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
46
|
-
thumbs[1].mime_type.should == 'image/png'
|
47
|
-
i = identify(thumbs[1].data)
|
48
|
-
i.format.should == 'PNG'
|
49
|
-
i.width.should == 8
|
50
|
-
i.height.should == 8
|
51
|
-
|
52
|
-
thumbs[2].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
53
|
-
thumbs[2].mime_type.should == 'image/png'
|
54
|
-
i = identify(thumbs[2].data)
|
55
|
-
i.format.should == 'PNG'
|
56
|
-
i.width.should == 4
|
57
|
-
i.height.should == 4
|
58
|
-
end
|
59
|
-
|
60
|
-
describe "meta data" do
|
61
|
-
it "should provide input image mime type" do
|
62
|
-
thumbs = HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((spec_dir + 'test.jpg').read) do
|
63
|
-
thumbnail 'crop', 6, 3, 'JPEG'
|
64
|
-
end
|
65
|
-
thumbs.input_mime_type.should == 'image/jpeg'
|
66
|
-
end
|
4
|
+
it 'should provide service URL that is set up to use' do
|
5
|
+
HTTPThumbnailerClient.new('http://123.213.213.231').server_url.should == 'http://123.213.213.231'
|
6
|
+
HTTPThumbnailerClient.new('http://123.213.213.1').server_url.should == 'http://123.213.213.1'
|
67
7
|
end
|
68
8
|
|
69
|
-
it
|
70
|
-
|
71
|
-
|
72
|
-
thumbnail 'crop', 6, 3, 'JPEG'
|
73
|
-
thumbnail 'crop', 8, 8, 'PNG'
|
74
|
-
end
|
75
|
-
}.should raise_error HTTPThumbnailerClient::UnsupportedMediaTypeError
|
9
|
+
it 'should provide keep alive setting' do
|
10
|
+
HTTPThumbnailerClient.new('http://123.213.213.231').keep_alive.should be_false
|
11
|
+
HTTPThumbnailerClient.new('http://123.213.213.231', keep_alive: true).keep_alive.should be_true
|
76
12
|
end
|
77
13
|
|
78
|
-
it
|
79
|
-
|
80
|
-
HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((spec_dir + 'test-large.jpg').read) do
|
81
|
-
thumbnail 'crop', 6, 3, 'JPEG'
|
82
|
-
thumbnail 'crop', 7000, 7000, 'PNG'
|
83
|
-
end
|
84
|
-
}.should raise_error HTTPThumbnailerClient::ImageTooLargeError
|
85
|
-
end
|
86
|
-
|
87
|
-
it "should raise HTTPThumbnailerClient::RemoteServerError error on 404 server error" do
|
88
|
-
lambda {
|
89
|
-
HTTPThumbnailerClient.new('http://localhost:3100/blah').thumbnail((spec_dir + 'test.jpg').read) do
|
90
|
-
thumbnail 'crop', 6, 3, 'JPEG'
|
91
|
-
end
|
92
|
-
}.should raise_error HTTPThumbnailerClient::RemoteServerError
|
93
|
-
end
|
94
|
-
|
95
|
-
it "should return HTTPThumbnailerClient::ThumbnailingError object with set of returned thumbnail in case of error with particluar thumbanil" do
|
96
|
-
thumbs = HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((spec_dir + 'test.jpg').read) do
|
97
|
-
thumbnail 'crop', 6, 3, 'JPEG'
|
98
|
-
thumbnail 'crop', 0, 0, 'PNG'
|
99
|
-
thumbnail 'crop', 4, 4, 'PNG'
|
100
|
-
end
|
101
|
-
|
102
|
-
thumbs[0].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
103
|
-
thumbs[0].mime_type.should == 'image/jpeg'
|
104
|
-
i = identify(thumbs[0].data)
|
105
|
-
i.format.should == 'JPEG'
|
106
|
-
i.width.should == 6
|
107
|
-
i.height.should == 3
|
108
|
-
|
109
|
-
thumbs[1].should be_kind_of HTTPThumbnailerClient::ThumbnailingError
|
110
|
-
thumbs[1].type.should == "ArgumentError"
|
111
|
-
thumbs[1].message.should == "Error: ArgumentError: invalid result dimension (0, 0 given)\n"
|
112
|
-
|
113
|
-
thumbs[2].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
114
|
-
thumbs[2].mime_type.should == 'image/png'
|
115
|
-
i = identify(thumbs[2].data)
|
116
|
-
i.format.should == 'PNG'
|
117
|
-
i.width.should == 4
|
118
|
-
i.height.should == 4
|
119
|
-
end
|
120
|
-
|
121
|
-
it "should return HTTPThumbnailerClient::ThumbnailingError object with set of returned thumbnail in case of memory exhaustion while thumbnailing" do
|
122
|
-
thumbs = HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((spec_dir + 'test.jpg').read) do
|
123
|
-
thumbnail 'crop', 6, 3, 'JPEG'
|
124
|
-
thumbnail 'crop', 16000, 16000, 'PNG'
|
125
|
-
thumbnail 'crop', 4, 4, 'PNG'
|
126
|
-
end
|
127
|
-
|
128
|
-
thumbs[0].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
129
|
-
thumbs[0].mime_type.should == 'image/jpeg'
|
130
|
-
i = identify(thumbs[0].data)
|
131
|
-
i.format.should == 'JPEG'
|
132
|
-
i.width.should == 6
|
133
|
-
i.height.should == 3
|
134
|
-
|
135
|
-
thumbs[1].should be_kind_of HTTPThumbnailerClient::ThumbnailingError
|
136
|
-
thumbs[1].type.should == "Thumbnailer::ImageTooLargeError"
|
137
|
-
thumbs[1].message.should =~ /^Error: Thumbnailer::ImageTooLargeError:/
|
138
|
-
|
139
|
-
thumbs[2].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
140
|
-
thumbs[2].mime_type.should == 'image/png'
|
141
|
-
i = identify(thumbs[2].data)
|
142
|
-
i.format.should == 'PNG'
|
143
|
-
i.width.should == 4
|
144
|
-
i.height.should == 4
|
14
|
+
it 'should provide nice inspect string' do
|
15
|
+
HTTPThumbnailerClient.new('http://123.213.213.231', keep_alive: true).inspect.should == '#<HTTPThumbnailerClient server_url="http://123.213.213.231" keep_alive=true>'
|
145
16
|
end
|
146
17
|
end
|
147
18
|
|
data/spec/spec_helper.rb
CHANGED
@@ -2,6 +2,8 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
2
2
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
3
|
require 'rspec'
|
4
4
|
|
5
|
+
require 'httpthumbnailer-client'
|
6
|
+
|
5
7
|
# Requires supporting files with custom matchers and macros, etc,
|
6
8
|
# in ./support/ and its subdirectories.
|
7
9
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
@@ -21,6 +23,10 @@ def spec_dir
|
|
21
23
|
gem_dir + 'spec'
|
22
24
|
end
|
23
25
|
|
26
|
+
def support_dir
|
27
|
+
spec_dir + 'support'
|
28
|
+
end
|
29
|
+
|
24
30
|
def identify(data)
|
25
31
|
image = Magick::Image.from_blob(data).first
|
26
32
|
out = Struct.new(:format, :width, :height).new(image.format, image.columns, image.rows)
|
@@ -33,20 +39,20 @@ def get(url)
|
|
33
39
|
end
|
34
40
|
|
35
41
|
def start_server(cmd, pid_file, log_file, test_url)
|
36
|
-
stop_server(pid_file)
|
37
|
-
|
38
42
|
fork do
|
39
43
|
Daemon.daemonize(pid_file, log_file)
|
44
|
+
log_file = Pathname.new(log_file)
|
45
|
+
log_file.truncate(0) if log_file.exist?
|
40
46
|
exec(cmd)
|
41
47
|
end
|
42
|
-
Process.
|
48
|
+
return unless Process.wait2.last.exitstatus == 0
|
43
49
|
|
44
50
|
ppid = Process.pid
|
45
51
|
at_exit do
|
46
52
|
stop_server(pid_file) if Process.pid == ppid
|
47
53
|
end
|
48
54
|
|
49
|
-
Timeout.timeout(
|
55
|
+
Timeout.timeout(6) do
|
50
56
|
begin
|
51
57
|
get test_url
|
52
58
|
rescue Errno::ECONNREFUSED
|
@@ -60,6 +66,7 @@ def stop_server(pid_file)
|
|
60
66
|
pid_file = Pathname.new(pid_file)
|
61
67
|
return unless pid_file.exist?
|
62
68
|
|
69
|
+
#STDERR.puts HTTPClient.new.get_content("http://localhost:3100/stats")
|
63
70
|
pid = pid_file.read.strip.to_i
|
64
71
|
|
65
72
|
Timeout.timeout(20) do
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe HTTPThumbnailerClient, 'single thumbnail API' do
|
4
|
+
before :all do
|
5
|
+
log = support_dir + 'server.log'
|
6
|
+
start_server(
|
7
|
+
"httpthumbnailer -f -d -l #{log}",
|
8
|
+
'/tmp/httpthumbnailer.pid',
|
9
|
+
log,
|
10
|
+
'http://localhost:3100/'
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
after :all do
|
15
|
+
stop_server('/tmp/httpthumbnailer.pid')
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should return single thumbnail matching specification' do
|
19
|
+
thumbnail = HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((support_dir + 'test.jpg').read, 'crop', 6, 3, 'jpeg')
|
20
|
+
|
21
|
+
thumbnail.should be_kind_of HTTPThumbnailerClient::Thumbnail
|
22
|
+
thumbnail.mime_type.should == 'image/jpeg'
|
23
|
+
i = identify(thumbnail.data)
|
24
|
+
i.format.should == 'JPEG'
|
25
|
+
i.width.should == 6
|
26
|
+
i.height.should == 3
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'meta data' do
|
30
|
+
it 'should provide input image mime type' do
|
31
|
+
thumbnail = HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((support_dir + 'test.jpg').read, 'crop', 6, 3, 'jpeg')
|
32
|
+
thumbnail.input_mime_type.should == 'image/jpeg'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'general error handling' do
|
37
|
+
it 'should raise HTTPThumbnailerClient::InvalidThumbnailSpecificationError error on bad request error' do
|
38
|
+
lambda {
|
39
|
+
HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((support_dir + 'test.jpg').read, 'crop', 0, 0, 'jpeg')
|
40
|
+
}.should raise_error HTTPThumbnailerClient::InvalidThumbnailSpecificationError
|
41
|
+
|
42
|
+
lambda {
|
43
|
+
HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((support_dir + 'test.jpg').read, 'blah', 4, 4, 'jpeg')
|
44
|
+
}.should raise_error HTTPThumbnailerClient::InvalidThumbnailSpecificationError
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'should raise HTTPThumbnailerClient::ServerResourceNotFoundError error on not found error' do
|
48
|
+
lambda {
|
49
|
+
HTTPThumbnailerClient.new('http://localhost:3100/blah').thumbnail((support_dir + 'test.jpg').read, 'crop', 6, 3, 'jpeg')
|
50
|
+
}.should raise_error HTTPThumbnailerClient::ServerResourceNotFoundError
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'should raise HTTPThumbnailerClient::UnsupportedMediaTypeError error on unsupported media type error' do
|
54
|
+
lambda {
|
55
|
+
HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((support_dir + 'test.txt').read, 'crop', 6, 3, 'jpeg')
|
56
|
+
}.should raise_error HTTPThumbnailerClient::UnsupportedMediaTypeError
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'should raise HTTPThumbnailerClient::ImageTooLargeError error on request entity too large error' do
|
60
|
+
lambda {
|
61
|
+
HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((support_dir + 'test-large.jpg').read, 'crop', 7000, 7000, 'png')
|
62
|
+
}.should raise_error HTTPThumbnailerClient::ImageTooLargeError
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
@@ -0,0 +1,110 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe HTTPThumbnailerClient, 'multipart API' do
|
4
|
+
before :all do
|
5
|
+
log = support_dir + 'server.log'
|
6
|
+
start_server(
|
7
|
+
"httpthumbnailer -f -d -l #{log}",
|
8
|
+
'/tmp/httpthumbnailer.pid',
|
9
|
+
log,
|
10
|
+
'http://localhost:3100/'
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
after :all do
|
15
|
+
stop_server('/tmp/httpthumbnailer.pid')
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should return set of thumbnails matching specifications' do
|
19
|
+
thumbs = HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((support_dir + 'test.jpg').read) do
|
20
|
+
thumbnail 'crop', 60, 30, 'jpeg'
|
21
|
+
thumbnail 'crop', 80, 80, 'png'
|
22
|
+
thumbnail 'crop', 40, 40, 'png'
|
23
|
+
end
|
24
|
+
|
25
|
+
thumbs[0].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
26
|
+
thumbs[0].mime_type.should == 'image/jpeg'
|
27
|
+
i = identify(thumbs[0].data)
|
28
|
+
i.format.should == 'JPEG'
|
29
|
+
i.width.should == 60
|
30
|
+
i.height.should == 30
|
31
|
+
|
32
|
+
thumbs[1].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
33
|
+
thumbs[1].mime_type.should == 'image/png'
|
34
|
+
i = identify(thumbs[1].data)
|
35
|
+
i.format.should == 'PNG'
|
36
|
+
i.width.should == 80
|
37
|
+
i.height.should == 80
|
38
|
+
|
39
|
+
thumbs[2].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
40
|
+
thumbs[2].mime_type.should == 'image/png'
|
41
|
+
i = identify(thumbs[2].data)
|
42
|
+
i.format.should == 'PNG'
|
43
|
+
i.width.should == 40
|
44
|
+
i.height.should == 40
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'meta data' do
|
48
|
+
it 'should provide input image mime type' do
|
49
|
+
thumbs = HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((support_dir + 'test.jpg').read) do
|
50
|
+
thumbnail 'crop', 6, 3, 'jpeg'
|
51
|
+
end
|
52
|
+
thumbs.input_mime_type.should == 'image/jpeg'
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe 'returns HTTPThumbnailerClient::HTTPThumbnailerClientError object within set of returned thumbnails' do
|
57
|
+
it 'in case of error with particluar thumbanil' do
|
58
|
+
thumbs = HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((support_dir + 'test.jpg').read) do
|
59
|
+
thumbnail 'crop', 6, 3, 'jpeg'
|
60
|
+
thumbnail 'crop', 0, 0, 'png'
|
61
|
+
thumbnail 'crop', 4, 4, 'png'
|
62
|
+
end
|
63
|
+
|
64
|
+
thumbs[0].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
65
|
+
thumbs[0].mime_type.should == 'image/jpeg'
|
66
|
+
i = identify(thumbs[0].data)
|
67
|
+
i.format.should == 'JPEG'
|
68
|
+
i.width.should == 6
|
69
|
+
i.height.should == 3
|
70
|
+
|
71
|
+
thumbs[1].should be_kind_of HTTPThumbnailerClient::HTTPThumbnailerClientError
|
72
|
+
thumbs[1].message.should =~ /^at least one image dimension is zero/
|
73
|
+
thumbs[1].status.should == 400
|
74
|
+
|
75
|
+
thumbs[2].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
76
|
+
thumbs[2].mime_type.should == 'image/png'
|
77
|
+
i = identify(thumbs[2].data)
|
78
|
+
i.format.should == 'PNG'
|
79
|
+
i.width.should == 4
|
80
|
+
i.height.should == 4
|
81
|
+
end
|
82
|
+
|
83
|
+
it 'in case of memory exhaustion while thumbnailing' do
|
84
|
+
thumbs = HTTPThumbnailerClient.new('http://localhost:3100').thumbnail((support_dir + 'test.jpg').read) do
|
85
|
+
thumbnail 'crop', 6, 3, 'jpeg'
|
86
|
+
thumbnail 'crop', 16000, 16000, 'png'
|
87
|
+
thumbnail 'crop', 4, 4, 'png'
|
88
|
+
end
|
89
|
+
|
90
|
+
thumbs[0].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
91
|
+
thumbs[0].mime_type.should == 'image/jpeg'
|
92
|
+
i = identify(thumbs[0].data)
|
93
|
+
i.format.should == 'JPEG'
|
94
|
+
i.width.should == 6
|
95
|
+
i.height.should == 3
|
96
|
+
|
97
|
+
thumbs[1].should be_kind_of HTTPThumbnailerClient::HTTPThumbnailerClientError
|
98
|
+
thumbs[1].message.should =~ /^image too large/
|
99
|
+
thumbs[1].status.should == 413
|
100
|
+
|
101
|
+
thumbs[2].should be_kind_of HTTPThumbnailerClient::Thumbnail
|
102
|
+
thumbs[2].mime_type.should == 'image/png'
|
103
|
+
i = identify(thumbs[2].data)
|
104
|
+
i.format.should == 'PNG'
|
105
|
+
i.width.should == 4
|
106
|
+
i.height.should == 4
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe HTTPThumbnailerClient::URIBuilder do
|
4
|
+
it 'should allow building request for single thumbnail' do
|
5
|
+
HTTPThumbnailerClient::URIBuilder.thumbnail('pad', 32, 64, 'png', magick: 'xdfa', number: 2)
|
6
|
+
.should == '/thumbnail/pad,32,64,png,magick:xdfa,number:2'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should allow building request for thumbnail set' do
|
10
|
+
HTTPThumbnailerClient::URIBuilder.thumbnails do
|
11
|
+
thumbnail 'crop', 16, 16, 'jpeg'
|
12
|
+
thumbnail 'pad', 32, 64, 'png', magick: 'xdfa', number: 2
|
13
|
+
end.should == '/thumbnails/crop,16,16,jpeg/pad,32,64,png,magick:xdfa,number:2'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httpthumbnailer-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-07-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httpclient
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '2.
|
21
|
+
version: '2.3'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,47 +26,47 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '2.
|
29
|
+
version: '2.3'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
31
|
+
name: cli
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
35
|
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
38
|
-
type: :
|
37
|
+
version: 1.1.0
|
38
|
+
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 1.1.0
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
47
|
+
name: multipart-parser
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
54
|
-
type: :
|
53
|
+
version: 0.1.1
|
54
|
+
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.1.1
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
63
|
+
name: rspec
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '2.13'
|
70
70
|
type: :development
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,15 +74,15 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
77
|
+
version: '2.13'
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
79
|
+
name: rspec-mocks
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
82
82
|
requirements:
|
83
83
|
- - ~>
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: '
|
85
|
+
version: '2.13'
|
86
86
|
type: :development
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -90,9 +90,9 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - ~>
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: '
|
93
|
+
version: '2.13'
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
|
-
name:
|
95
|
+
name: cucumber
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
@@ -107,6 +107,22 @@ dependencies:
|
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: jeweler
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.8.4
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 1.8.4
|
110
126
|
- !ruby/object:Gem::Dependency
|
111
127
|
name: rdoc
|
112
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,13 +156,13 @@ dependencies:
|
|
140
156
|
- !ruby/object:Gem::Version
|
141
157
|
version: '1'
|
142
158
|
- !ruby/object:Gem::Dependency
|
143
|
-
name:
|
159
|
+
name: rmagick
|
144
160
|
requirement: !ruby/object:Gem::Requirement
|
145
161
|
none: false
|
146
162
|
requirements:
|
147
163
|
- - ~>
|
148
164
|
- !ruby/object:Gem::Version
|
149
|
-
version: '
|
165
|
+
version: '2'
|
150
166
|
type: :development
|
151
167
|
prerelease: false
|
152
168
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -154,10 +170,43 @@ dependencies:
|
|
154
170
|
requirements:
|
155
171
|
- - ~>
|
156
172
|
- !ruby/object:Gem::Version
|
157
|
-
version: '
|
173
|
+
version: '2'
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: httpthumbnailer
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
178
|
+
requirements:
|
179
|
+
- - ! '>='
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
type: :development
|
183
|
+
prerelease: false
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ! '>='
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0'
|
190
|
+
- !ruby/object:Gem::Dependency
|
191
|
+
name: unicorn-cuba-base
|
192
|
+
requirement: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
194
|
+
requirements:
|
195
|
+
- - ! '>='
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
version: '0'
|
198
|
+
type: :development
|
199
|
+
prerelease: false
|
200
|
+
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
202
|
+
requirements:
|
203
|
+
- - ! '>='
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
158
206
|
description: Thumbnails images using httpthumbniler server
|
159
207
|
email: jpastuszek@gmail.com
|
160
|
-
executables:
|
208
|
+
executables:
|
209
|
+
- httpthumbnailer-client
|
161
210
|
extensions: []
|
162
211
|
extra_rdoc_files:
|
163
212
|
- LICENSE.txt
|
@@ -171,17 +220,19 @@ files:
|
|
171
220
|
- README.md
|
172
221
|
- Rakefile
|
173
222
|
- VERSION
|
223
|
+
- bin/httpthumbnailer-client
|
174
224
|
- features/step_definitions/httpthumbnailer-client_steps.rb
|
175
225
|
- features/support/env.rb
|
176
226
|
- httpthumbnailer-client.gemspec
|
177
227
|
- lib/httpthumbnailer-client.rb
|
178
|
-
- lib/httpthumbnailer-client/multipart_response.rb
|
179
228
|
- spec/httpthumbnailer-client_spec.rb
|
180
|
-
- spec/multipart_response_spec.rb
|
181
229
|
- spec/spec_helper.rb
|
182
|
-
- spec/test-large.jpg
|
183
|
-
- spec/test.jpg
|
184
|
-
- spec/test.txt
|
230
|
+
- spec/support/test-large.jpg
|
231
|
+
- spec/support/test.jpg
|
232
|
+
- spec/support/test.txt
|
233
|
+
- spec/thumbnail_spec.rb
|
234
|
+
- spec/thumbnails_spec.rb
|
235
|
+
- spec/uri_builder_spec.rb
|
185
236
|
homepage: http://github.com/jpastuszek/httpthumbnailer-client
|
186
237
|
licenses:
|
187
238
|
- MIT
|
@@ -197,7 +248,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
248
|
version: '0'
|
198
249
|
segments:
|
199
250
|
- 0
|
200
|
-
hash:
|
251
|
+
hash: 1060783674130423041
|
201
252
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
253
|
none: false
|
203
254
|
requirements:
|
@@ -206,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
257
|
version: '0'
|
207
258
|
requirements: []
|
208
259
|
rubyforge_project:
|
209
|
-
rubygems_version: 1.8.
|
260
|
+
rubygems_version: 1.8.25
|
210
261
|
signing_key:
|
211
262
|
specification_version: 3
|
212
263
|
summary: API client for httpthumbniler server
|