dragonfly 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of dragonfly might be problematic. Click here for more details.
- data/Gemfile +1 -1
- data/History.md +32 -0
- data/README.md +54 -32
- data/VERSION +1 -1
- data/dragonfly.gemspec +23 -21
- data/extra_docs/Configuration.md +0 -8
- data/extra_docs/DataStorage.md +13 -5
- data/extra_docs/ExampleUseCases.md +4 -1
- data/extra_docs/Heroku.md +14 -6
- data/extra_docs/Models.md +5 -1
- data/extra_docs/Rails3.md +1 -1
- data/extra_docs/URLs.md +8 -1
- data/lib/dragonfly.rb +7 -8
- data/lib/dragonfly/active_model_extensions/attachment.rb +37 -17
- data/lib/dragonfly/active_model_extensions/attachment_class_methods.rb +1 -1
- data/lib/dragonfly/active_model_extensions/validations.rb +53 -26
- data/lib/dragonfly/analyser.rb +1 -1
- data/lib/dragonfly/app.rb +1 -1
- data/lib/dragonfly/config/heroku.rb +7 -0
- data/lib/dragonfly/configurable.rb +19 -20
- data/lib/dragonfly/data_storage/couch_data_store.rb +2 -3
- data/lib/dragonfly/data_storage/file_data_store.rb +2 -9
- data/lib/dragonfly/data_storage/mongo_data_store.rb +1 -1
- data/lib/dragonfly/data_storage/s3data_store.rb +17 -10
- data/lib/dragonfly/function_manager.rb +4 -8
- data/lib/dragonfly/has_filename.rb +24 -0
- data/lib/dragonfly/image_magick/analyser.rb +1 -1
- data/lib/dragonfly/image_magick/generator.rb +1 -1
- data/lib/dragonfly/image_magick/processor.rb +5 -0
- data/lib/dragonfly/image_magick/utils.rb +1 -2
- data/lib/dragonfly/job.rb +52 -71
- data/lib/dragonfly/railtie.rb +1 -1
- data/lib/dragonfly/temp_object.rb +32 -14
- data/lib/dragonfly/url_attributes.rb +30 -0
- data/lib/dragonfly/url_mapper.rb +2 -2
- data/samples/DSC02119.JPG +0 -0
- data/samples/a.jp2 +0 -0
- data/samples/beach.jpg +0 -0
- data/spec/dragonfly/active_model_extensions/model_spec.rb +63 -40
- data/spec/dragonfly/active_model_extensions/spec_helper.rb +4 -0
- data/spec/dragonfly/app_spec.rb +11 -3
- data/spec/dragonfly/configurable_spec.rb +38 -20
- data/spec/dragonfly/data_storage/file_data_store_spec.rb +24 -36
- data/spec/dragonfly/data_storage/s3_data_store_spec.rb +21 -5
- data/spec/dragonfly/data_storage/shared_data_store_examples.rb +2 -2
- data/spec/dragonfly/has_filename_spec.rb +88 -0
- data/spec/dragonfly/image_magick/analyser_spec.rb +10 -0
- data/spec/dragonfly/image_magick/processor_spec.rb +11 -0
- data/spec/dragonfly/job_spec.rb +173 -167
- data/spec/dragonfly/temp_object_spec.rb +82 -10
- data/spec/dragonfly/url_attributes.rb +47 -0
- data/spec/dragonfly/url_mapper_spec.rb +9 -1
- data/spec/functional/model_urls_spec.rb +36 -1
- metadata +179 -250
- data/lib/dragonfly/core_ext/string.rb +0 -9
- data/lib/dragonfly/core_ext/symbol.rb +0 -9
- data/spec/dragonfly/core_ext/string_spec.rb +0 -17
- data/spec/dragonfly/core_ext/symbol_spec.rb +0 -17
@@ -143,6 +143,20 @@ describe Dragonfly::TempObject do
|
|
143
143
|
@temp_object.to_file(@filename)
|
144
144
|
File::Stat.new(@filename).mode.to_s(8).should =~ /644$/
|
145
145
|
end
|
146
|
+
it "should allow setting different permissions" do
|
147
|
+
@temp_object.to_file(@filename, :mode => 0755)
|
148
|
+
File::Stat.new(@filename).mode.to_s(8).should =~ /755$/
|
149
|
+
end
|
150
|
+
it "should create intermediate subdirs" do
|
151
|
+
filename = 'tmp/gog/mcgee'
|
152
|
+
@temp_object.to_file(filename)
|
153
|
+
File.exists?(filename).should be_true
|
154
|
+
FileUtils.rm_rf('tmp/gog')
|
155
|
+
end
|
156
|
+
it "should allow not creating intermediate subdirs" do
|
157
|
+
filename = 'tmp/gog/mcgee'
|
158
|
+
expect{ @temp_object.to_file(filename, :mkdirs => false) }.to raise_error()
|
159
|
+
end
|
146
160
|
end
|
147
161
|
|
148
162
|
end
|
@@ -156,16 +170,6 @@ describe Dragonfly::TempObject do
|
|
156
170
|
end
|
157
171
|
parts.last.bytesize.should <= 8192
|
158
172
|
end
|
159
|
-
it "should yield the number of bytes specified in the class configuration" do
|
160
|
-
klass = Class.new(Dragonfly::TempObject)
|
161
|
-
temp_object = new_temp_object(File.read(sample_path('round.gif')), klass)
|
162
|
-
klass.block_size = 3001
|
163
|
-
parts = get_parts(temp_object)
|
164
|
-
parts[0...-1].each do |part|
|
165
|
-
part.length.should == 3001
|
166
|
-
end
|
167
|
-
parts.last.length.should <= 3001
|
168
|
-
end
|
169
173
|
end
|
170
174
|
|
171
175
|
describe "closing" do
|
@@ -211,6 +215,11 @@ describe Dragonfly::TempObject do
|
|
211
215
|
temp_object.should_not_receive(:tempfile)
|
212
216
|
temp_object.each{}
|
213
217
|
end
|
218
|
+
|
219
|
+
it "should use set the file extension in path from the name" do
|
220
|
+
temp_object = Dragonfly::TempObject.new("hi", :name => 'dark.cloud')
|
221
|
+
temp_object.path.should =~ /\.cloud$/
|
222
|
+
end
|
214
223
|
end
|
215
224
|
|
216
225
|
describe "initializing from a tempfile" do
|
@@ -366,5 +375,68 @@ describe Dragonfly::TempObject do
|
|
366
375
|
temp_object.original_filename.should == 'round.gif'
|
367
376
|
end
|
368
377
|
end
|
378
|
+
|
379
|
+
describe "meta" do
|
380
|
+
it "should default to an empty hash" do
|
381
|
+
Dragonfly::TempObject.new('sdf').meta.should == {}
|
382
|
+
end
|
383
|
+
it "should allow setting on initialize" do
|
384
|
+
Dragonfly::TempObject.new('sdf', :dub => 'wub').meta.should == {:dub => 'wub'}
|
385
|
+
end
|
386
|
+
it "should allow setting" do
|
387
|
+
temp_object = Dragonfly::TempObject.new('boo')
|
388
|
+
temp_object.meta = {:far => 'gone'}
|
389
|
+
temp_object.meta.should == {:far => 'gone'}
|
390
|
+
end
|
391
|
+
end
|
392
|
+
|
393
|
+
describe "name" do
|
394
|
+
it "should default to nil" do
|
395
|
+
Dragonfly::TempObject.new("HELLO").name.should be_nil
|
396
|
+
end
|
397
|
+
it "should allow setting the name via the meta" do
|
398
|
+
Dragonfly::TempObject.new("HELLO", :name => 'gosh.pig').name.should == "gosh.pig"
|
399
|
+
end
|
400
|
+
it "should fallback to the original filename if not set" do
|
401
|
+
content = "HELLO"
|
402
|
+
content.should_receive(:original_filename).and_return("some.egg")
|
403
|
+
temp_object = Dragonfly::TempObject.new(content)
|
404
|
+
temp_object.name.should == "some.egg"
|
405
|
+
end
|
406
|
+
it "should prefer the specified name to the original filename" do
|
407
|
+
content = "HELLO"
|
408
|
+
content.stub!(:original_filename).and_return("brase.nose")
|
409
|
+
temp_object = Dragonfly::TempObject.new("HELLO", :name => 'some.gug')
|
410
|
+
temp_object.name.should == "some.gug"
|
411
|
+
end
|
412
|
+
it "should allow setting with a setter" do
|
413
|
+
temp_object = Dragonfly::TempObject.new("HELLO")
|
414
|
+
temp_object.name = 'bugs'
|
415
|
+
temp_object.name.should == "bugs"
|
416
|
+
end
|
417
|
+
end
|
418
|
+
|
419
|
+
describe "sanity check for using HasFilename" do
|
420
|
+
it "should act like Dragonfly::HasFilename" do
|
421
|
+
temp_object = Dragonfly::TempObject.new('h', :name => 'one.big.park')
|
422
|
+
temp_object.ext = 'smeagol'
|
423
|
+
temp_object.name.should == 'one.big.smeagol'
|
424
|
+
end
|
425
|
+
end
|
426
|
+
|
427
|
+
describe "unique_id" do
|
428
|
+
before(:each) do
|
429
|
+
@temp_object = Dragonfly::TempObject.new('hello')
|
430
|
+
end
|
431
|
+
it "should return a unique id" do
|
432
|
+
@temp_object.unique_id.should =~ /^\d+$/
|
433
|
+
end
|
434
|
+
it "should be unique" do
|
435
|
+
@temp_object.unique_id.should_not == Dragonfly::TempObject.new('hello').unique_id
|
436
|
+
end
|
437
|
+
it "should not change" do
|
438
|
+
@temp_object.unique_id.should == @temp_object.unique_id
|
439
|
+
end
|
440
|
+
end
|
369
441
|
|
370
442
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Dragonfly::UrlAttributes do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
@hash = Dragonfly::UrlAttributes.new
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "name" do
|
10
|
+
it "should default to nil" do
|
11
|
+
@hash.name.should be_nil
|
12
|
+
end
|
13
|
+
it "should return the name if set" do
|
14
|
+
@hash[:name] = 'long.pigs'
|
15
|
+
@hash.name.should == 'long.pigs'
|
16
|
+
end
|
17
|
+
it "should allow setting via an accessor" do
|
18
|
+
@hash.name = 'john.doe'
|
19
|
+
@hash[:name].should == 'john.doe'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "sanity check for use of HasFilename" do
|
24
|
+
it "should provide ext and basename" do
|
25
|
+
@hash.name = 'dog.leg'
|
26
|
+
@hash.basename.should == 'dog'
|
27
|
+
@hash.ext.should == 'leg'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "slice" do
|
32
|
+
it "should return a subset of the params" do
|
33
|
+
hash = Dragonfly::UrlAttributes[:a => 1, :b => 2, :c => 3]
|
34
|
+
hash.slice(:a, :b).should == {:a => 1, :b => 2}
|
35
|
+
end
|
36
|
+
it "should use the method instead of the param for basename" do
|
37
|
+
Dragonfly::UrlAttributes[:name => 'hello.ted'].slice(:basename).should == {:basename => 'hello'}
|
38
|
+
end
|
39
|
+
it "should use the method instead of the param for ext" do
|
40
|
+
Dragonfly::UrlAttributes[:name => 'hello.ted'].slice(:ext).should == {:ext => 'ted'}
|
41
|
+
end
|
42
|
+
it "should treat strings like symbols" do
|
43
|
+
Dragonfly::UrlAttributes[:yog => 'gurt', :john => 'doe'].slice('yog').should == {:yog => 'gurt'}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -65,6 +65,10 @@ describe Dragonfly::UrlMapper do
|
|
65
65
|
it "should call to_s on non-string values" do
|
66
66
|
@url_mapper.url_for('job' => 'asdf', 'size' => 500).should == '/media/asdf-500'
|
67
67
|
end
|
68
|
+
|
69
|
+
it "should url-escape funny characters" do
|
70
|
+
@url_mapper.url_for('job' => 'a#c').should == '/media/a%23c'
|
71
|
+
end
|
68
72
|
end
|
69
73
|
|
70
74
|
describe "params_for" do
|
@@ -84,6 +88,10 @@ describe Dragonfly::UrlMapper do
|
|
84
88
|
@url_mapper = Dragonfly::UrlMapper.new('/media/:doobie')
|
85
89
|
@url_mapper.params_for('/media/sd sdf jl£@$ sdf:_', 'job=goodun').should == {'job' => 'goodun', 'doobie' => 'sd sdf jl£@$ sdf:_'}
|
86
90
|
end
|
91
|
+
|
92
|
+
it "should correctly url-unescape funny characters" do
|
93
|
+
@url_mapper.params_for('/media/a%23c').should == {'job' => 'a#c'}
|
94
|
+
end
|
87
95
|
end
|
88
96
|
|
89
97
|
describe "matching urls with standard format /media/:job/:basename.:format" do
|
@@ -109,7 +117,7 @@ describe Dragonfly::UrlMapper do
|
|
109
117
|
'/media/asdf.egg' => {'job' => 'asdf', 'basename' => nil, 'format' => 'egg'},
|
110
118
|
'/media/asdf/stuff/egg' => nil,
|
111
119
|
'/media/asdf/stuff.dog.egg' => {'job' => 'asdf', 'basename' => 'stuff.dog', 'format' => 'egg'},
|
112
|
-
'/media/asdf/s=2
|
120
|
+
'/media/asdf/s=2%20-.d.e' => {'job' => 'asdf', 'basename' => 's=2 -.d', 'format' => 'e'},
|
113
121
|
'/media/asdf-40x40/stuff.egg' => nil
|
114
122
|
}.each do |path, params|
|
115
123
|
|
@@ -14,21 +14,41 @@ describe "model urls" do
|
|
14
14
|
before(:each) do
|
15
15
|
@app = test_app.configure do |c|
|
16
16
|
c.url_format = '/media/:job/:basename.:format'
|
17
|
+
c.analyser.add :some_analyser_method do |t|
|
18
|
+
53
|
19
|
+
end
|
20
|
+
c.processor.add :upcase do |t|
|
21
|
+
t.data.upcase
|
22
|
+
end
|
17
23
|
end
|
18
24
|
@app.define_macro(MyModel, :image_accessor)
|
19
25
|
Item.class_eval do
|
20
|
-
image_accessor :preview_image # has name etc.
|
26
|
+
image_accessor :preview_image # has name, some_analyser_method, etc.
|
21
27
|
image_accessor :other_image # doesn't have magic stuff
|
22
28
|
end
|
23
29
|
@item = Item.new
|
24
30
|
end
|
25
31
|
|
26
32
|
it "should include the name in the url if it has the magic attribute" do
|
33
|
+
@item.preview_image = new_tempfile
|
34
|
+
@item.save!
|
35
|
+
@item.preview_image.url.should =~ %r{^/media/\w+/hello\.txt$}
|
36
|
+
end
|
37
|
+
|
38
|
+
it "should still include the name in the url if it has the magic attribute on reload" do
|
27
39
|
@item.preview_image = new_tempfile
|
28
40
|
@item.save!
|
29
41
|
item = Item.find(@item.id)
|
30
42
|
item.preview_image.url.should =~ %r{^/media/\w+/hello\.txt$}
|
31
43
|
end
|
44
|
+
|
45
|
+
it "should work for other magic attributes in the url" do
|
46
|
+
@app.server.url_format = '/:job/:some_analyser_method'
|
47
|
+
@item.preview_image = new_tempfile
|
48
|
+
@item.save!
|
49
|
+
@item.preview_image.url.should =~ %r{^/\w+/53$}
|
50
|
+
Item.find(@item.id).preview_image.url.should =~ %r{^/\w+/53$}
|
51
|
+
end
|
32
52
|
|
33
53
|
it "should work without the name if the name magic attr doesn't exist" do
|
34
54
|
@item.other_image = new_tempfile
|
@@ -37,6 +57,13 @@ describe "model urls" do
|
|
37
57
|
item.other_image.url.should =~ %r{^/media/\w+$}
|
38
58
|
end
|
39
59
|
|
60
|
+
it "should not add the name when there's no magic attr, even if the name is set (for consistency)" do
|
61
|
+
@item.other_image = new_tempfile
|
62
|
+
@item.save!
|
63
|
+
@item.other_image.name = 'test.txt'
|
64
|
+
@item.other_image.url.should =~ %r{^/media/\w+$}
|
65
|
+
end
|
66
|
+
|
40
67
|
it "should include the name in the url even if it has no ext" do
|
41
68
|
@item.preview_image = new_tempfile("hello", 'hello')
|
42
69
|
@item.save!
|
@@ -82,4 +109,12 @@ describe "model urls" do
|
|
82
109
|
item = Item.find(@item.id)
|
83
110
|
item.preview_image.url.should =~ %r{^/img/\w+$}
|
84
111
|
end
|
112
|
+
|
113
|
+
it "should still get params from magic attributes even when chained" do
|
114
|
+
@item.preview_image = new_tempfile
|
115
|
+
@item.save!
|
116
|
+
item = Item.find(@item.id)
|
117
|
+
item.preview_image.process(:upcase).url.should =~ %r{^/media/\w+/hello\.txt$}
|
118
|
+
end
|
119
|
+
|
85
120
|
end
|
metadata
CHANGED
@@ -1,282 +1,213 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: dragonfly
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.9
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 9
|
9
|
-
- 8
|
10
|
-
version: 0.9.8
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Mark Evans
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
21
|
-
type: :runtime
|
22
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
23
|
-
none: false
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
hash: 3
|
28
|
-
segments:
|
29
|
-
- 0
|
30
|
-
version: "0"
|
31
|
-
version_requirements: *id001
|
12
|
+
date: 2011-12-30 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
32
15
|
name: rack
|
33
|
-
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
type: :development
|
36
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &2166406820 !ruby/object:Gem::Requirement
|
37
17
|
none: false
|
38
|
-
requirements:
|
39
|
-
- -
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
|
42
|
-
|
43
|
-
- 0
|
44
|
-
version: "0"
|
45
|
-
version_requirements: *id002
|
46
|
-
name: capybara
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
47
23
|
prerelease: false
|
48
|
-
|
24
|
+
version_requirements: *2166406820
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: capybara
|
27
|
+
requirement: &2166405800 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
49
33
|
type: :development
|
50
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *2166405800
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: cucumber
|
38
|
+
requirement: &2166404860 !ruby/object:Gem::Requirement
|
51
39
|
none: false
|
52
|
-
requirements:
|
40
|
+
requirements:
|
53
41
|
- - ~>
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
hash: 55
|
56
|
-
segments:
|
57
|
-
- 0
|
58
|
-
- 10
|
59
|
-
- 0
|
42
|
+
- !ruby/object:Gem::Version
|
60
43
|
version: 0.10.0
|
61
|
-
version_requirements: *id003
|
62
|
-
name: cucumber
|
63
|
-
prerelease: false
|
64
|
-
- !ruby/object:Gem::Dependency
|
65
44
|
type: :development
|
66
|
-
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *2166404860
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: cucumber-rails
|
49
|
+
requirement: &2166404060 !ruby/object:Gem::Requirement
|
67
50
|
none: false
|
68
|
-
requirements:
|
51
|
+
requirements:
|
69
52
|
- - ~>
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
hash: 15
|
72
|
-
segments:
|
73
|
-
- 0
|
74
|
-
- 5
|
75
|
-
- 2
|
53
|
+
- !ruby/object:Gem::Version
|
76
54
|
version: 0.5.2
|
77
|
-
version_requirements: *id004
|
78
|
-
name: cucumber-rails
|
79
|
-
prerelease: false
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
55
|
type: :development
|
82
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
84
|
-
requirements:
|
85
|
-
- - ">="
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
hash: 3
|
88
|
-
segments:
|
89
|
-
- 0
|
90
|
-
version: "0"
|
91
|
-
version_requirements: *id005
|
92
|
-
name: database_cleaner
|
93
56
|
prerelease: false
|
94
|
-
|
57
|
+
version_requirements: *2166404060
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: database_cleaner
|
60
|
+
requirement: &2166403120 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
95
66
|
type: :development
|
96
|
-
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *2166403120
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: jeweler
|
71
|
+
requirement: &2166402100 !ruby/object:Gem::Requirement
|
97
72
|
none: false
|
98
|
-
requirements:
|
73
|
+
requirements:
|
99
74
|
- - ~>
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
hash: 7
|
102
|
-
segments:
|
103
|
-
- 1
|
104
|
-
- 5
|
105
|
-
- 2
|
75
|
+
- !ruby/object:Gem::Version
|
106
76
|
version: 1.5.2
|
107
|
-
version_requirements: *id006
|
108
|
-
name: jeweler
|
109
|
-
prerelease: false
|
110
|
-
- !ruby/object:Gem::Dependency
|
111
77
|
type: :development
|
112
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
hash: 3
|
118
|
-
segments:
|
119
|
-
- 0
|
120
|
-
version: "0"
|
121
|
-
version_requirements: *id007
|
122
|
-
name: fog
|
123
78
|
prerelease: false
|
124
|
-
|
125
|
-
|
126
|
-
|
79
|
+
version_requirements: *2166402100
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: fog
|
82
|
+
requirement: &2166401160 !ruby/object:Gem::Requirement
|
127
83
|
none: false
|
128
|
-
requirements:
|
129
|
-
- -
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
|
132
|
-
|
133
|
-
- 0
|
134
|
-
version: "0"
|
135
|
-
version_requirements: *id008
|
136
|
-
name: mongo
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
type: :development
|
137
89
|
prerelease: false
|
138
|
-
|
90
|
+
version_requirements: *2166401160
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: mongo
|
93
|
+
requirement: &2166400320 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
139
99
|
type: :development
|
140
|
-
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *2166400320
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: couchrest
|
104
|
+
requirement: &2166399340 !ruby/object:Gem::Requirement
|
141
105
|
none: false
|
142
|
-
requirements:
|
106
|
+
requirements:
|
143
107
|
- - ~>
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
|
146
|
-
segments:
|
147
|
-
- 1
|
148
|
-
- 0
|
149
|
-
version: "1.0"
|
150
|
-
version_requirements: *id009
|
151
|
-
name: couchrest
|
152
|
-
prerelease: false
|
153
|
-
- !ruby/object:Gem::Dependency
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '1.0'
|
154
110
|
type: :development
|
155
|
-
requirement: &id010 !ruby/object:Gem::Requirement
|
156
|
-
none: false
|
157
|
-
requirements:
|
158
|
-
- - ">="
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
hash: 3
|
161
|
-
segments:
|
162
|
-
- 0
|
163
|
-
version: "0"
|
164
|
-
version_requirements: *id010
|
165
|
-
name: rack-cache
|
166
111
|
prerelease: false
|
167
|
-
|
112
|
+
version_requirements: *2166399340
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: rack-cache
|
115
|
+
requirement: &2166398460 !ruby/object:Gem::Requirement
|
116
|
+
none: false
|
117
|
+
requirements:
|
118
|
+
- - ! '>='
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
168
121
|
type: :development
|
169
|
-
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: *2166398460
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: rails
|
126
|
+
requirement: &2166397520 !ruby/object:Gem::Requirement
|
170
127
|
none: false
|
171
|
-
requirements:
|
128
|
+
requirements:
|
172
129
|
- - ~>
|
173
|
-
- !ruby/object:Gem::Version
|
174
|
-
hash: 3
|
175
|
-
segments:
|
176
|
-
- 3
|
177
|
-
- 1
|
178
|
-
- 0
|
130
|
+
- !ruby/object:Gem::Version
|
179
131
|
version: 3.1.0
|
180
|
-
version_requirements: *id011
|
181
|
-
name: rails
|
182
|
-
prerelease: false
|
183
|
-
- !ruby/object:Gem::Dependency
|
184
132
|
type: :development
|
185
|
-
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: *2166397520
|
135
|
+
- !ruby/object:Gem::Dependency
|
136
|
+
name: rspec
|
137
|
+
requirement: &2166396660 !ruby/object:Gem::Requirement
|
186
138
|
none: false
|
187
|
-
requirements:
|
139
|
+
requirements:
|
188
140
|
- - ~>
|
189
|
-
- !ruby/object:Gem::Version
|
190
|
-
|
191
|
-
segments:
|
192
|
-
- 2
|
193
|
-
- 5
|
194
|
-
version: "2.5"
|
195
|
-
version_requirements: *id012
|
196
|
-
name: rspec
|
197
|
-
prerelease: false
|
198
|
-
- !ruby/object:Gem::Dependency
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '2.5'
|
199
143
|
type: :development
|
200
|
-
requirement: &id013 !ruby/object:Gem::Requirement
|
201
|
-
none: false
|
202
|
-
requirements:
|
203
|
-
- - ">="
|
204
|
-
- !ruby/object:Gem::Version
|
205
|
-
hash: 3
|
206
|
-
segments:
|
207
|
-
- 0
|
208
|
-
version: "0"
|
209
|
-
version_requirements: *id013
|
210
|
-
name: webmock
|
211
144
|
prerelease: false
|
212
|
-
|
213
|
-
|
214
|
-
|
145
|
+
version_requirements: *2166396660
|
146
|
+
- !ruby/object:Gem::Dependency
|
147
|
+
name: webmock
|
148
|
+
requirement: &2166395620 !ruby/object:Gem::Requirement
|
215
149
|
none: false
|
216
|
-
requirements:
|
217
|
-
- -
|
218
|
-
- !ruby/object:Gem::Version
|
219
|
-
|
220
|
-
segments:
|
221
|
-
- 0
|
222
|
-
version: "0"
|
223
|
-
version_requirements: *id014
|
224
|
-
name: yard
|
225
|
-
prerelease: false
|
226
|
-
- !ruby/object:Gem::Dependency
|
150
|
+
requirements:
|
151
|
+
- - ! '>='
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
227
154
|
type: :development
|
228
|
-
requirement: &id015 !ruby/object:Gem::Requirement
|
229
|
-
none: false
|
230
|
-
requirements:
|
231
|
-
- - ">="
|
232
|
-
- !ruby/object:Gem::Version
|
233
|
-
hash: 3
|
234
|
-
segments:
|
235
|
-
- 0
|
236
|
-
version: "0"
|
237
|
-
version_requirements: *id015
|
238
|
-
name: bluecloth
|
239
155
|
prerelease: false
|
240
|
-
|
241
|
-
|
242
|
-
|
156
|
+
version_requirements: *2166395620
|
157
|
+
- !ruby/object:Gem::Dependency
|
158
|
+
name: yard
|
159
|
+
requirement: &2166394640 !ruby/object:Gem::Requirement
|
243
160
|
none: false
|
244
|
-
requirements:
|
245
|
-
- -
|
246
|
-
- !ruby/object:Gem::Version
|
247
|
-
|
248
|
-
|
249
|
-
- 0
|
250
|
-
version: "0"
|
251
|
-
version_requirements: *id016
|
252
|
-
name: bson_ext
|
161
|
+
requirements:
|
162
|
+
- - ! '>='
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
165
|
+
type: :development
|
253
166
|
prerelease: false
|
254
|
-
|
167
|
+
version_requirements: *2166394640
|
168
|
+
- !ruby/object:Gem::Dependency
|
169
|
+
name: bluecloth
|
170
|
+
requirement: &2166393680 !ruby/object:Gem::Requirement
|
171
|
+
none: false
|
172
|
+
requirements:
|
173
|
+
- - ! '>='
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: '0'
|
255
176
|
type: :development
|
256
|
-
|
177
|
+
prerelease: false
|
178
|
+
version_requirements: *2166393680
|
179
|
+
- !ruby/object:Gem::Dependency
|
180
|
+
name: bson_ext
|
181
|
+
requirement: &2166392920 !ruby/object:Gem::Requirement
|
257
182
|
none: false
|
258
|
-
requirements:
|
259
|
-
- -
|
260
|
-
- !ruby/object:Gem::Version
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
183
|
+
requirements:
|
184
|
+
- - ~>
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: 1.3.1
|
187
|
+
type: :development
|
188
|
+
prerelease: false
|
189
|
+
version_requirements: *2166392920
|
190
|
+
- !ruby/object:Gem::Dependency
|
266
191
|
name: sqlite3-ruby
|
192
|
+
requirement: &2166392240 !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
194
|
+
requirements:
|
195
|
+
- - ! '>='
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
version: '0'
|
198
|
+
type: :development
|
267
199
|
prerelease: false
|
268
|
-
|
269
|
-
|
270
|
-
|
200
|
+
version_requirements: *2166392240
|
201
|
+
description: ! "Dragonfly is a framework that enables on-the-fly processing for any
|
202
|
+
content type.\n It is especially suited to image handling. Its uses range from
|
203
|
+
image thumbnails to standard attachments to on-demand text generation."
|
271
204
|
email: mark@new-bamboo.co.uk
|
272
205
|
executables: []
|
273
|
-
|
274
206
|
extensions: []
|
275
|
-
|
276
|
-
extra_rdoc_files:
|
207
|
+
extra_rdoc_files:
|
277
208
|
- LICENSE
|
278
209
|
- README.md
|
279
|
-
files:
|
210
|
+
files:
|
280
211
|
- .rspec
|
281
212
|
- .yardopts
|
282
213
|
- Gemfile
|
@@ -348,8 +279,6 @@ files:
|
|
348
279
|
- lib/dragonfly/core_ext/array.rb
|
349
280
|
- lib/dragonfly/core_ext/hash.rb
|
350
281
|
- lib/dragonfly/core_ext/object.rb
|
351
|
-
- lib/dragonfly/core_ext/string.rb
|
352
|
-
- lib/dragonfly/core_ext/symbol.rb
|
353
282
|
- lib/dragonfly/data_storage.rb
|
354
283
|
- lib/dragonfly/data_storage/couch_data_store.rb
|
355
284
|
- lib/dragonfly/data_storage/file_data_store.rb
|
@@ -360,6 +289,7 @@ files:
|
|
360
289
|
- lib/dragonfly/function_manager.rb
|
361
290
|
- lib/dragonfly/generation/image_magick_generator.rb
|
362
291
|
- lib/dragonfly/generator.rb
|
292
|
+
- lib/dragonfly/has_filename.rb
|
363
293
|
- lib/dragonfly/hash_with_css_style_keys.rb
|
364
294
|
- lib/dragonfly/image_magick/analyser.rb
|
365
295
|
- lib/dragonfly/image_magick/config.rb
|
@@ -385,7 +315,11 @@ files:
|
|
385
315
|
- lib/dragonfly/shell.rb
|
386
316
|
- lib/dragonfly/simple_cache.rb
|
387
317
|
- lib/dragonfly/temp_object.rb
|
318
|
+
- lib/dragonfly/url_attributes.rb
|
388
319
|
- lib/dragonfly/url_mapper.rb
|
320
|
+
- samples/DSC02119.JPG
|
321
|
+
- samples/a.jp2
|
322
|
+
- samples/beach.jpg
|
389
323
|
- samples/beach.png
|
390
324
|
- samples/egg.png
|
391
325
|
- samples/round.gif
|
@@ -401,14 +335,13 @@ files:
|
|
401
335
|
- spec/dragonfly/cookie_monster_spec.rb
|
402
336
|
- spec/dragonfly/core_ext/array_spec.rb
|
403
337
|
- spec/dragonfly/core_ext/hash_spec.rb
|
404
|
-
- spec/dragonfly/core_ext/string_spec.rb
|
405
|
-
- spec/dragonfly/core_ext/symbol_spec.rb
|
406
338
|
- spec/dragonfly/data_storage/couch_data_store_spec.rb
|
407
339
|
- spec/dragonfly/data_storage/file_data_store_spec.rb
|
408
340
|
- spec/dragonfly/data_storage/mongo_data_store_spec.rb
|
409
341
|
- spec/dragonfly/data_storage/s3_data_store_spec.rb
|
410
342
|
- spec/dragonfly/data_storage/shared_data_store_examples.rb
|
411
343
|
- spec/dragonfly/function_manager_spec.rb
|
344
|
+
- spec/dragonfly/has_filename_spec.rb
|
412
345
|
- spec/dragonfly/hash_with_css_style_keys_spec.rb
|
413
346
|
- spec/dragonfly/image_magick/analyser_spec.rb
|
414
347
|
- spec/dragonfly/image_magick/encoder_spec.rb
|
@@ -426,6 +359,7 @@ files:
|
|
426
359
|
- spec/dragonfly/shell_spec.rb
|
427
360
|
- spec/dragonfly/simple_cache_spec.rb
|
428
361
|
- spec/dragonfly/temp_object_spec.rb
|
362
|
+
- spec/dragonfly/url_attributes.rb
|
429
363
|
- spec/dragonfly/url_mapper_spec.rb
|
430
364
|
- spec/functional/deprecations_spec.rb
|
431
365
|
- spec/functional/image_magick_app_spec.rb
|
@@ -446,39 +380,34 @@ files:
|
|
446
380
|
- yard/templates/default/module/html/configuration_summary.erb
|
447
381
|
- yard/templates/default/module/setup.rb
|
448
382
|
homepage: http://github.com/markevans/dragonfly
|
449
|
-
licenses:
|
383
|
+
licenses:
|
450
384
|
- MIT
|
451
385
|
post_install_message:
|
452
386
|
rdoc_options: []
|
453
|
-
|
454
|
-
require_paths:
|
387
|
+
require_paths:
|
455
388
|
- lib
|
456
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
389
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
457
390
|
none: false
|
458
|
-
requirements:
|
459
|
-
- -
|
460
|
-
- !ruby/object:Gem::Version
|
461
|
-
|
462
|
-
segments:
|
391
|
+
requirements:
|
392
|
+
- - ! '>='
|
393
|
+
- !ruby/object:Gem::Version
|
394
|
+
version: '0'
|
395
|
+
segments:
|
463
396
|
- 0
|
464
|
-
|
465
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
397
|
+
hash: 3133110676781217122
|
398
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
466
399
|
none: false
|
467
|
-
requirements:
|
468
|
-
- -
|
469
|
-
- !ruby/object:Gem::Version
|
470
|
-
|
471
|
-
segments:
|
472
|
-
- 0
|
473
|
-
version: "0"
|
400
|
+
requirements:
|
401
|
+
- - ! '>='
|
402
|
+
- !ruby/object:Gem::Version
|
403
|
+
version: '0'
|
474
404
|
requirements: []
|
475
|
-
|
476
405
|
rubyforge_project:
|
477
|
-
rubygems_version: 1.8.
|
406
|
+
rubygems_version: 1.8.10
|
478
407
|
signing_key:
|
479
408
|
specification_version: 3
|
480
409
|
summary: Ideal gem for handling attachments in Rails, Sinatra and Rack applications.
|
481
|
-
test_files:
|
410
|
+
test_files:
|
482
411
|
- spec/dragonfly/active_model_extensions/model_spec.rb
|
483
412
|
- spec/dragonfly/active_model_extensions/spec_helper.rb
|
484
413
|
- spec/dragonfly/analyser_spec.rb
|
@@ -488,14 +417,13 @@ test_files:
|
|
488
417
|
- spec/dragonfly/cookie_monster_spec.rb
|
489
418
|
- spec/dragonfly/core_ext/array_spec.rb
|
490
419
|
- spec/dragonfly/core_ext/hash_spec.rb
|
491
|
-
- spec/dragonfly/core_ext/string_spec.rb
|
492
|
-
- spec/dragonfly/core_ext/symbol_spec.rb
|
493
420
|
- spec/dragonfly/data_storage/couch_data_store_spec.rb
|
494
421
|
- spec/dragonfly/data_storage/file_data_store_spec.rb
|
495
422
|
- spec/dragonfly/data_storage/mongo_data_store_spec.rb
|
496
423
|
- spec/dragonfly/data_storage/s3_data_store_spec.rb
|
497
424
|
- spec/dragonfly/data_storage/shared_data_store_examples.rb
|
498
425
|
- spec/dragonfly/function_manager_spec.rb
|
426
|
+
- spec/dragonfly/has_filename_spec.rb
|
499
427
|
- spec/dragonfly/hash_with_css_style_keys_spec.rb
|
500
428
|
- spec/dragonfly/image_magick/analyser_spec.rb
|
501
429
|
- spec/dragonfly/image_magick/encoder_spec.rb
|
@@ -513,6 +441,7 @@ test_files:
|
|
513
441
|
- spec/dragonfly/shell_spec.rb
|
514
442
|
- spec/dragonfly/simple_cache_spec.rb
|
515
443
|
- spec/dragonfly/temp_object_spec.rb
|
444
|
+
- spec/dragonfly/url_attributes.rb
|
516
445
|
- spec/dragonfly/url_mapper_spec.rb
|
517
446
|
- spec/functional/deprecations_spec.rb
|
518
447
|
- spec/functional/image_magick_app_spec.rb
|