mugshot 0.6.3 → 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/mugshot.rb CHANGED
@@ -2,10 +2,13 @@
2
2
  require "active_support/core_ext"
3
3
 
4
4
  module Mugshot
5
+ autoload :MagickFactory, "mugshot/magick_factory"
5
6
  autoload :Image, "mugshot/image"
7
+
6
8
  autoload :Storage, "mugshot/storage"
7
9
  autoload :FSStorage, "mugshot/fs_storage"
8
- autoload :Application, "mugshot/application"
10
+ autoload :S3Storage, "mugshot/s3_storage"
9
11
  autoload :HTTPStorage, "mugshot/http_storage"
10
- autoload :MagickFactory, "mugshot/magick_factory"
12
+
13
+ autoload :Application, "mugshot/application"
11
14
  end
@@ -18,19 +18,12 @@ class Mugshot::FSStorage < Mugshot::Storage
18
18
  Mugshot::Image.new File.open(file)
19
19
  end
20
20
 
21
- protected
21
+ protected
22
22
 
23
23
  def initialize(root_path)
24
24
  @root_path = root_path
25
25
  FileUtils.mkdir_p(root_path)
26
26
  end
27
27
 
28
- def id_to_path(id)
29
- path = id.to_s.clone
30
- 4.times do |i|
31
- path = path.insert(3 + (i * 3) + i, '/')
32
- end
33
- path
34
- end
35
28
  end
36
29
 
@@ -0,0 +1,36 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'fog'
3
+
4
+ class Mugshot::S3Storage < Mugshot::Storage
5
+
6
+ HEADERS = {'x-amz-acl' => 'public-read'}
7
+
8
+ def write(bin)
9
+ id = asset_id
10
+ path = id_to_path(id)
11
+ @storage.put_object(@bucket_name, path, bin, HEADERS)
12
+ id
13
+ end
14
+
15
+ def read(id)
16
+ path = id_to_path(id)
17
+ Mugshot::Image.new(@storage.get_object(@bucket_name, path).body)
18
+ rescue Excon::Errors::NotFound
19
+ nil
20
+ end
21
+
22
+ protected
23
+
24
+ def initialize(opts)
25
+ opts.to_options!
26
+ opts.assert_valid_keys(:bucket_name, :access_key_id, :secret_access_key)
27
+
28
+ @bucket_name = opts[:bucket_name]
29
+
30
+ @storage = Fog::Storage.new(:provider => 'AWS', :aws_access_key_id => opts[:access_key_id], :aws_secret_access_key => opts[:secret_access_key])
31
+ @storage.put_bucket(@bucket_name)
32
+ end
33
+
34
+ end
35
+
36
+
@@ -12,4 +12,12 @@ protected
12
12
  UUID.generate :compact
13
13
  end
14
14
 
15
- end
15
+ def id_to_path(id)
16
+ path = id.to_s.clone
17
+ 14.times do |i|
18
+ path = path.insert(2 + (i * 2) + i, '/')
19
+ end
20
+ path
21
+ end
22
+
23
+ end
@@ -1,4 +1,4 @@
1
1
  module Mugshot
2
- VERSION = "0.6.3"
2
+ VERSION = "1.0.0.rc1"
3
3
  end
4
4
 
@@ -22,7 +22,7 @@ describe Mugshot::Application do
22
22
 
23
23
  get "/image_id/any_name.jpg"
24
24
  end
25
-
25
+
26
26
  it "should accept default value for background" do
27
27
  def app
28
28
  Mugshot::Application.new(:storage => @storage, :background => :blue)
@@ -33,7 +33,7 @@ describe Mugshot::Application do
33
33
  get "/image_id/any_name.jpg"
34
34
  end
35
35
  end
36
-
36
+
37
37
  describe "POST /" do
38
38
  it "should create image" do
39
39
  file_read = nil
@@ -60,7 +60,7 @@ describe Mugshot::Application do
60
60
  last_response.status.should == 405
61
61
  end
62
62
  end
63
-
63
+
64
64
  describe "GET /:ops/:ops_params/:id/:name.:format" do
65
65
  it "should perform operations on image" do
66
66
  @image.should_receive(:resize!).with("140x140")
@@ -102,7 +102,7 @@ describe Mugshot::Application do
102
102
  last_response.status.should == 400
103
103
  last_response.body.should be_empty
104
104
  end
105
-
105
+
106
106
  it "should halt 400 on URL with invalid operation/param pair" do
