paperclip 2.5.1 → 2.5.2

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/.travis.yml CHANGED
@@ -2,7 +2,7 @@ rvm:
2
2
  - 1.8.7
3
3
  - 1.9.2
4
4
  - ree
5
- - rbx-2.0
5
+ - rbx-18mode
6
6
 
7
7
  before_script: "sudo ntpdate -ub ntp.ubuntu.com pool.ntp.org; true"
8
8
  script: "bundle exec rake clean test cucumber"
data/ChangeLog CHANGED
@@ -1,3 +1,13 @@
1
+ 2012-01-27 Prem Sichanugrist <psichanugrist@thoughtbot.com>
2
+
3
+ * Introducing `:restricted_characters` in Paperclip::Attachment.default_options
4
+ so people can override their blacklist characters by override that setting.
5
+
6
+ * Paperclip will now replace all the special characters in the filename to an
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`
10
+
1
11
  2012-01-20 Jon Yurek <jyurek@thoughtbot.com>
2
12
 
3
13
  * lib/paperclip/railtie.rb (insert): Hide ActiveRecord-specific stuff in
@@ -11,29 +11,30 @@ module Paperclip
11
11
 
12
12
  def self.default_options
13
13
  @default_options ||= {
14
- :url => "/system/:attachment/:id/:style/:filename",
15
- :path => ":rails_root/public:url",
16
- :styles => {},
14
+ :convert_options => {},
15
+ :default_style => :original,
16
+ :default_url => "/:attachment/:style/missing.png",
17
+ :restricted_characters => /[&$+,\/:;=?@<>\[\]\{\}\|\\\^~%# ]/,
18
+ :hash_data => ":class/:attachment/:id/:style/:updated_at",
19
+ :hash_digest => "SHA1",
20
+ :interpolator => Paperclip::Interpolations,
17
21
  :only_process => [],
22
+ :path => ":rails_root/public:url",
23
+ :preserve_files => false,
18
24
  :processors => [:thumbnail],
19
- :convert_options => {},
20
25
  :source_file_options => {},
21
- :default_url => "/:attachment/:style/missing.png",
22
- :default_style => :original,
23
26
  :storage => :filesystem,
24
- :use_timestamp => true,
25
- :whiny => Paperclip.options[:whiny] || Paperclip.options[:whiny_thumbnails],
27
+ :styles => {},
28
+ :url => "/system/:attachment/:id/:style/:filename",
29
+ :url_generator => Paperclip::UrlGenerator,
26
30
  :use_default_time_zone => true,
27
- :hash_digest => "SHA1",
28
- :hash_data => ":class/:attachment/:id/:style/:updated_at",
29
- :preserve_files => false,
30
- :interpolator => Paperclip::Interpolations,
31
- :url_generator => Paperclip::UrlGenerator
31
+ :use_timestamp => true,
32
+ :whiny => Paperclip.options[:whiny] || Paperclip.options[:whiny_thumbnails]
32
33
  }
33
34
  end
34
35
 
35
- attr_reader :name, :instance, :default_style, :convert_options, :queued_for_write, :whiny, :options, :interpolator
36
- attr_reader :source_file_options, :whiny
36
+ attr_reader :name, :instance, :default_style, :convert_options, :queued_for_write, :whiny,
37
+ :options, :interpolator, :source_file_options, :whiny
37
38
  attr_accessor :post_processing
38
39
 
39
40
  # Creates an Attachment object. +name+ is the name of the attachment,
@@ -108,7 +109,7 @@ module Paperclip
108
109
  uploaded_filename ||= uploaded_file.original_filename
109
110
  stores_fingerprint = @instance.respond_to?("#{name}_fingerprint".to_sym)
110
111
  @queued_for_write[:original] = to_tempfile(uploaded_file)
111
- instance_write(:file_name, uploaded_filename.strip)
112
+ instance_write(:file_name, cleanup_filename(uploaded_filename.strip))
112
113
  instance_write(:content_type, uploaded_file.content_type.to_s.strip)
113
114
  instance_write(:file_size, uploaded_file.size.to_i)
114
115
  instance_write(:fingerprint, generate_fingerprint(uploaded_file)) if stores_fingerprint
@@ -478,5 +479,10 @@ module Paperclip
478
479
  end
479
480
  end
480
481
 
482
+ def cleanup_filename(filename)
483
+ if @options[:restricted_characters]
484
+ filename.gsub(@options[:restricted_characters], '_')
485
+ end
486
+ end
481
487
  end
482
488
  end
@@ -126,7 +126,12 @@ module Paperclip
126
126
 
127
127
  def public_url(style = default_style)
128
128
  if @options[:fog_host]
129
- host = (@options[:fog_host] =~ /%d/) ? @options[:fog_host] % (path(style).hash % 4) : @options[:fog_host]
129
+ host = if @options[:fog_host].respond_to?(:call)
130
+ @options[:fog_host].call(self)
131
+ else
132
+ (@options[:fog_host] =~ /%d/) ? @options[:fog_host] % (path(style).hash % 4) : @options[:fog_host]
133
+ end
134
+
130
135
  "#{host}/#{path(style)}"
131
136
  else
132
137
  if fog_credentials[:provider] == 'AWS'
@@ -159,7 +164,11 @@ module Paperclip
159
164
  when Hash
160
165
  creds
161
166
  else
162
- raise ArgumentError, "Credentials are not a path, file, or hash."
167
+ if creds.respond_to?(:call)
168
+ creds.call(self)
169
+ else
170
+ raise ArgumentError, "Credentials are not a path, file, hash or proc."
171
+ end
163
172
  end
164
173
  end
165
174
 
@@ -168,7 +177,13 @@ module Paperclip
168
177
  end
169
178
 
170
179
  def directory
171
- @directory ||= connection.directories.new(:key => @options[:fog_directory])
180
+ dir = if @options[:fog_directory].respond_to?(:call)
181
+ @options[:fog_directory].call(self)
182
+ else
183
+ @options[:fog_directory]
184
+ end
185
+
186
+ @directory ||= connection.directories.new(:key => dir)
172
187
  end
173
188
  end
174
189
  end
@@ -5,7 +5,6 @@ module Paperclip
5
5
  # to the +File+ class. Useful for testing.
6
6
  # user.avatar = File.new("test/test_avatar.jpg")
7
7
  module Upfile
8
-
9
8
  # Infer the MIME-type of the file from the extension.
10
9
  def content_type
11
10
  types = MIME::Types.type_for(self.original_filename)
@@ -23,7 +22,7 @@ module Paperclip
23
22
  end
24
23
 
25
24
  def type_from_file_command
26
- # On BSDs, `file` doesn't give a result code of 1 if the file doesn't exist.
25
+ # On BSDs, `file` doesn't give a result code of 1 if the file doesn't exist.
27
26
  type = (self.original_filename.match(/\.(\w+)$/)[1] rescue "octet-stream").downcase
28
27
  mime_type = (Paperclip.run("file", "-b --mime :file", :file => self.path).split(/[:;]\s+/)[0] rescue "application/x-#{type}")
29
28
  mime_type = "application/x-#{type}" if mime_type.match(/\(.*?\)/)
@@ -45,12 +44,15 @@ end
45
44
  if defined? StringIO
46
45
  class StringIO
47
46
  attr_accessor :original_filename, :content_type, :fingerprint
47
+
48
48
  def original_filename
49
49
  @original_filename ||= "stringio.txt"
50
50
  end
51
+
51
52
  def content_type
52
53
  @content_type ||= "text/plain"
53
54
  end
55
+
54
56
  def fingerprint
55
57
  @fingerprint ||= Digest::MD5.hexdigest(self.string)
56
58
  end
@@ -1,3 +1,3 @@
1
1
  module Paperclip
2
- VERSION = "2.5.1" unless defined? Paperclip::VERSION
2
+ VERSION = "2.5.2" unless defined? Paperclip::VERSION
3
3
  end
@@ -666,7 +666,7 @@ class AttachmentTest < Test::Unit::TestCase
666
666
  context "Assigning an attachment" do
667
667
  setup do
668
668
  rebuild_model :styles => { :something => "100x100#" }
669
- @file = StringIO.new(".")
669
+ @file = StringIO.new(".")
670
670
  @file.stubs(:original_filename).returns("5k.png\n\n")
671
671
  @file.stubs(:content_type).returns("image/png\n\n")
672
672
  @file.stubs(:to_tempfile).returns(@file)
@@ -713,6 +713,48 @@ class AttachmentTest < Test::Unit::TestCase
713
713
  end
714
714
  end
715
715
 
716
+ context "Attachment with reserved filename" do
717
+ setup do
718
+ rebuild_model
719
+ @file = StringIO.new(".")
720
+ end
721
+
722
+ context "with default configuration" do
723
+ "&$+,/:;=?@<>[]{}|\^~%# ".split(//).each do |character|
724
+ context "with character #{character}" do
725
+ setup do
726
+ @file.stubs(:original_filename).returns("file#{character}name.png")
727
+ @dummy = Dummy.new
728
+ @dummy.avatar = @file
729
+ end
730
+
731
+ should "convert special character into underscore" do
732
+ assert_equal "file_name.png", @dummy.avatar.original_filename
733
+ end
734
+ end
735
+ end
736
+ end
737
+
738
+ context "with specified regexp replacement" do
739
+ setup do
740
+ @old_defaults = Paperclip::Attachment.default_options.dup
741
+ Paperclip::Attachment.default_options.merge! :restricted_characters => /o/
742
+
743
+ @file.stubs(:original_filename).returns("goood.png")
744
+ @dummy = Dummy.new
745
+ @dummy.avatar = @file
746
+ end
747
+
748
+ teardown do
749
+ Paperclip::Attachment.default_options.merge! @old_defaults
750
+ end
751
+
752
+ should "match and convert that character" do
753
+ assert_equal "g___d.png", @dummy.avatar.original_filename
754
+ end
755
+ end
756
+ end
757
+
716
758
  context "Attachment with uppercase extension and a default style" do
717
759
  setup do
718
760
  @old_defaults = Paperclip::Attachment.default_options.dup
@@ -44,12 +44,12 @@ class FileSystemTest < Test::Unit::TestCase
44
44
  assert File.exists?(@dummy.avatar.path)
45
45
  end
46
46
 
47
- should "store the path unescaped" do
48
- assert_match /\/spaced file\.png/, @dummy.avatar.path
47
+ should "return a replaced version for path" do
48
+ assert_match /.+\/spaced_file\.png/, @dummy.avatar.path
49
49
  end
50
50
 
51
- should "return an escaped version of URL" do
52
- assert_match /\/spaced%20file\.png/, @dummy.avatar.url
51
+ should "return a replaced version for url" do
52
+ assert_match /.+\/spaced_file\.png/, @dummy.avatar.url
53
53
  end
54
54
  end
55
55
  end
@@ -220,6 +220,54 @@ class FogTest < Test::Unit::TestCase
220
220
 
221
221
  end
222
222
 
223
+ context "with a proc for a bucket name evaluating a model method" do
224
+ setup do
225
+ @dynamic_fog_directory = 'dynamicpaperclip'
226
+ rebuild_model(@options.merge(:fog_directory => lambda { |attachment| attachment.instance.bucket_name }))
227
+ @dummy = Dummy.new
228
+ @dummy.stubs(:bucket_name).returns(@dynamic_fog_directory)
229
+ @dummy.avatar = @file
230
+ @dummy.save
231
+ end
232
+
233
+ should "have created the bucket" do
234
+ assert @connection.directories.get(@dynamic_fog_directory).inspect
235
+ end
236
+
237
+ end
238
+
239
+ context "with a proc for the fog_host evaluating a model method" do
240
+ setup do
241
+ rebuild_model(@options.merge(:fog_host => lambda { |attachment| attachment.instance.fog_host }))
242
+ @dummy = Dummy.new
243
+ @dummy.stubs(:fog_host).returns('http://dynamicfoghost.com')
244
+ @dummy.avatar = @file
245
+ @dummy.save
246
+ end
247
+
248
+ should "provide a public url" do
249
+ assert_match /http:\/\/dynamicfoghost\.com/, @dummy.avatar.url
250
+ end
251
+ end
252
+
253
+ context "with a proc for the fog_credentials evaluating a model method" do
254
+ setup do
255
+ @dynamic_fog_credentials = {
256
+ :provider => 'AWS',
257
+ :aws_access_key_id => 'DYNAMIC_ID',
258
+ :aws_secret_access_key => 'DYNAMIC_SECRET'
259
+ }
260
+ rebuild_model(@options.merge(:fog_credentials => lambda { |attachment| attachment.instance.fog_credentials }))
261
+ @dummy = Dummy.new
262
+ @dummy.stubs(:fog_credentials).returns(@dynamic_fog_credentials)
263
+ @dummy.avatar = @file
264
+ @dummy.save
265
+ end
266
+
267
+ should "provide a public url" do
268
+ assert_equal @dummy.avatar.fog_credentials, @dynamic_fog_credentials
269
+ end
270
+ end
223
271
  end
224
272
 
225
273
  end
@@ -80,12 +80,12 @@ unless ENV["S3_BUCKET"].blank?
80
80
  @dummy.save
81
81
  end
82
82
 
83
- should "return an unescaped version for path" do
84
- assert_match /.+\/spaced file\.png/, @dummy.avatar.path
83
+ should "return a replaced version for path" do
84
+ assert_match /.+\/spaced_file\.png/, @dummy.avatar.path
85
85
  end
86
86
 
87
- should "return an escaped version for url" do
88
- assert_match /.+\/spaced%20file\.png/, @dummy.avatar.url
87
+ should "return a replaced version for url" do
88
+ assert_match /.+\/spaced_file\.png/, @dummy.avatar.url
89
89
  end
90
90
 
91
91
  should "be accessible" do
@@ -99,42 +99,6 @@ unless ENV["S3_BUCKET"].blank?
99
99
  end
100
100
  end
101
101
 
102
- context "An attachment that uses S3 for storage and has a question mark in file name" do
103
- setup do
104
- rebuild_model :styles => { :thumb => "100x100", :square => "32x32#" },
105
- :storage => :s3,
106
- :bucket => ENV["S3_BUCKET"],
107
- :s3_credentials => File.new(File.join(File.dirname(__FILE__), "..", "fixtures", "s3.yml"))
108
-
109
- Dummy.delete_all
110
- @dummy = Dummy.new
111
- @dummy.avatar = File.new(File.join(File.dirname(__FILE__), '..', 'fixtures', 'question?mark.png'), 'rb')
112
- @dummy.save
113
- end
114
-
115
- should "return an unescaped version for path" do
116
- assert_match /.+\/question\?mark\.png/, @dummy.avatar.path
117
- end
118
-
119
- should "return an escaped version for url" do
120
- assert_match /.+\/question%3Fmark\.png/, @dummy.avatar.url
121
- end
122
-
123
- should "be accessible" do
124
- assert_success_response @dummy.avatar.url
125
- end
126
-
127
- should "be accessible with an expiring url" do
128
- assert_success_response @dummy.avatar.expiring_url
129
- end
130
-
131
- should "be destroyable" do
132
- url = @dummy.avatar.url
133
- @dummy.destroy
134
- assert_not_found_response url
135
- end
136
- end
137
-
138
102
  context "An attachment that uses S3 for storage and uses AES256 encryption" do
139
103
  setup do
140
104
  rebuild_model :styles => { :thumb => "100x100", :square => "32x32#" },
@@ -222,12 +222,38 @@ class S3Test < Test::Unit::TestCase
222
222
  @dummy.avatar = File.new(fixture_file('spaced file.png'), 'rb')
223
223
  end
224
224
 
225
- should "return an unescaped version for path" do
226
- assert_match /.+\/spaced file\.png/, @dummy.avatar.path
225
+ should "return a replaced version for path" do
226
+ assert_match /.+\/spaced_file\.png/, @dummy.avatar.path
227
227
  end
228
228
 
229
- should "return an escaped version for url" do
230
- assert_match /.+\/spaced%20file\.png/, @dummy.avatar.url
229
+ should "return a replaced version for url" do
230
+ assert_match /.+\/spaced_file\.png/, @dummy.avatar.url
231
+ end
232
+ end
233
+
234
+ context "An attachment that uses S3 for storage and has a question mark in file name" do
235
+ setup do
236
+ rebuild_model :styles => { :large => ['500x500#', :jpg] },
237
+ :storage => :s3,
238
+ :bucket => "bucket",
239
+ :s3_credentials => {
240
+ 'access_key_id' => "12345",
241
+ 'secret_access_key' => "54321"
242
+ }
243
+
244
+ file = StringIO.new(".")
245
+ file.original_filename = "question?mark.png"
246
+ @dummy = Dummy.new
247
+ @dummy.avatar = file
248
+ @dummy.save
249
+ end
250
+
251
+ should "return a replaced version for path" do
252
+ assert_match /.+\/question_mark\.png/, @dummy.avatar.path
253
+ end
254
+
255
+ should "return a replaced version for url" do
256
+ assert_match /.+\/question_mark\.png/, @dummy.avatar.url
231
257
  end
232
258
  end
233
259
 
metadata CHANGED
@@ -1,210 +1,284 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: paperclip
3
- version: !ruby/object:Gem::Version
4
- version: 2.5.1
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ hash: 31
5
+ prerelease: false
6
+ segments:
7
+ - 2
8
+ - 5
9
+ - 2
10
+ version: 2.5.2
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Jon Yurek
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-01-27 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-01-27 00:00:00 -05:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
15
22
  name: activerecord
16
- requirement: &14283600 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
17
25
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 2
32
+ - 3
33
+ - 0
21
34
  version: 2.3.0
22
35
  type: :runtime
23
- prerelease: false
24
- version_requirements: *14283600
25
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
26
38
  name: activesupport
27
- requirement: &14282500 !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
28
41
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 7
46
+ segments:
47
+ - 2
48
+ - 3
49
+ - 2
32
50
  version: 2.3.2
33
51
  type: :runtime
34
- prerelease: false
35
- version_requirements: *14282500
36
- - !ruby/object:Gem::Dependency
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
37
54
  name: cocaine
38
- requirement: &14280720 !ruby/object:Gem::Requirement
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
39
57
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ hash: 27
62
+ segments:
63
+ - 0
64
+ - 0
65
+ - 2
43
66
  version: 0.0.2
44
67
  type: :runtime
45
- prerelease: false
46
- version_requirements: *14280720
47
- - !ruby/object:Gem::Dependency
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
48
70
  name: mime-types
49
- requirement: &14279580 !ruby/object:Gem::Requirement
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
50
73
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ hash: 3
78
+ segments:
79
+ - 0
80
+ version: "0"
55
81
  type: :runtime
56
- prerelease: false
57
- version_requirements: *14279580
58
- - !ruby/object:Gem::Dependency
82
+ version_requirements: *id004
83
+ - !ruby/object:Gem::Dependency
59
84
  name: shoulda
60
- requirement: &14276160 !ruby/object:Gem::Requirement
85
+ prerelease: false
86
+ requirement: &id005 !ruby/object:Gem::Requirement
61
87
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 3
92
+ segments:
93
+ - 0
94
+ version: "0"
66
95
  type: :development
67
- prerelease: false
68
- version_requirements: *14276160
69
- - !ruby/object:Gem::Dependency
96
+ version_requirements: *id005
97
+ - !ruby/object:Gem::Dependency
70
98
  name: appraisal
71
- requirement: &14274240 !ruby/object:Gem::Requirement
99
+ prerelease: false
100
+ requirement: &id006 !ruby/object:Gem::Requirement
72
101
  none: false
73
- requirements:
102
+ requirements:
74
103
  - - ~>
75
- - !ruby/object:Gem::Version
104
+ - !ruby/object:Gem::Version
105
+ hash: 15
106
+ segments:
107
+ - 0
108
+ - 4
109
+ - 0
76
110
  version: 0.4.0
77
111
  type: :development
78
- prerelease: false
79
- version_requirements: *14274240
80
- - !ruby/object:Gem::Dependency
112
+ version_requirements: *id006
113
+ - !ruby/object:Gem::Dependency
81
114
  name: mocha
82
- requirement: &14273340 !ruby/object:Gem::Requirement
115
+ prerelease: false
116
+ requirement: &id007 !ruby/object:Gem::Requirement
83
117
  none: false
84
- requirements:
85
- - - ! '>='
86
- - !ruby/object:Gem::Version
87
- version: '0'
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ hash: 3
122
+ segments:
123
+ - 0
124
+ version: "0"
88
125
  type: :development
89
- prerelease: false
90
- version_requirements: *14273340
91
- - !ruby/object:Gem::Dependency
126
+ version_requirements: *id007
127
+ - !ruby/object:Gem::Dependency
92
128
  name: aws-sdk
93
- requirement: &14272400 !ruby/object:Gem::Requirement
129
+ prerelease: false
130
+ requirement: &id008 !ruby/object:Gem::Requirement
94
131
  none: false
95
- requirements:
96
- - - ! '>='
97
- - !ruby/object:Gem::Version
98
- version: '0'
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ hash: 3
136
+ segments:
137
+ - 0
138
+ version: "0"
99
139
  type: :development
100
- prerelease: false
101
- version_requirements: *14272400
102
- - !ruby/object:Gem::Dependency
140
+ version_requirements: *id008
141
+ - !ruby/object:Gem::Dependency
103
142
  name: sqlite3
104
- requirement: &14271240 !ruby/object:Gem::Requirement
143
+ prerelease: false
144
+ requirement: &id009 !ruby/object:Gem::Requirement
105
145
  none: false
106
- requirements:
146
+ requirements:
107
147
  - - ~>
108
- - !ruby/object:Gem::Version
148
+ - !ruby/object:Gem::Version
149
+ hash: 19
150
+ segments:
151
+ - 1
152
+ - 3
153
+ - 4
109
154
  version: 1.3.4
110
155
  type: :development
111
- prerelease: false
112
- version_requirements: *14271240
113
- - !ruby/object:Gem::Dependency
156
+ version_requirements: *id009
157
+ - !ruby/object:Gem::Dependency
114
158
  name: cucumber
115
- requirement: &14270340 !ruby/object:Gem::Requirement
159
+ prerelease: false
160
+ requirement: &id010 !ruby/object:Gem::Requirement
116
161
  none: false
117
- requirements:
162
+ requirements:
118
163
  - - ~>
119
- - !ruby/object:Gem::Version
164
+ - !ruby/object:Gem::Version
165
+ hash: 19
166
+ segments:
167
+ - 1
168
+ - 1
169
+ - 0
120
170
  version: 1.1.0
121
171
  type: :development
122
- prerelease: false
123
- version_requirements: *14270340
124
- - !ruby/object:Gem::Dependency
172
+ version_requirements: *id010
173
+ - !ruby/object:Gem::Dependency
125
174
  name: aruba
126
- requirement: &14269680 !ruby/object:Gem::Requirement
175
+ prerelease: false
176
+ requirement: &id011 !ruby/object:Gem::Requirement
127
177
  none: false
128
- requirements:
129
- - - ! '>='
130
- - !ruby/object:Gem::Version
131
- version: '0'
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ hash: 3
182
+ segments:
183
+ - 0
184
+ version: "0"
132
185
  type: :development
133
- prerelease: false
134
- version_requirements: *14269680
135
- - !ruby/object:Gem::Dependency
186
+ version_requirements: *id011
187
+ - !ruby/object:Gem::Dependency
136
188
  name: capybara
137
- requirement: &14268260 !ruby/object:Gem::Requirement
189
+ prerelease: false
190
+ requirement: &id012 !ruby/object:Gem::Requirement
138
191
  none: false
139
- requirements:
140
- - - ! '>='
141
- - !ruby/object:Gem::Version
142
- version: '0'
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ hash: 3
196
+ segments:
197
+ - 0
198
+ version: "0"
143
199
  type: :development
144
- prerelease: false
145
- version_requirements: *14268260
146
- - !ruby/object:Gem::Dependency
200
+ version_requirements: *id012
201
+ - !ruby/object:Gem::Dependency
147
202
  name: bundler
148
- requirement: &14264560 !ruby/object:Gem::Requirement
203
+ prerelease: false
204
+ requirement: &id013 !ruby/object:Gem::Requirement
149
205
  none: false
150
- requirements:
151
- - - ! '>='
152
- - !ruby/object:Gem::Version
153
- version: '0'
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ hash: 3
210
+ segments:
211
+ - 0
212
+ version: "0"
154
213
  type: :development
155
- prerelease: false
156
- version_requirements: *14264560
157
- - !ruby/object:Gem::Dependency
214
+ version_requirements: *id013
215
+ - !ruby/object:Gem::Dependency
158
216
  name: cocaine
159
- requirement: &14262640 !ruby/object:Gem::Requirement
217
+ prerelease: false
218
+ requirement: &id014 !ruby/object:Gem::Requirement
160
219
  none: false
161
- requirements:
220
+ requirements:
162
221
  - - ~>
163
- - !ruby/object:Gem::Version
164
- version: '0.2'
222
+ - !ruby/object:Gem::Version
223
+ hash: 15
224
+ segments:
225
+ - 0
226
+ - 2
227
+ version: "0.2"
165
228
  type: :development
166
- prerelease: false
167
- version_requirements: *14262640
168
- - !ruby/object:Gem::Dependency
229
+ version_requirements: *id014
230
+ - !ruby/object:Gem::Dependency
169
231
  name: fog
170
- requirement: &14253520 !ruby/object:Gem::Requirement
232
+ prerelease: false
233
+ requirement: &id015 !ruby/object:Gem::Requirement
171
234
  none: false
172
- requirements:
173
- - - ! '>='
174
- - !ruby/object:Gem::Version
175
- version: '0'
235
+ requirements:
236
+ - - ">="
237
+ - !ruby/object:Gem::Version
238
+ hash: 3
239
+ segments:
240
+ - 0
241
+ version: "0"
176
242
  type: :development
177
- prerelease: false
178
- version_requirements: *14253520
179
- - !ruby/object:Gem::Dependency
243
+ version_requirements: *id015
244
+ - !ruby/object:Gem::Dependency
180
245
  name: rake
181
- requirement: &14249900 !ruby/object:Gem::Requirement
246
+ prerelease: false
247
+ requirement: &id016 !ruby/object:Gem::Requirement
182
248
  none: false
183
- requirements:
184
- - - ! '>='
185
- - !ruby/object:Gem::Version
186
- version: '0'
249
+ requirements:
250
+ - - ">="
251
+ - !ruby/object:Gem::Version
252
+ hash: 3
253
+ segments:
254
+ - 0
255
+ version: "0"
187
256
  type: :development
188
- prerelease: false
189
- version_requirements: *14249900
190
- - !ruby/object:Gem::Dependency
257
+ version_requirements: *id016
258
+ - !ruby/object:Gem::Dependency
191
259
  name: fakeweb
192
- requirement: &14244620 !ruby/object:Gem::Requirement
260
+ prerelease: false
261
+ requirement: &id017 !ruby/object:Gem::Requirement
193
262
  none: false
194
- requirements:
195
- - - ! '>='
196
- - !ruby/object:Gem::Version
197
- version: '0'
263
+ requirements:
264
+ - - ">="
265
+ - !ruby/object:Gem::Version
266
+ hash: 3
267
+ segments:
268
+ - 0
269
+ version: "0"
198
270
  type: :development
199
- prerelease: false
200
- version_requirements: *14244620
271
+ version_requirements: *id017
201
272
  description: Easy upload management for ActiveRecord
202
- email:
273
+ email:
203
274
  - jyurek@thoughtbot.com
204
275
  executables: []
276
+
205
277
  extensions: []
278
+
206
279
  extra_rdoc_files: []
207
- files:
280
+
281
+ files:
208
282
  - .gitignore
209
283
  - .travis.yml
210
284
  - Appraisals
@@ -271,7 +345,6 @@ files:
271
345
  - paperclip.gemspec
272
346
  - rails/init.rb
273
347
  - shoulda_macros/paperclip.rb
274
- - test/.gitignore
275
348
  - test/attachment_test.rb
276
349
  - test/database.yml
277
350
  - test/fixtures/12k.png
@@ -280,7 +353,6 @@ files:
280
353
  - test/fixtures/animated.gif
281
354
  - test/fixtures/bad.png
282
355
  - test/fixtures/fog.yml
283
- - test/fixtures/question?mark.png
284
356
  - test/fixtures/s3.yml
285
357
  - test/fixtures/spaced file.png
286
358
  - test/fixtures/text.txt
@@ -311,35 +383,92 @@ files:
311
383
  - test/thumbnail_test.rb
312
384
  - test/upfile_test.rb
313
385
  - test/url_generator_test.rb
386
+ has_rdoc: true
314
387
  homepage: https://github.com/thoughtbot/paperclip
315
388
  licenses: []
389
+
316
390
  post_install_message:
317
391
  rdoc_options: []
318
- require_paths:
392
+
393
+ require_paths:
319
394
  - lib
320
- required_ruby_version: !ruby/object:Gem::Requirement
395
+ required_ruby_version: !ruby/object:Gem::Requirement
321
396
  none: false
322
- requirements:
323
- - - ! '>='
324
- - !ruby/object:Gem::Version
325
- version: '0'
326
- segments:
397
+ requirements:
398
+ - - ">="
399
+ - !ruby/object:Gem::Version
400
+ hash: 3
401
+ segments:
327
402
  - 0
328
- hash: -125325840175155071
329
- required_rubygems_version: !ruby/object:Gem::Requirement
403
+ version: "0"
404
+ required_rubygems_version: !ruby/object:Gem::Requirement
330
405
  none: false
331
- requirements:
332
- - - ! '>='
333
- - !ruby/object:Gem::Version
334
- version: '0'
335
- segments:
406
+ requirements:
407
+ - - ">="
408
+ - !ruby/object:Gem::Version
409
+ hash: 3
410
+ segments:
336
411
  - 0
337
- hash: -125325840175155071
338
- requirements:
412
+ version: "0"
413
+ requirements:
339
414
  - ImageMagick
340
415
  rubyforge_project: paperclip
341
- rubygems_version: 1.8.11
416
+ rubygems_version: 1.3.7
342
417
  signing_key:
343
418
  specification_version: 3
344
419
  summary: File attachments as attributes for ActiveRecord
345
- test_files: []
420
+ test_files:
421
+ - features/basic_integration.feature
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
data/test/.gitignore DELETED
@@ -1 +0,0 @@
1
- debug.log
Binary file