paperclip 2.5.2 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of paperclip might be problematic. Click here for more details.
- data/.gitignore +1 -0
- data/.travis.yml +1 -0
- data/ChangeLog +56 -6
- data/NEWS +12 -0
- data/lib/paperclip.rb +2 -1
- data/lib/paperclip/attachment_options.rb +10 -0
- data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +4 -4
- data/lib/paperclip/matchers/validate_attachment_presence_matcher.rb +7 -7
- data/lib/paperclip/matchers/validate_attachment_size_matcher.rb +4 -4
- data/lib/paperclip/railtie.rb +2 -2
- data/lib/paperclip/storage/filesystem.rb +7 -7
- data/lib/paperclip/storage/fog.rb +1 -0
- data/lib/paperclip/storage/s3.rb +4 -1
- data/lib/paperclip/version.rb +1 -1
- data/test/attachment_options_test.rb +40 -0
- data/test/helper.rb +6 -2
- data/test/integration_test.rb +0 -2
- data/test/matchers/validate_attachment_content_type_matcher_test.rb +23 -0
- data/test/matchers/validate_attachment_presence_matcher_test.rb +21 -0
- data/test/matchers/validate_attachment_size_matcher_test.rb +21 -0
- data/test/storage/filesystem_test.rb +6 -0
- data/test/storage/fog_test.rb +6 -0
- data/test/storage/s3_test.rb +7 -1
- metadata +62 -115
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/ChangeLog
CHANGED
@@ -1,12 +1,62 @@
|
|
1
|
+
2012-02-10 Mike Burns <mburns@thoughtbot.com>
|
2
|
+
|
3
|
+
* lib/paperclip/version.rb, ChangeLog, NEWS: Bump to 2.6.0.
|
4
|
+
|
5
|
+
2012-02-06 Kelley Reynolds <kelley@insidesystems.net>
|
6
|
+
|
7
|
+
* filesystem.rb (to_file), fog.rb (to_file), s3.rb (to_file): Rewind after
|
8
|
+
reading from the file.
|
9
|
+
* filesystem.rb (flush_writes): Replace mv and unlink complication with a
|
10
|
+
cp, since the unlink already happens elsewhere.
|
11
|
+
|
12
|
+
2012-02-03 Luke Griffiths <wlgriffiths@gmail.com>
|
13
|
+
|
14
|
+
* lib/paperclip.rb (has_attached_file), lib/paperclip/attachment_options.rb,
|
15
|
+
attachment_options_test.rb, test/helper.rb, paperclip_test.rb:
|
16
|
+
Introduce Paperclip::AttachmentOptions, a hash-like object that knows about
|
17
|
+
Paperclip-specific options, defaults, and deprecations.
|
18
|
+
|
19
|
+
2012-02-03 Jon Yurek <jyurek@thoughtbot.com>
|
20
|
+
|
21
|
+
* lib/paperclip/matchers/validate_attachment_content_type_matcher.rb
|
22
|
+
(matches?, type_allowed?),
|
23
|
+
lib/paperclip/matches/validate_attachment_presence_matcher.rb (matches?,
|
24
|
+
error_when_not_valid?, no_error_when_valid?),
|
25
|
+
lib/paperclip/matches/validate_attachment_size_matcher.rb (matches?,
|
26
|
+
passes_validation_with_size),
|
27
|
+
validate_attachment_content_type_matcher_test.rb,
|
28
|
+
validate_attachment_presence_matcher_test.rb,
|
29
|
+
validate_attachment_size_matcher_test.rb:
|
30
|
+
Validation matchers respect conditionals.
|
31
|
+
|
32
|
+
2012-02-01 Justin Ko <justin@kospecinc.com>
|
33
|
+
|
34
|
+
* lib/paperclip/railtie.rb (insert): Guard against the Rails constant not
|
35
|
+
existing.
|
36
|
+
|
1
37
|
2012-01-27 Prem Sichanugrist <psichanugrist@thoughtbot.com>
|
2
38
|
|
3
|
-
*
|
4
|
-
|
39
|
+
* lib/paperclip/attachment.rb (assign), attachment_test.rb,
|
40
|
+
filesystem_test.rb, s3_test.rb:
|
41
|
+
Introduce :restricted_characters in Paperclip::Attachment.default_options as
|
42
|
+
an overrideable blacklist of characters that will be replaced with an
|
43
|
+
underscore.
|
44
|
+
|
45
|
+
* lib/paperclip/version.rb: Bump to 2.5.2.
|
46
|
+
|
47
|
+
2012-01-27 Prem Sichanugrist <s@sikachu.com>
|
48
|
+
|
49
|
+
* test/storage/s3_live_test.rb, test/storage/s3_test.rb:
|
50
|
+
Remove the questionmark filename test, for Windows compatibility.
|
51
|
+
|
52
|
+
2012-01-19 Benjamin Hüttinger <huettinger@kupferwerk.com>
|
53
|
+
|
54
|
+
* lib/paperclip/storage/fog.rb: fog_host, fog_credentials, and fog_directory
|
55
|
+
can be Proc objects.
|
56
|
+
|
57
|
+
2012-01-27 Mike Burns <mburns@thoughtbot.com>
|
5
58
|
|
6
|
-
*
|
7
|
-
underscore. This is a more desired behavior against having to deal with URL
|
8
|
-
escaping and unescaping later. You can see the list of blacklist characters
|
9
|
-
in `lib/paperclip/attachment.rb`
|
59
|
+
* lib/paperclip/version.rb: Bump to 2.5.1.
|
10
60
|
|
11
61
|
2012-01-20 Jon Yurek <jyurek@thoughtbot.com>
|
12
62
|
|
data/NEWS
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
New in 2.6.0:
|
2
|
+
|
3
|
+
* Bug fix: Files are re-wound after reading.
|
4
|
+
* Feature: Remove Rails dependency from specs that need Paperclip.
|
5
|
+
* Feature: Validation matchers support conditionals.
|
6
|
+
|
7
|
+
New in 2.5.2:
|
8
|
+
|
9
|
+
* Bug fix: Can be installed on Windows.
|
10
|
+
* Feature: The Fog bucket name, authentication, and host can be determined at runtime via Proc.
|
11
|
+
* Feature: Special characters are replaced with underscores in #url and #path.
|
12
|
+
|
1
13
|
New in 2.5.1:
|
2
14
|
|
3
15
|
* Feature: After we've computed the content type, pass it to Fog.
|
data/lib/paperclip.rb
CHANGED
@@ -37,6 +37,7 @@ require 'paperclip/thumbnail'
|
|
37
37
|
require 'paperclip/interpolations'
|
38
38
|
require 'paperclip/style'
|
39
39
|
require 'paperclip/attachment'
|
40
|
+
require 'paperclip/attachment_options'
|
40
41
|
require 'paperclip/storage'
|
41
42
|
require 'paperclip/callback_compatibility'
|
42
43
|
require 'paperclip/missing_attachment_styles'
|
@@ -325,7 +326,7 @@ module Paperclip
|
|
325
326
|
self.attachment_definitions = self.attachment_definitions.dup
|
326
327
|
end
|
327
328
|
|
328
|
-
attachment_definitions[name] =
|
329
|
+
attachment_definitions[name] = Paperclip::AttachmentOptions.new(options)
|
329
330
|
Paperclip.classes_with_attachments << self.name
|
330
331
|
Paperclip.check_for_url_clash(name,attachment_definitions[name][:url],self.name)
|
331
332
|
|
@@ -33,7 +33,7 @@ module Paperclip
|
|
33
33
|
|
34
34
|
def matches? subject
|
35
35
|
@subject = subject
|
36
|
-
@subject = @subject.class
|
36
|
+
@subject = @subject.new if @subject.class == Class
|
37
37
|
@allowed_types && @rejected_types &&
|
38
38
|
allowed_types_allowed? && rejected_types_rejected?
|
39
39
|
end
|
@@ -63,9 +63,9 @@ module Paperclip
|
|
63
63
|
def type_allowed?(type)
|
64
64
|
file = StringIO.new(".")
|
65
65
|
file.content_type = type
|
66
|
-
|
67
|
-
subject.valid?
|
68
|
-
subject.errors[:"#{@attachment_name}_content_type"].blank?
|
66
|
+
@subject.attachment_for(@attachment_name).assign(file)
|
67
|
+
@subject.valid?
|
68
|
+
@subject.errors[:"#{@attachment_name}_content_type"].blank?
|
69
69
|
end
|
70
70
|
|
71
71
|
def allowed_types_allowed?
|
@@ -18,7 +18,7 @@ module Paperclip
|
|
18
18
|
|
19
19
|
def matches? subject
|
20
20
|
@subject = subject
|
21
|
-
@subject =
|
21
|
+
@subject = subject.new if subject.class == Class
|
22
22
|
error_when_not_valid? && no_error_when_valid?
|
23
23
|
end
|
24
24
|
|
@@ -37,16 +37,16 @@ module Paperclip
|
|
37
37
|
protected
|
38
38
|
|
39
39
|
def error_when_not_valid?
|
40
|
-
|
41
|
-
subject.valid?
|
42
|
-
not subject.errors[:"#{@attachment_name}_file_name"].blank?
|
40
|
+
@subject.send(@attachment_name).assign(nil)
|
41
|
+
@subject.valid?
|
42
|
+
not @subject.errors[:"#{@attachment_name}_file_name"].blank?
|
43
43
|
end
|
44
44
|
|
45
45
|
def no_error_when_valid?
|
46
46
|
@file = StringIO.new(".")
|
47
|
-
|
48
|
-
subject.valid?
|
49
|
-
subject.errors[:"#{@attachment_name}_file_name"].blank?
|
47
|
+
@subject.send(@attachment_name).assign(@file)
|
48
|
+
@subject.valid?
|
49
|
+
@subject.errors[:"#{@attachment_name}_file_name"].blank?
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
@@ -38,7 +38,7 @@ module Paperclip
|
|
38
38
|
|
39
39
|
def matches? subject
|
40
40
|
@subject = subject
|
41
|
-
@subject = @subject.class
|
41
|
+
@subject = @subject.new if @subject.class == Class
|
42
42
|
lower_than_low? && higher_than_low? && lower_than_high? && higher_than_high?
|
43
43
|
end
|
44
44
|
|
@@ -67,9 +67,9 @@ module Paperclip
|
|
67
67
|
override_method(file, :size){ new_size }
|
68
68
|
override_method(file, :to_tempfile){ file }
|
69
69
|
|
70
|
-
|
71
|
-
subject.valid?
|
72
|
-
subject.errors[:"#{@attachment_name}_file_size"].blank?
|
70
|
+
@subject.send(@attachment_name).assign(file)
|
71
|
+
@subject.valid?
|
72
|
+
@subject.errors[:"#{@attachment_name}_file_size"].blank?
|
73
73
|
end
|
74
74
|
|
75
75
|
def lower_than_low?
|
data/lib/paperclip/railtie.rb
CHANGED
@@ -18,8 +18,8 @@ module Paperclip
|
|
18
18
|
|
19
19
|
class Railtie
|
20
20
|
def self.insert
|
21
|
-
Paperclip.options[:logger] = Rails.logger
|
22
|
-
|
21
|
+
Paperclip.options[:logger] = Rails.logger if defined?(Rails)
|
22
|
+
|
23
23
|
if defined?(ActiveRecord)
|
24
24
|
ActiveRecord::Base.send(:include, Paperclip::Glue)
|
25
25
|
Paperclip.options[:logger] = ActiveRecord::Base.logger
|
@@ -30,7 +30,12 @@ module Paperclip
|
|
30
30
|
# Returns representation of the data of the file assigned to the given
|
31
31
|
# style, in the format most representative of the current storage.
|
32
32
|
def to_file style_name = default_style
|
33
|
-
@queued_for_write[style_name]
|
33
|
+
if @queued_for_write[style_name]
|
34
|
+
@queued_for_write[style_name].rewind
|
35
|
+
@queued_for_write[style_name]
|
36
|
+
elsif exists?(style_name)
|
37
|
+
File.new(path(style_name), 'rb')
|
38
|
+
end
|
34
39
|
end
|
35
40
|
|
36
41
|
def flush_writes #:nodoc:
|
@@ -38,12 +43,7 @@ module Paperclip
|
|
38
43
|
file.close
|
39
44
|
FileUtils.mkdir_p(File.dirname(path(style_name)))
|
40
45
|
log("saving #{path(style_name)}")
|
41
|
-
|
42
|
-
FileUtils.mv(file.path, path(style_name))
|
43
|
-
rescue SystemCallError
|
44
|
-
FileUtils.cp(file.path, path(style_name))
|
45
|
-
FileUtils.rm(file.path)
|
46
|
-
end
|
46
|
+
FileUtils.cp(file.path, path(style_name))
|
47
47
|
FileUtils.chmod(0666&~File.umask, path(style_name))
|
48
48
|
end
|
49
49
|
|
@@ -110,6 +110,7 @@ module Paperclip
|
|
110
110
|
# style, in the format most representative of the current storage.
|
111
111
|
def to_file(style = default_style)
|
112
112
|
if @queued_for_write[style]
|
113
|
+
@queued_for_write[style].rewind
|
113
114
|
@queued_for_write[style]
|
114
115
|
else
|
115
116
|
body = directory.files.get(path(style)).body
|
data/lib/paperclip/storage/s3.rb
CHANGED
@@ -257,7 +257,10 @@ module Paperclip
|
|
257
257
|
# Returns representation of the data of the file assigned to the given
|
258
258
|
# style, in the format most representative of the current storage.
|
259
259
|
def to_file style = default_style
|
260
|
-
|
260
|
+
if @queued_for_write[style]
|
261
|
+
@queued_for_write[style].rewind
|
262
|
+
return @queued_for_write[style]
|
263
|
+
end
|
261
264
|
filename = path(style)
|
262
265
|
extname = File.extname(filename)
|
263
266
|
basename = File.basename(filename, extname)
|
data/lib/paperclip/version.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
require './test/helper'
|
2
|
+
|
3
|
+
class AttachmentOptionsTest < Test::Unit::TestCase
|
4
|
+
should "be a Hash" do
|
5
|
+
assert_kind_of Hash, Paperclip::AttachmentOptions.new({})
|
6
|
+
end
|
7
|
+
|
8
|
+
should "add a default empty validations" do
|
9
|
+
options = {:arbi => :trary}
|
10
|
+
expected = {:validations => []}.merge(options)
|
11
|
+
actual = Paperclip::AttachmentOptions.new(options).to_hash
|
12
|
+
assert_equal expected, actual
|
13
|
+
end
|
14
|
+
|
15
|
+
should "not override validations if passed to initializer" do
|
16
|
+
options = {:validations => "something"}
|
17
|
+
attachment_options = Paperclip::AttachmentOptions.new(options)
|
18
|
+
assert_equal "something", attachment_options[:validations]
|
19
|
+
end
|
20
|
+
|
21
|
+
should "respond to []" do
|
22
|
+
assert Paperclip::AttachmentOptions.new({}).respond_to?(:[])
|
23
|
+
end
|
24
|
+
|
25
|
+
should "deliver the specified options through []" do
|
26
|
+
intended_options = {:specific_key => "specific value"}
|
27
|
+
attachment_options = Paperclip::AttachmentOptions.new(intended_options)
|
28
|
+
assert_equal "specific value", attachment_options[:specific_key]
|
29
|
+
end
|
30
|
+
|
31
|
+
should "respond to []=" do
|
32
|
+
assert Paperclip::AttachmentOptions.new({}).respond_to?(:[]=)
|
33
|
+
end
|
34
|
+
|
35
|
+
should "remember options set with []=" do
|
36
|
+
attachment_options = Paperclip::AttachmentOptions.new({})
|
37
|
+
attachment_options[:foo] = "bar"
|
38
|
+
assert_equal "bar", attachment_options[:foo]
|
39
|
+
end
|
40
|
+
end
|
data/test/helper.rb
CHANGED
@@ -54,10 +54,14 @@ ActiveRecord::Base.logger = ActiveSupport::BufferedLogger.new(File.dirname(__FIL
|
|
54
54
|
ActiveRecord::Base.establish_connection(config['test'])
|
55
55
|
Paperclip.options[:logger] = ActiveRecord::Base.logger
|
56
56
|
|
57
|
-
|
58
|
-
|
57
|
+
def require_everything_in_directory(directory_name)
|
58
|
+
Dir[File.join(File.dirname(__FILE__), directory_name, '*')].each do |f|
|
59
|
+
require f
|
60
|
+
end
|
59
61
|
end
|
60
62
|
|
63
|
+
require_everything_in_directory('support')
|
64
|
+
|
61
65
|
def reset_class class_name
|
62
66
|
ActiveRecord::Base.send(:include, Paperclip::Glue)
|
63
67
|
Object.send(:remove_const, class_name) rescue nil
|
data/test/integration_test.rb
CHANGED
@@ -83,5 +83,28 @@ class ValidateAttachmentContentTypeMatcherTest < Test::Unit::TestCase
|
|
83
83
|
|
84
84
|
should_reject_dummy_class
|
85
85
|
end
|
86
|
+
|
87
|
+
context "using an :if to control the validation" do
|
88
|
+
setup do
|
89
|
+
@dummy_class.class_eval do
|
90
|
+
validates_attachment_content_type :avatar, :content_type => %r{image/*} , :if => :go
|
91
|
+
attr_accessor :go
|
92
|
+
end
|
93
|
+
@matcher = self.class.validate_attachment_content_type(:avatar).
|
94
|
+
allowing(%w(image/png image/jpeg)).
|
95
|
+
rejecting(%w(audio/mp3 application/octet-stream))
|
96
|
+
@dummy = @dummy_class.new
|
97
|
+
end
|
98
|
+
|
99
|
+
should "run the validation if the control is true" do
|
100
|
+
@dummy.go = true
|
101
|
+
assert_accepts @matcher, @dummy
|
102
|
+
end
|
103
|
+
|
104
|
+
should "not run the validation if the control is false" do
|
105
|
+
@dummy.go = false
|
106
|
+
assert_rejects @matcher, @dummy
|
107
|
+
end
|
108
|
+
end
|
86
109
|
end
|
87
110
|
end
|
@@ -22,5 +22,26 @@ class ValidateAttachmentPresenceMatcherTest < Test::Unit::TestCase
|
|
22
22
|
|
23
23
|
should_accept_dummy_class
|
24
24
|
end
|
25
|
+
|
26
|
+
context "using an :if to control the validation" do
|
27
|
+
setup do
|
28
|
+
@dummy_class.class_eval do
|
29
|
+
validates_attachment_presence :avatar, :if => :go
|
30
|
+
attr_accessor :go
|
31
|
+
end
|
32
|
+
@dummy = @dummy_class.new
|
33
|
+
@dummy.avatar = nil
|
34
|
+
end
|
35
|
+
|
36
|
+
should "run the validation if the control is true" do
|
37
|
+
@dummy.go = true
|
38
|
+
assert_accepts @matcher, @dummy
|
39
|
+
end
|
40
|
+
|
41
|
+
should "not run the validation if the control is false" do
|
42
|
+
@dummy.go = false
|
43
|
+
assert_rejects @matcher, @dummy
|
44
|
+
end
|
45
|
+
end
|
25
46
|
end
|
26
47
|
end
|
@@ -47,5 +47,26 @@ class ValidateAttachmentSizeMatcherTest < Test::Unit::TestCase
|
|
47
47
|
should_accept_dummy_class
|
48
48
|
end
|
49
49
|
end
|
50
|
+
|
51
|
+
context "using an :if to control the validation" do
|
52
|
+
setup do
|
53
|
+
@dummy_class.class_eval do
|
54
|
+
validates_attachment_size :avatar, :greater_than => 1024, :if => :go
|
55
|
+
attr_accessor :go
|
56
|
+
end
|
57
|
+
@dummy = @dummy_class.new
|
58
|
+
@matcher = self.class.validate_attachment_size(:avatar).greater_than(1024)
|
59
|
+
end
|
60
|
+
|
61
|
+
should "run the validation if the control is true" do
|
62
|
+
@dummy.go = true
|
63
|
+
assert_accepts @matcher, @dummy
|
64
|
+
end
|
65
|
+
|
66
|
+
should "not run the validation if the control is false" do
|
67
|
+
@dummy.go = false
|
68
|
+
assert_rejects @matcher, @dummy
|
69
|
+
end
|
70
|
+
end
|
50
71
|
end
|
51
72
|
end
|
@@ -31,6 +31,12 @@ class FileSystemTest < Test::Unit::TestCase
|
|
31
31
|
@dummy.save!
|
32
32
|
end
|
33
33
|
|
34
|
+
should "always be rewound when returning from #to_file" do
|
35
|
+
assert_equal 0, @dummy.avatar.to_file.pos
|
36
|
+
@dummy.avatar.to_file.seek(10)
|
37
|
+
assert_equal 0, @dummy.avatar.to_file.pos
|
38
|
+
end
|
39
|
+
|
34
40
|
context "with file that has space in file name" do
|
35
41
|
setup do
|
36
42
|
rebuild_model :styles => { :thumbnail => "25x25#" }
|
data/test/storage/fog_test.rb
CHANGED
@@ -110,6 +110,12 @@ class FogTest < Test::Unit::TestCase
|
|
110
110
|
directory.destroy
|
111
111
|
end
|
112
112
|
|
113
|
+
should "always be rewound when returning from #to_file" do
|
114
|
+
assert_equal 0, @dummy.avatar.to_file.pos
|
115
|
+
@dummy.avatar.to_file.seek(10)
|
116
|
+
assert_equal 0, @dummy.avatar.to_file.pos
|
117
|
+
end
|
118
|
+
|
113
119
|
should "pass the content type to the Fog::Storage::AWS::Files instance" do
|
114
120
|
Fog::Storage::AWS::Files.any_instance.expects(:create).with do |hash|
|
115
121
|
hash[:content_type]
|
data/test/storage/s3_test.rb
CHANGED
@@ -335,7 +335,13 @@ class S3Test < Test::Unit::TestCase
|
|
335
335
|
should "return a relative URL for Rails to calculate assets host" do
|
336
336
|
assert_match %r{^avatars/stringio\.txt}, @dummy.avatar.url
|
337
337
|
end
|
338
|
-
|
338
|
+
|
339
|
+
should "always be rewound when returning from #to_file" do
|
340
|
+
assert_equal 0, @dummy.avatar.to_file.pos
|
341
|
+
@dummy.avatar.to_file.seek(10)
|
342
|
+
assert_equal 0, @dummy.avatar.to_file.pos
|
343
|
+
end
|
344
|
+
end
|
339
345
|
|
340
346
|
context "Generating a secure url with an expiration" do
|
341
347
|
setup do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 2.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 2.6.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jon Yurek
|
@@ -15,12 +15,10 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
19
|
-
default_executable:
|
18
|
+
date: 2012-02-10 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
prerelease: false
|
21
|
+
type: :runtime
|
24
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
23
|
none: false
|
26
24
|
requirements:
|
@@ -32,11 +30,11 @@ dependencies:
|
|
32
30
|
- 3
|
33
31
|
- 0
|
34
32
|
version: 2.3.0
|
35
|
-
|
33
|
+
prerelease: false
|
34
|
+
name: activerecord
|
36
35
|
version_requirements: *id001
|
37
36
|
- !ruby/object:Gem::Dependency
|
38
|
-
|
39
|
-
prerelease: false
|
37
|
+
type: :runtime
|
40
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
42
40
|
requirements:
|
@@ -48,11 +46,11 @@ dependencies:
|
|
48
46
|
- 3
|
49
47
|
- 2
|
50
48
|
version: 2.3.2
|
51
|
-
|
49
|
+
prerelease: false
|
50
|
+
name: activesupport
|
52
51
|
version_requirements: *id002
|
53
52
|
- !ruby/object:Gem::Dependency
|
54
|
-
|
55
|
-
prerelease: false
|
53
|
+
type: :runtime
|
56
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
57
55
|
none: false
|
58
56
|
requirements:
|
@@ -64,11 +62,11 @@ dependencies:
|
|
64
62
|
- 0
|
65
63
|
- 2
|
66
64
|
version: 0.0.2
|
67
|
-
|
65
|
+
prerelease: false
|
66
|
+
name: cocaine
|
68
67
|
version_requirements: *id003
|
69
68
|
- !ruby/object:Gem::Dependency
|
70
|
-
|
71
|
-
prerelease: false
|
69
|
+
type: :runtime
|
72
70
|
requirement: &id004 !ruby/object:Gem::Requirement
|
73
71
|
none: false
|
74
72
|
requirements:
|
@@ -78,11 +76,11 @@ dependencies:
|
|
78
76
|
segments:
|
79
77
|
- 0
|
80
78
|
version: "0"
|
81
|
-
|
79
|
+
prerelease: false
|
80
|
+
name: mime-types
|
82
81
|
version_requirements: *id004
|
83
82
|
- !ruby/object:Gem::Dependency
|
84
|
-
|
85
|
-
prerelease: false
|
83
|
+
type: :development
|
86
84
|
requirement: &id005 !ruby/object:Gem::Requirement
|
87
85
|
none: false
|
88
86
|
requirements:
|
@@ -92,11 +90,11 @@ dependencies:
|
|
92
90
|
segments:
|
93
91
|
- 0
|
94
92
|
version: "0"
|
95
|
-
|
93
|
+
prerelease: false
|
94
|
+
name: shoulda
|
96
95
|
version_requirements: *id005
|
97
96
|
- !ruby/object:Gem::Dependency
|
98
|
-
|
99
|
-
prerelease: false
|
97
|
+
type: :development
|
100
98
|
requirement: &id006 !ruby/object:Gem::Requirement
|
101
99
|
none: false
|
102
100
|
requirements:
|
@@ -108,11 +106,11 @@ dependencies:
|
|
108
106
|
- 4
|
109
107
|
- 0
|
110
108
|
version: 0.4.0
|
111
|
-
|
109
|
+
prerelease: false
|
110
|
+
name: appraisal
|
112
111
|
version_requirements: *id006
|
113
112
|
- !ruby/object:Gem::Dependency
|
114
|
-
|
115
|
-
prerelease: false
|
113
|
+
type: :development
|
116
114
|
requirement: &id007 !ruby/object:Gem::Requirement
|
117
115
|
none: false
|
118
116
|
requirements:
|
@@ -122,11 +120,11 @@ dependencies:
|
|
122
120
|
segments:
|
123
121
|
- 0
|
124
122
|
version: "0"
|
125
|
-
|
123
|
+
prerelease: false
|
124
|
+
name: mocha
|
126
125
|
version_requirements: *id007
|
127
126
|
- !ruby/object:Gem::Dependency
|
128
|
-
|
129
|
-
prerelease: false
|
127
|
+
type: :development
|
130
128
|
requirement: &id008 !ruby/object:Gem::Requirement
|
131
129
|
none: false
|
132
130
|
requirements:
|
@@ -136,11 +134,11 @@ dependencies:
|
|
136
134
|
segments:
|
137
135
|
- 0
|
138
136
|
version: "0"
|
139
|
-
|
137
|
+
prerelease: false
|
138
|
+
name: aws-sdk
|
140
139
|
version_requirements: *id008
|
141
140
|
- !ruby/object:Gem::Dependency
|
142
|
-
|
143
|
-
prerelease: false
|
141
|
+
type: :development
|
144
142
|
requirement: &id009 !ruby/object:Gem::Requirement
|
145
143
|
none: false
|
146
144
|
requirements:
|
@@ -152,11 +150,11 @@ dependencies:
|
|
152
150
|
- 3
|
153
151
|
- 4
|
154
152
|
version: 1.3.4
|
155
|
-
|
153
|
+
prerelease: false
|
154
|
+
name: sqlite3
|
156
155
|
version_requirements: *id009
|
157
156
|
- !ruby/object:Gem::Dependency
|
158
|
-
|
159
|
-
prerelease: false
|
157
|
+
type: :development
|
160
158
|
requirement: &id010 !ruby/object:Gem::Requirement
|
161
159
|
none: false
|
162
160
|
requirements:
|
@@ -168,11 +166,11 @@ dependencies:
|
|
168
166
|
- 1
|
169
167
|
- 0
|
170
168
|
version: 1.1.0
|
171
|
-
|
169
|
+
prerelease: false
|
170
|
+
name: cucumber
|
172
171
|
version_requirements: *id010
|
173
172
|
- !ruby/object:Gem::Dependency
|
174
|
-
|
175
|
-
prerelease: false
|
173
|
+
type: :development
|
176
174
|
requirement: &id011 !ruby/object:Gem::Requirement
|
177
175
|
none: false
|
178
176
|
requirements:
|
@@ -182,11 +180,11 @@ dependencies:
|
|
182
180
|
segments:
|
183
181
|
- 0
|
184
182
|
version: "0"
|
185
|
-
|
183
|
+
prerelease: false
|
184
|
+
name: aruba
|
186
185
|
version_requirements: *id011
|
187
186
|
- !ruby/object:Gem::Dependency
|
188
|
-
|
189
|
-
prerelease: false
|
187
|
+
type: :development
|
190
188
|
requirement: &id012 !ruby/object:Gem::Requirement
|
191
189
|
none: false
|
192
190
|
requirements:
|
@@ -196,11 +194,11 @@ dependencies:
|
|
196
194
|
segments:
|
197
195
|
- 0
|
198
196
|
version: "0"
|
199
|
-
|
197
|
+
prerelease: false
|
198
|
+
name: capybara
|
200
199
|
version_requirements: *id012
|
201
200
|
- !ruby/object:Gem::Dependency
|
202
|
-
|
203
|
-
prerelease: false
|
201
|
+
type: :development
|
204
202
|
requirement: &id013 !ruby/object:Gem::Requirement
|
205
203
|
none: false
|
206
204
|
requirements:
|
@@ -210,11 +208,11 @@ dependencies:
|
|
210
208
|
segments:
|
211
209
|
- 0
|
212
210
|
version: "0"
|
213
|
-
|
211
|
+
prerelease: false
|
212
|
+
name: bundler
|
214
213
|
version_requirements: *id013
|
215
214
|
- !ruby/object:Gem::Dependency
|
216
|
-
|
217
|
-
prerelease: false
|
215
|
+
type: :development
|
218
216
|
requirement: &id014 !ruby/object:Gem::Requirement
|
219
217
|
none: false
|
220
218
|
requirements:
|
@@ -225,11 +223,11 @@ dependencies:
|
|
225
223
|
- 0
|
226
224
|
- 2
|
227
225
|
version: "0.2"
|
228
|
-
|
226
|
+
prerelease: false
|
227
|
+
name: cocaine
|
229
228
|
version_requirements: *id014
|
230
229
|
- !ruby/object:Gem::Dependency
|
231
|
-
|
232
|
-
prerelease: false
|
230
|
+
type: :development
|
233
231
|
requirement: &id015 !ruby/object:Gem::Requirement
|
234
232
|
none: false
|
235
233
|
requirements:
|
@@ -239,11 +237,11 @@ dependencies:
|
|
239
237
|
segments:
|
240
238
|
- 0
|
241
239
|
version: "0"
|
242
|
-
|
240
|
+
prerelease: false
|
241
|
+
name: fog
|
243
242
|
version_requirements: *id015
|
244
243
|
- !ruby/object:Gem::Dependency
|
245
|
-
|
246
|
-
prerelease: false
|
244
|
+
type: :development
|
247
245
|
requirement: &id016 !ruby/object:Gem::Requirement
|
248
246
|
none: false
|
249
247
|
requirements:
|
@@ -253,11 +251,11 @@ dependencies:
|
|
253
251
|
segments:
|
254
252
|
- 0
|
255
253
|
version: "0"
|
256
|
-
|
254
|
+
prerelease: false
|
255
|
+
name: rake
|
257
256
|
version_requirements: *id016
|
258
257
|
- !ruby/object:Gem::Dependency
|
259
|
-
|
260
|
-
prerelease: false
|
258
|
+
type: :development
|
261
259
|
requirement: &id017 !ruby/object:Gem::Requirement
|
262
260
|
none: false
|
263
261
|
requirements:
|
@@ -267,7 +265,8 @@ dependencies:
|
|
267
265
|
segments:
|
268
266
|
- 0
|
269
267
|
version: "0"
|
270
|
-
|
268
|
+
prerelease: false
|
269
|
+
name: fakeweb
|
271
270
|
version_requirements: *id017
|
272
271
|
description: Easy upload management for ActiveRecord
|
273
272
|
email:
|
@@ -319,6 +318,7 @@ files:
|
|
319
318
|
- lib/generators/paperclip/templates/paperclip_migration.rb.erb
|
320
319
|
- lib/paperclip.rb
|
321
320
|
- lib/paperclip/attachment.rb
|
321
|
+
- lib/paperclip/attachment_options.rb
|
322
322
|
- lib/paperclip/callback_compatibility.rb
|
323
323
|
- lib/paperclip/geometry.rb
|
324
324
|
- lib/paperclip/interpolations.rb
|
@@ -345,6 +345,7 @@ files:
|
|
345
345
|
- paperclip.gemspec
|
346
346
|
- rails/init.rb
|
347
347
|
- shoulda_macros/paperclip.rb
|
348
|
+
- test/attachment_options_test.rb
|
348
349
|
- test/attachment_test.rb
|
349
350
|
- test/database.yml
|
350
351
|
- test/fixtures/12k.png
|
@@ -383,7 +384,6 @@ files:
|
|
383
384
|
- test/thumbnail_test.rb
|
384
385
|
- test/upfile_test.rb
|
385
386
|
- test/url_generator_test.rb
|
386
|
-
has_rdoc: true
|
387
387
|
homepage: https://github.com/thoughtbot/paperclip
|
388
388
|
licenses: []
|
389
389
|
|
@@ -413,62 +413,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
413
413
|
requirements:
|
414
414
|
- ImageMagick
|
415
415
|
rubyforge_project: paperclip
|
416
|
-
rubygems_version: 1.
|
416
|
+
rubygems_version: 1.8.11
|
417
417
|
signing_key:
|
418
418
|
specification_version: 3
|
419
419
|
summary: File attachments as attributes for ActiveRecord
|
420
|
-
test_files:
|
421
|
-
|
422
|
-
- features/rake_tasks.feature
|
423
|
-
- features/step_definitions/attachment_steps.rb
|
424
|
-
- features/step_definitions/html_steps.rb
|
425
|
-
- features/step_definitions/rails_steps.rb
|
426
|
-
- features/step_definitions/s3_steps.rb
|
427
|
-
- features/step_definitions/web_steps.rb
|
428
|
-
- features/support/env.rb
|
429
|
-
- features/support/fakeweb.rb
|
430
|
-
- features/support/fixtures/.boot_config.rb.swo
|
431
|
-
- features/support/fixtures/boot_config.txt
|
432
|
-
- features/support/fixtures/gemfile.txt
|
433
|
-
- features/support/fixtures/preinitializer.txt
|
434
|
-
- features/support/paths.rb
|
435
|
-
- features/support/rails.rb
|
436
|
-
- features/support/selectors.rb
|
437
|
-
- test/attachment_test.rb
|
438
|
-
- test/database.yml
|
439
|
-
- test/fixtures/12k.png
|
440
|
-
- test/fixtures/50x50.png
|
441
|
-
- test/fixtures/5k.png
|
442
|
-
- test/fixtures/animated.gif
|
443
|
-
- test/fixtures/bad.png
|
444
|
-
- test/fixtures/fog.yml
|
445
|
-
- test/fixtures/s3.yml
|
446
|
-
- test/fixtures/spaced file.png
|
447
|
-
- test/fixtures/text.txt
|
448
|
-
- test/fixtures/twopage.pdf
|
449
|
-
- test/fixtures/uppercase.PNG
|
450
|
-
- test/geometry_test.rb
|
451
|
-
- test/helper.rb
|
452
|
-
- test/integration_test.rb
|
453
|
-
- test/interpolations_test.rb
|
454
|
-
- test/iostream_test.rb
|
455
|
-
- test/matchers/have_attached_file_matcher_test.rb
|
456
|
-
- test/matchers/validate_attachment_content_type_matcher_test.rb
|
457
|
-
- test/matchers/validate_attachment_presence_matcher_test.rb
|
458
|
-
- test/matchers/validate_attachment_size_matcher_test.rb
|
459
|
-
- test/paperclip_missing_attachment_styles_test.rb
|
460
|
-
- test/paperclip_test.rb
|
461
|
-
- test/processor_test.rb
|
462
|
-
- test/schema_test.rb
|
463
|
-
- test/storage/filesystem_test.rb
|
464
|
-
- test/storage/fog_test.rb
|
465
|
-
- test/storage/s3_live_test.rb
|
466
|
-
- test/storage/s3_test.rb
|
467
|
-
- test/style_test.rb
|
468
|
-
- test/support/mock_attachment.rb
|
469
|
-
- test/support/mock_interpolator.rb
|
470
|
-
- test/support/mock_model.rb
|
471
|
-
- test/support/mock_url_generator_builder.rb
|
472
|
-
- test/thumbnail_test.rb
|
473
|
-
- test/upfile_test.rb
|
474
|
-
- test/url_generator_test.rb
|
420
|
+
test_files: []
|
421
|
+
|