107
107
  get "/140x105/image_id/any_name.jpg"
108
108
 
@@ -110,23 +110,24 @@ describe Mugshot::Application do
110
110
  last_response.body.should be_empty
111
111
  end
112
112
  end
113
-
113
+
114
114
  describe "GET /" do
115
115
  it "should return ok as healthcheck" do
116
116
  get "/"
117
-
117
+
118
118
  last_response.should be_ok
119
119
  last_response.body.should == "ok"
120
120
  end
121
121
  end
122
122
 
123
- describe "before" do
123
+ describe "cache" do
124
124
  it "should cache response with max age of 1 day" do
125
- get "/"
125
+ @image.stub!(:to_blob).and_return("image data")
126
+ get "/crop/140x105/image_id/any_name.jpg"
126
127
  last_response.headers["Cache-Control"].should == "public, max-age=31557600"
127
128
  end
128
129
  end
129
-
130
+
130
131
  describe "configuration" do
131
132
  describe "cache duration" do
132
133
  it "should use the configured cache duration" do
@@ -134,11 +135,12 @@ describe Mugshot::Application do
134
135
  Mugshot::Application.new(:storage => @storage, :cache_duration => 3.days.to_i)
135
136
  end
136
137
 
137
- get "/"
138
+ @image.stub!(:to_blob).and_return("image data")
139
+ get "/crop/140x105/image_id/any_name.jpg"
138
140
  last_response.headers["Cache-Control"].should == "public, max-age=#{3.days.to_i}"
139
141
  end
140
142
  end
141
-
143
+
142
144
  describe "valid operations" do
143
145
  it "should allow a valid operation" do
144
146
  def app
@@ -146,12 +148,12 @@ describe Mugshot::Application do
146
148
  end
147
149
 
148
150
  @image.stub!(:to_blob).and_return("image data")
149
-
151
+
150
152
  get "/resize/200x100/image_id/any_name.jpg"
151
153
  last_response.should be_ok
152
154
  last_response.body.should == "image data"
153
155
  end
154
-
156
+
155
157
  it "should halt with a 400 (Bad Request) when an invalid operation is given" do
156
158
  def app
157
159
  Mugshot::Application.new(:storage => @storage, :valid_operations => ["crop", "resize"])
@@ -161,7 +163,7 @@ describe Mugshot::Application do
161
163
  last_response.status.should == 400
162
164
  end
163
165
  end
164
-
166
+
165
167
  describe "quality range" do
166
168
  it "should allow quality operations with values in the configured range" do
167
169
  def app
@@ -169,24 +171,24 @@ describe Mugshot::Application do
169
171
  end
170
172
 
171
173
  @image.stub!(:to_blob).and_return("image data")
172
-
174
+
173
175
  1.upto(200) do |quality|
174
176
  get "/quality/#{quality}/image_id/any_name.jpg"
175
177
  last_response.should be_ok
176
178
  last_response.body.should == "image data"
177
179
  end
178
180
  end
179
-
181
+
180
182
  it "should allow quality operations when no range is configured" do
181
183
  @image.stub!(:to_blob).and_return("image data")
182
-
184
+
183
185
  1.upto(300) do |quality|
184
186
  get "/quality/#{quality}/image_id/any_name.jpg"
185
187
  last_response.should be_ok
186
188
  last_response.body.should == "image data"
187
189
  end
188
190
  end
189
-
191
+
190
192
  it "should halt with a 400 (Bad Request) quality operations with values outside the configured range" do
191
193
  def app
192
194
  Mugshot::Application.new(:storage => @storage, :quality_range => 1..200)
@@ -194,17 +196,17 @@ describe Mugshot::Application do
194
196
 
195
197
  get "/quality/0/image_id/any_name.jpg"
196
198
  last_response.status.should == 400
197
-
199
+
198
200
  get "/quality/201/image_id/any_name.jpg"
199
201
  last_response.status.should == 400
200
202
  end
201
203
  end
202
-
204
+
203
205
  describe "allowed sizes" do
204
206
  def allowed_sizes
205
207
  ['640x480', '640x360', '480x360', '320x240']
206
208
  end
207
-
209
+
208
210
  %w{resize crop}.each do |operation|
209
211
  it "should allow #{operation} operations for configured values" do
210
212
  def app
@@ -212,28 +214,28 @@ describe Mugshot::Application do
212
214
  end
213
215
 
214
216
  @image.stub!(:to_blob).and_return("image data")
215
-
217
+
216
218
  allowed_sizes.each do |size|
217
219
  get "/#{operation}/#{size}/image_id/any_name.jpg"
218
220
  last_response.should be_ok
219
221
  last_response.body.should == "image data"
220
222
  end
221
223
  end
222
-
224
+
223
225
  it "should allow #{operation} operations when allowed sizes is not configured" do
224
226
  def app
225
227
  Mugshot::Application.new(:storage => @storage)
226
228
  end
227
229
 
228
230
  @image.stub!(:to_blob).and_return("image data")
229
-
231
+
230
232
  ['300x200', '400x250'].each do |size|
231
233
  get "/#{operation}/#{size}/image_id/any_name.jpg"
232
234
  last_response.should be_ok
233
235
  last_response.body.should == "image data"
234
236
  end
235
237
  end
236
-
238
+
237
239
  it "should halt with a 400 (Bad Request) #{operation} operations with a not allowed size" do
238
240
  def app
239
241
  Mugshot::Application.new(:storage => @storage, :allowed_sizes => allowed_sizes)
@@ -241,13 +243,13 @@ describe Mugshot::Application do
241
243
 
242
244
  get "/#{operation}/300x200/image_id/any_name.jpg"
243
245
  last_response.status.should == 400
244
-
246
+
245
247
  get "/#{operation}/480x300/image_id/any_name.jpg"
246
248
  last_response.status.should == 400
247
249
  end
248
250
  end
249
251
  end
250
-
252
+
251
253
  describe "allowed formats" do
252
254
  it "should allow valid formats" do
253
255
  def app
@@ -255,22 +257,22 @@ describe Mugshot::Application do
255
257
  end
256
258
 
257
259
  @image.stub!(:to_blob).and_return("image data")
258
-
260
+
259
261
  ["jpg", "png"].each do |format|
260
262
  get "/image_id/any_name.#{format}"
261
263
  last_response.should be_ok
262
264
  last_response.body.should == "image data"
263
265
  end
264
266
  end
265
-
267
+
266
268
  it "should allow any format when no allowed format is configured" do
267
269
  @image.stub!(:to_blob).and_return("image data")
268
-
270
+
269
271
  get "/image_id/any_name.tiff"
270
272
  last_response.should be_ok
271
273
  last_response.body.should == "image data"
272
274
  end
273
-
275
+
274
276
  it "should halt with a 400 (Bad Request) when an invalid format is given" do
275
277
  def app
276
278
  Mugshot::Application.new(:storage => @storage, :allowed_formats => ["jpg", "png"])
@@ -280,7 +282,7 @@ describe Mugshot::Application do
280
282
  last_response.status.should == 400
281
283
  end
282
284
  end
283
-
285
+
284
286
  describe "allowed names" do
285
287
  it "should allow valid names" do
286
288
  def app
@@ -288,22 +290,22 @@ describe Mugshot::Application do
288
290
  end
289
291
 
290
292
  @image.stub!(:to_blob).and_return("image data")
291
-
293
+
292
294
  ["some_name", "some_other_name"].each do |name|
293
295
  get "/image_id/#{name}.jpg"
294
296
  last_response.should be_ok
295
297
  last_response.body.should == "image data"
296
298
  end
297
299
  end
298
-
300
+
299
301
  it "should allow any name when no allowed name is configured" do
300
302
  @image.stub!(:to_blob).and_return("image data")
301
-
303
+
302
304
  get "/image_id/any_name.tiff"
303
305
  last_response.should be_ok
304
306
  last_response.body.should == "image data"
305
307
  end
306
-
308
+
307
309
  it "should halt with a 400 (Bad Request) when an invalid name is given" do
308
310
  def app
309
311
  Mugshot::Application.new(:storage => @storage, :allowed_names => ["some_name", "some_other_name"])
@@ -6,11 +6,6 @@ describe Mugshot::FSStorage do
6
6
  @fs = Mugshot::FSStorage.new("/tmp/mugshot/spec")
7
7
  end
8
8
 
9
- after :each do
10
- require 'fileutils'
11
- #FileUtils.rm_rf("/tmp/mugshot/spec")
12
- end
13
-
14
9
  it "should write an image to the filesystem and read it back" do
15
10
  bin = File.open("spec/files/test.jpg").read
16
11
 
@@ -26,8 +21,4 @@ describe Mugshot::FSStorage do
26
21
  it "should return nil when an image with the given id doesn't exist on the filesystem" do
27
22
  @fs.read('nonexistant-id').should be_nil
28
23
  end
29
-
30
- it "should convert an id to path with 4r levels of directories" do
31
- @fs.send(:id_to_path, "a9657a30c7df012c736512313b021ce1").should == "a96/57a/30c/7df/012c736512313b021ce1"
32
- end
33
24
  end
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
3
+ require 'fog'
4
+
5
+ describe Mugshot::S3Storage do
6
+ before :each do
7
+ Fog.mock!
8
+ @fs = Mugshot::S3Storage.new(:bucket_name => 'bucket_name', :access_key_id => 'access_key_id', :secret_access_key => 'secret_access_key')
9
+ @bin = File.open("spec/files/test.jpg").read
10
+ end
11
+
12
+ it "should write an image to the filesystem and read it back" do
13
+ image = Mugshot::Image.new(File.open("spec/files/test.jpg"))
14
+ Mugshot::Image.stub!(:new).and_return(image)
15
+
16
+ id = @fs.write(@bin)
17
+
18
+ image2 = @fs.read(id)
19
+ image2.should == image
20
+ end
21
+
22
+ it "should return nil when an image with the given id doesn't exist on the filesystem" do
23
+ @fs.read('nonexistant-id').should be_nil
24
+ end
25
+ end
@@ -0,0 +1,9 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
3
+
4
+ describe Mugshot::Storage do
5
+ it "should convert an id to path with 6 levels of directories" do
6
+ @fs = Mugshot::Storage.new
7
+ @fs.send(:id_to_path, "a9657a30c7df012c736512313b021ce1").should == "a9/65/7a/30/c7/df/012c736512313b021ce1"
8
+ end
9
+ end
metadata CHANGED
@@ -1,17 +1,12 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mugshot
3
- version: !ruby/object:Gem::Version
4
- hash: 1
5
- prerelease:
6
- segments:
7
- - 0
8
- - 6
9
- - 3
10
- version: 0.6.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.rc1
5
+ prerelease: 6
11
6
  platform: ruby
12
- authors:
13
- - "Cain\xC3\xA3 Nunes"
14
- - "Fabr\xC3\xADcio Lopes"
7
+ authors:
8
+ - Cainã Nunes
9
+ - Fabrício Lopes
15
10
  - Guilherme Cirne
16
11
  - Jose Peleteiro
17
12
  - Vicente Mundim
@@ -19,171 +14,135 @@ authors:
19
14
  autorequire:
20
15
  bindir: bin
21
16
  cert_chain: []
22
-
23
- date: 2011-04-25 00:00:00 -03:00
17
+ date: 2011-04-25 00:00:00.000000000 -03:00
24
18
  default_executable:
25
- dependencies:
26
- - !ruby/object:Gem::Dependency
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
27
21
  name: activesupport
28
- prerelease: false
29
- requirement: &id001 !ruby/object:Gem::Requirement
22
+ requirement: &70305760270860 !ruby/object:Gem::Requirement
30
23
  none: false
31
- requirements:
32
- - - ~>
33
- - !ruby/object:Gem::Version
34
- hash: 9
35
- segments:
36
- - 2
37
- - 3
38
- - 5
24
+ requirements:
25
+ - - ! '>='
26
+ - !ruby/object:Gem::Version
39
27
  version: 2.3.5
40
28
  type: :runtime
41
- version_requirements: *id001
42
- - !ruby/object:Gem::Dependency
43
- name: i18n
44
29
  prerelease: false
45
- requirement: &id002 !ruby/object:Gem::Requirement
30
+ version_requirements: *70305760270860
31
+ - !ruby/object:Gem::Dependency
32
+ name: i18n
33
+ requirement: &70305760270340 !ruby/object:Gem::Requirement
46
34
  none: false
47
- requirements:
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- hash: 11
51
- segments:
52
- - 0
53
- - 5
54
- - 0
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
55
38
  version: 0.5.0
56
39
  type: :runtime
57
- version_requirements: *id002
58
- - !ruby/object:Gem::Dependency
59
- name: rmagick
60
40
  prerelease: false
61
- requirement: &id003 !ruby/object:Gem::Requirement
41
+ version_requirements: *70305760270340
42
+ - !ruby/object:Gem::Dependency
43
+ name: rmagick
44
+ requirement: &70305766710800 !ruby/object:Gem::Requirement
62
45
  none: false
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- hash: 59
67
- segments:
68
- - 2
69
- - 12
70
- - 2
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
71
49
  version: 2.12.2
72
50
  type: :runtime
73
- version_requirements: *id003
74
- - !ruby/object:Gem::Dependency
75
- name: uuid
76
51
  prerelease: false
77
- requirement: &id004 !ruby/object:Gem::Requirement
52
+ version_requirements: *70305766710800
53
+ - !ruby/object:Gem::Dependency
54
+ name: uuid
55
+ requirement: &70305766710320 !ruby/object:Gem::Requirement
78
56
  none: false
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- hash: 11
83
- segments:
84
- - 2
85
- - 0
86
- - 2
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
87
60
  version: 2.0.2
88
61
  type: :runtime
89
- version_requirements: *id004
90
- - !ruby/object:Gem::Dependency
91
- name: blankslate
92
62
  prerelease: false
93
- requirement: &id005 !ruby/object:Gem::Requirement
63
+ version_requirements: *70305766710320
64
+ - !ruby/object:Gem::Dependency
65
+ name: blankslate
66
+ requirement: &70305766709840 !ruby/object:Gem::Requirement
94
67
  none: false
95
- requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- hash: 105
99
- segments:
100
- - 2
101
- - 1
102
- - 2
103
- - 3
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
104
71
  version: 2.1.2.3
105
72
  type: :runtime
106
- version_requirements: *id005
107
- - !ruby/object:Gem::Dependency
108
- name: sinatra
109
73
  prerelease: false
110
- requirement: &id006 !ruby/object:Gem::Requirement
74
+ version_requirements: *70305766709840
75
+ - !ruby/object:Gem::Dependency
76
+ name: sinatra
77
+ requirement: &70305766709360 !ruby/object:Gem::Requirement
111
78
  none: false
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- hash: 51
116
- segments:
117
- - 0
118
- - 9
119
- - 4
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
120
82
  version: 0.9.4
121
83
  type: :runtime
122
- version_requirements: *id006
123
- - !ruby/object:Gem::Dependency
124
- name: fakeweb
125
84
  prerelease: false
126
- requirement: &id007 !ruby/object:Gem::Requirement
85
+ version_requirements: *70305766709360
86
+ - !ruby/object:Gem::Dependency
87
+ name: fog
88
+ requirement: &70305766708880 !ruby/object:Gem::Requirement
127
89
  none: false
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- hash: 3
132
- segments:
133
- - 0
134
- version: "0"
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 0.7.2
94
+ type: :runtime
95
+ prerelease: false
96
+ version_requirements: *70305766708880
97
+ - !ruby/object:Gem::Dependency
98
+ name: fakeweb
99
+ requirement: &70305766708400 !ruby/object:Gem::Requirement
100
+ none: false
101
+ requirements:
102
+ - - ! '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
135
105
  type: :development
136
- version_requirements: *id007
137
- - !ruby/object:Gem::Dependency
138
- name: rspec
139
106
  prerelease: false
140
- requirement: &id008 !ruby/object:Gem::Requirement
107
+ version_requirements: *70305766708400
108
+ - !ruby/object:Gem::Dependency
109
+ name: rspec
110
+ requirement: &70305766707920 !ruby/object:Gem::Requirement
141
111
  none: false
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- hash: 3
146
- segments:
147
- - 2
148
- - 3
149
- - 0
112
+ requirements:
113
+ - - ! '>='
114
+ - !ruby/object:Gem::Version
150
115
  version: 2.3.0
151
116
  type: :development
152
- version_requirements: *id008
153
- - !ruby/object:Gem::Dependency
154
- name: cucumber
155
117
  prerelease: false
156
- requirement: &id009 !ruby/object:Gem::Requirement
118
+ version_requirements: *70305766707920
119
+ - !ruby/object:Gem::Dependency
120
+ name: cucumber
121
+ requirement: &70305766707440 !ruby/object:Gem::Requirement
157
122
  none: false
158
- requirements:
159
- - - ">="
160
- - !ruby/object:Gem::Version
161
- hash: 3
162
- segments:
163
- - 0
164
- - 6
165
- - 2
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
166
126
  version: 0.6.2
167
127
  type: :development
168
- version_requirements: *id009
169
- - !ruby/object:Gem::Dependency
170
- name: rack-test
171
128
  prerelease: false
172
- requirement: &id010 !ruby/object:Gem::Requirement
129
+ version_requirements: *70305766707440
130
+ - !ruby/object:Gem::Dependency
131
+ name: rack-test
132
+ requirement: &70305766706960 !ruby/object:Gem::Requirement
173
133
  none: false
174
- requirements:
175
- - - ">="
176
- - !ruby/object:Gem::Version
177
- hash: 9
178
- segments:
179
- - 0
180
- - 5
181
- - 1
134
+ requirements:
135
+ - - ! '>='
136
+ - !ruby/object:Gem::Version
182
137
  version: 0.5.1
183
138
  type: :development
184
- version_requirements: *id010
185
- description: "The basic idea of Mugshot is that you upload the largest/highest quality images possible. When retrieving the images you apply different operations to it such as: resizing, rounded corners, transparency and anything else we can think of!"
186
- email:
139
+ prerelease: false
140
+ version_requirements: *70305766706960
141
+ description: ! 'The basic idea of Mugshot is that you upload the largest/highest quality
142
+ images possible. When retrieving the images you apply different operations to it
143
+ such as: resizing, rounded corners, transparency and anything else we can think
144
+ of!'
145
+ email:
187
146
  - cainanunes@gmail.com
188
147
  - fabriciolopesvital@gmail.com
189
148
  - gcirne@gmail.com
@@ -191,13 +150,11 @@ email:
191
150
  - vicente.mundim@gmail.com
192
151
  - me@anselmoalves.com
193
152
  executables: []
194
-
195
153
  extensions: []
196
-
197
- extra_rdoc_files:
154
+ extra_rdoc_files:
198
155
  - LICENSE
199
156
  - README.md
200
- files:
157
+ files:
201
158
  - lib/mugshot.rb
202
159
  - lib/mugshot/application.rb
203
160
  - lib/mugshot/fs_storage.rb
@@ -205,6 +162,7 @@ files:
205
162
  - lib/mugshot/image.rb
206
163
  - lib/mugshot/magick_factory.rb
207
164
  - lib/mugshot/public/crossdomain.xml
165
+ - lib/mugshot/s3_storage.rb
208
166
  - lib/mugshot/storage.rb
209
167
  - lib/mugshot/version.rb
210
168
  - LICENSE
@@ -237,43 +195,37 @@ files:
237
195
  - spec/mugshot/http_storage_spec.rb
238
196
  - spec/mugshot/image_spec.rb
239
197
  - spec/mugshot/magick_factory_spec.rb
198
+ - spec/mugshot/s3_storage_spec.rb
199
+ - spec/mugshot/storage_spec.rb
240
200
  - spec/spec_helper.rb
241
201
  - spec/test.html
242
202
  has_rdoc: true
243
203
  homepage: http://mugshot.ws
244
204
  licenses: []
245
-
246
205
  post_install_message:
247
- rdoc_options:
206
+ rdoc_options:
248
207
  - --charset=UTF-8
249
- require_paths:
208
+ require_paths:
250
209
  - lib
251
- required_ruby_version: !ruby/object:Gem::Requirement
210
+ required_ruby_version: !ruby/object:Gem::Requirement
252
211
  none: false
253
- requirements:
254
- - - ">="
255
- - !ruby/object:Gem::Version
256
- hash: 3
257
- segments:
258
- - 0
259
- version: "0"
260
- required_rubygems_version: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ! '>='
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ required_rubygems_version: !ruby/object:Gem::Requirement
261
217
  none: false
262
- requirements:
263
- - - ">="
264
- - !ruby/object:Gem::Version
265
- hash: 3
266
- segments:
267
- - 0
268
- version: "0"
218
+ requirements:
219
+ - - ! '>'
220
+ - !ruby/object:Gem::Version
221
+ version: 1.3.1
269
222
  requirements: []
270
-
271
223
  rubyforge_project: mugshot
272
- rubygems_version: 1.5.2
224
+ rubygems_version: 1.6.2
273
225
  signing_key:
274
226
  specification_version: 3
275
227
  summary: Dead simple image server
276
- test_files:
228
+ test_files:
277
229
  - features/convert_image_format.feature
278
230
  - features/crop_image.feature
279
231
  - features/define_image_quality.feature
@@ -302,5 +254,7 @@ test_files:
302
254
  - spec/mugshot/http_storage_spec.rb
303
255
  - spec/mugshot/image_spec.rb
304
256
  - spec/mugshot/magick_factory_spec.rb
257
+ - spec/mugshot/s3_storage_spec.rb
258
+ - spec/mugshot/storage_spec.rb
305
259
  - spec/spec_helper.rb
306
260
  - spec/test.html