paperclip 2.4.5 → 2.5.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.

Files changed (63) hide show
  1. data/.gitignore +22 -0
  2. data/.travis.yml +13 -0
  3. data/Appraisals +14 -0
  4. data/CONTRIBUTING.md +38 -0
  5. data/Gemfile +5 -0
  6. data/NEWS +23 -0
  7. data/README.md +72 -42
  8. data/Rakefile +1 -46
  9. data/cucumber/paperclip_steps.rb +6 -0
  10. data/features/basic_integration.feature +46 -0
  11. data/features/rake_tasks.feature +63 -0
  12. data/features/step_definitions/attachment_steps.rb +65 -0
  13. data/features/step_definitions/html_steps.rb +15 -0
  14. data/features/step_definitions/rails_steps.rb +182 -0
  15. data/features/step_definitions/s3_steps.rb +14 -0
  16. data/features/step_definitions/web_steps.rb +209 -0
  17. data/features/support/env.rb +8 -0
  18. data/features/support/fakeweb.rb +3 -0
  19. data/features/support/fixtures/.boot_config.rb.swo +0 -0
  20. data/features/support/fixtures/boot_config.txt +15 -0
  21. data/features/support/fixtures/gemfile.txt +5 -0
  22. data/features/support/fixtures/preinitializer.txt +20 -0
  23. data/features/support/paths.rb +28 -0
  24. data/features/support/rails.rb +46 -0
  25. data/features/support/selectors.rb +19 -0
  26. data/gemfiles/rails2.gemfile +9 -0
  27. data/gemfiles/rails3.gemfile +9 -0
  28. data/gemfiles/rails3_1.gemfile +9 -0
  29. data/lib/paperclip.rb +26 -19
  30. data/lib/paperclip/attachment.rb +123 -109
  31. data/lib/paperclip/interpolations.rb +7 -4
  32. data/lib/paperclip/matchers.rb +33 -2
  33. data/lib/paperclip/missing_attachment_styles.rb +1 -1
  34. data/lib/paperclip/railtie.rb +5 -0
  35. data/lib/paperclip/schema.rb +39 -0
  36. data/lib/paperclip/storage/fog.rb +21 -10
  37. data/lib/paperclip/storage/s3.rb +107 -40
  38. data/lib/paperclip/style.rb +13 -5
  39. data/lib/paperclip/url_generator.rb +64 -0
  40. data/lib/paperclip/version.rb +1 -1
  41. data/lib/tasks/paperclip.rake +1 -1
  42. data/paperclip.gemspec +41 -0
  43. data/test/.gitignore +1 -0
  44. data/test/attachment_test.rb +155 -168
  45. data/test/fixtures/question?mark.png +0 -0
  46. data/test/helper.rb +24 -1
  47. data/test/interpolations_test.rb +16 -2
  48. data/test/paperclip_missing_attachment_styles_test.rb +16 -0
  49. data/test/paperclip_test.rb +72 -22
  50. data/test/schema_test.rb +98 -0
  51. data/test/storage/filesystem_test.rb +2 -2
  52. data/test/{fog_test.rb → storage/fog_test.rb} +35 -8
  53. data/test/storage/s3_live_test.rb +63 -13
  54. data/test/storage/s3_test.rb +394 -91
  55. data/test/style_test.rb +50 -21
  56. data/test/support/mock_attachment.rb +22 -0
  57. data/test/support/mock_interpolator.rb +24 -0
  58. data/test/support/mock_model.rb +2 -0
  59. data/test/support/mock_url_generator_builder.rb +27 -0
  60. data/test/url_generator_test.rb +187 -0
  61. metadata +307 -125
  62. data/lib/paperclip/options.rb +0 -78
  63. data/test/options_test.rb +0 -75
@@ -8,7 +8,7 @@ class StyleTest < Test::Unit::TestCase
8
8
  @attachment = attachment :path => ":basename.:extension",
9
9
  :styles => { :foo => {:geometry => "100x100#", :format => :png} },
10
10
  :whiny => true
11
- @style = @attachment.options.styles[:foo]
11
+ @style = @attachment.styles[:foo]
12
12
  end
13
13
 
14
14
  should "be held as a Style object" do
@@ -41,16 +41,20 @@ class StyleTest < Test::Unit::TestCase
41
41
  :styles => {
42
42
  :foo => lambda{|a| "300x300#"},
43
43
  :bar => {
44
- :geometry => lambda{|a| "300x300#"}
44
+ :geometry => lambda{|a| "300x300#"},
45
+ :convert_options => lambda{|a| "-do_stuff"},
46
+ :source_file_options => lambda{|a| "-do_extra_stuff"}
45
47
  }
46
48
  }
47
49
  end
48
50
 
49
51
  should "call procs when they are needed" do
50
- assert_equal "300x300#", @attachment.options.styles[:foo].geometry
51
- assert_equal "300x300#", @attachment.options.styles[:bar].geometry
52
- assert_equal [:test], @attachment.options.styles[:foo].processors
53
- assert_equal [:test], @attachment.options.styles[:bar].processors
52
+ assert_equal "300x300#", @attachment.styles[:foo].geometry
53
+ assert_equal "300x300#", @attachment.styles[:bar].geometry
54
+ assert_equal [:test], @attachment.styles[:foo].processors
55
+ assert_equal [:test], @attachment.styles[:bar].processors
56
+ assert_equal "-do_stuff", @attachment.styles[:bar].convert_options
57
+ assert_equal "-do_extra_stuff", @attachment.styles[:bar].source_file_options
54
58
  end
55
59
  end
56
60
 
@@ -64,30 +68,30 @@ class StyleTest < Test::Unit::TestCase
64
68
  :styles => styles
65
69
  end
66
70
  should "have the right number of styles" do
67
- assert_kind_of Hash, @attachment.options.styles
68
- assert_equal 3, @attachment.options.styles.size
71
+ assert_kind_of Hash, @attachment.styles
72
+ assert_equal 3, @attachment.styles.size
69
73
  end
70
74
 
71
75
  should "have styles as Style objects" do
72
76
  [:aslist, :ashash, :aslist].each do |s|
73
- assert_kind_of Paperclip::Style, @attachment.options.styles[s]
77
+ assert_kind_of Paperclip::Style, @attachment.styles[s]
74
78
  end
75
79
  end
76
80
 
77
81
  should "have the right geometries" do
78
82
  [:aslist, :ashash, :aslist].each do |s|
79
- assert_equal @attachment.options.styles[s].geometry, "100x100"
83
+ assert_equal @attachment.styles[s].geometry, "100x100"
80
84
  end
81
85
  end
82
86
 
83
87
  should "have the right formats" do
84
- assert_equal @attachment.options.styles[:aslist].format, :png
85
- assert_equal @attachment.options.styles[:ashash].format, :png
86
- assert_nil @attachment.options.styles[:asstring].format
88
+ assert_equal @attachment.styles[:aslist].format, :png
89
+ assert_equal @attachment.styles[:ashash].format, :png
90
+ assert_nil @attachment.styles[:asstring].format
87
91
  end
88
92
 
89
93
  should "retain order" do
90
- assert_equal [:aslist, :ashash, :asstring], @attachment.options.styles.keys
94
+ assert_equal [:aslist, :ashash, :asstring], @attachment.styles.keys
91
95
  end
92
96
  end
93
97
 
@@ -96,7 +100,7 @@ class StyleTest < Test::Unit::TestCase
96
100
  @attachment = attachment :path => ":basename.:extension",
97
101
  :styles => {:thumb => "100x100", :large => "400x400"},
98
102
  :convert_options => {:all => "-do_stuff", :thumb => "-thumbnailize"}
99
- @style = @attachment.options.styles[:thumb]
103
+ @style = @attachment.styles[:thumb]
100
104
  @file = StringIO.new("...")
101
105
  @file.stubs(:original_filename).returns("file.jpg")
102
106
  end
@@ -107,7 +111,7 @@ class StyleTest < Test::Unit::TestCase
107
111
 
108
112
  should "call extra_options_for(:thumb/:large) when convert options are requested" do
109
113
  @attachment.expects(:extra_options_for).with(:thumb)
110
- @attachment.options.styles[:thumb].convert_options
114
+ @attachment.styles[:thumb].convert_options
111
115
  end
112
116
  end
113
117
 
@@ -116,7 +120,7 @@ class StyleTest < Test::Unit::TestCase
116
120
  @attachment = attachment :path => ":basename.:extension",
117
121
  :styles => {:thumb => "100x100", :large => "400x400"},
118
122
  :source_file_options => {:all => "-density 400", :thumb => "-depth 8"}
119
- @style = @attachment.options.styles[:thumb]
123
+ @style = @attachment.styles[:thumb]
120
124
  @file = StringIO.new("...")
121
125
  @file.stubs(:original_filename).returns("file.jpg")
122
126
  end
@@ -127,7 +131,7 @@ class StyleTest < Test::Unit::TestCase
127
131
 
128
132
  should "call extra_options_for(:thumb/:large) when convert options are requested" do
129
133
  @attachment.expects(:extra_source_file_options_for).with(:thumb)
130
- @attachment.options.styles[:thumb].source_file_options
134
+ @attachment.styles[:thumb].source_file_options
131
135
  end
132
136
  end
133
137
 
@@ -142,7 +146,7 @@ class StyleTest < Test::Unit::TestCase
142
146
  }
143
147
  },
144
148
  :processors => [:thumbnail]
145
- @style = @attachment.options.styles[:foo]
149
+ @style = @attachment.styles[:foo]
146
150
  end
147
151
 
148
152
  should "not get processors from the attachment" do
@@ -170,11 +174,36 @@ class StyleTest < Test::Unit::TestCase
170
174
  end
171
175
 
172
176
  should "defer processing of procs until they are needed" do
173
- assert_kind_of Proc, @attachment.options.styles[:foo].instance_variable_get("@processors")
177
+ assert_kind_of Proc, @attachment.styles[:foo].instance_variable_get("@processors")
174
178
  end
175
179
 
176
180
  should "call procs when they are needed" do
177
- assert_equal [:test], @attachment.options.styles[:foo].processors
181
+ assert_equal [:test], @attachment.styles[:foo].processors
182
+ end
183
+ end
184
+
185
+ context "An attachment with :convert_options and :source_file_options in :styles" do
186
+ setup do
187
+ @attachment = attachment :path => ":basename.:extension",
188
+ :styles => {
189
+ :thumb => "100x100",
190
+ :large => {:geometry => "400x400",
191
+ :convert_options => "-do_stuff",
192
+ :source_file_options => "-do_extra_stuff"
193
+ }
194
+ }
195
+ @file = StringIO.new("...")
196
+ @file.stubs(:original_filename).returns("file.jpg")
197
+ end
198
+
199
+ should "have empty options for :thumb style" do
200
+ assert_equal "", @attachment.styles[:thumb].processor_options[:convert_options]
201
+ assert_equal "", @attachment.styles[:thumb].processor_options[:source_file_options]
202
+ end
203
+
204
+ should "have the right options for :large style" do
205
+ assert_equal "-do_stuff", @attachment.styles[:large].processor_options[:convert_options]
206
+ assert_equal "-do_extra_stuff", @attachment.styles[:large].processor_options[:source_file_options]
178
207
  end
179
208
  end
180
209
  end
@@ -0,0 +1,22 @@
1
+ class MockAttachment
2
+ attr_accessor :updated_at, :original_filename
3
+
4
+ def initialize(options = {})
5
+ @model = options[:model]
6
+ @responds_to_updated_at = options[:responds_to_updated_at]
7
+ @updated_at = options[:updated_at]
8
+ @original_filename = options[:original_filename]
9
+ end
10
+
11
+ def instance
12
+ @model
13
+ end
14
+
15
+ def respond_to?(meth)
16
+ if meth.to_s == "updated_at"
17
+ @responds_to_updated_at || @updated_at
18
+ else
19
+ super
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,24 @@
1
+ class MockInterpolator
2
+ def initialize(options = {})
3
+ @options = options
4
+ end
5
+
6
+ def interpolate(pattern, attachment, style_name)
7
+ @interpolated_pattern = pattern
8
+ @interpolated_attachment = attachment
9
+ @interpolated_style_name = style_name
10
+ @options[:result]
11
+ end
12
+
13
+ def has_interpolated_pattern?(pattern)
14
+ @interpolated_pattern == pattern
15
+ end
16
+
17
+ def has_interpolated_style_name?(style_name)
18
+ @interpolated_style_name == style_name
19
+ end
20
+
21
+ def has_interpolated_attachment?(attachment)
22
+ @interpolated_attachment == attachment
23
+ end
24
+ end
@@ -0,0 +1,2 @@
1
+ class MockModel
2
+ end
@@ -0,0 +1,27 @@
1
+ class MockUrlGeneratorBuilder
2
+ def initializer
3
+ end
4
+
5
+ def new(attachment, attachment_options)
6
+ @attachment = attachment
7
+ @attachment_options = attachment_options
8
+ self
9
+ end
10
+
11
+ def for(style_name, options)
12
+ @generated_url_with_style_name = style_name
13
+ @generated_url_with_options = options
14
+ "hello"
15
+ end
16
+
17
+ def has_generated_url_with_options?(options)
18
+ # options.is_a_subhash_of(@generated_url_with_options)
19
+ options.inject(true) do |acc,(k,v)|
20
+ acc && @generated_url_with_options[k] == v
21
+ end
22
+ end
23
+
24
+ def has_generated_url_with_style_name?(style_name)
25
+ @generated_url_with_style_name == style_name
26
+ end
27
+ end
@@ -0,0 +1,187 @@
1
+ # encoding: utf-8
2
+ require './test/helper'
3
+ require 'paperclip/url_generator'
4
+
5
+ class UrlGeneratorTest < Test::Unit::TestCase
6
+ should "use the given interpolator" do
7
+ expected = "the expected result"
8
+ mock_attachment = MockAttachment.new
9
+ mock_interpolator = MockInterpolator.new(:result => expected)
10
+
11
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment,
12
+ { :interpolator => mock_interpolator })
13
+ result = url_generator.for(:style_name, {})
14
+
15
+ assert_equal expected, result
16
+ assert mock_interpolator.has_interpolated_attachment?(mock_attachment)
17
+ assert mock_interpolator.has_interpolated_style_name?(:style_name)
18
+ end
19
+
20
+ should "use the default URL when no file is assigned" do
21
+ mock_attachment = MockAttachment.new
22
+ mock_interpolator = MockInterpolator.new
23
+ default_url = "the default url"
24
+ options = { :interpolator => mock_interpolator, :default_url => default_url}
25
+
26
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
27
+ url_generator.for(:style_name, {})
28
+
29
+ assert mock_interpolator.has_interpolated_pattern?(default_url),
30
+ "expected the interpolator to be passed #{default_url.inspect} but it wasn't"
31
+ end
32
+
33
+ should "execute the default URL lambda when no file is assigned" do
34
+ mock_attachment = MockAttachment.new
35
+ mock_interpolator = MockInterpolator.new
36
+ default_url = lambda {|attachment| "the #{attachment.class.name} default url" }
37
+ options = { :interpolator => mock_interpolator, :default_url => default_url}
38
+
39
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
40
+ url_generator.for(:style_name, {})
41
+
42
+ assert mock_interpolator.has_interpolated_pattern?("the MockAttachment default url"),
43
+ %{expected the interpolator to be passed "the MockAttachment default url", but it wasn't}
44
+ end
45
+
46
+ should "execute the method named by the symbol as the default URL when no file is assigned" do
47
+ mock_model = MockModel.new
48
+ mock_attachment = MockAttachment.new(:model => mock_model)
49
+ mock_interpolator = MockInterpolator.new
50
+ default_url = :to_s
51
+ options = { :interpolator => mock_interpolator, :default_url => default_url}
52
+
53
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
54
+ url_generator.for(:style_name, {})
55
+
56
+ assert mock_interpolator.has_interpolated_pattern?(mock_model.to_s),
57
+ %{expected the interpolator to be passed #{mock_model.to_s}, but it wasn't}
58
+ end
59
+
60
+ should "URL-escape spaces if asked to" do
61
+ expected = "the expected result"
62
+ mock_attachment = MockAttachment.new
63
+ mock_interpolator = MockInterpolator.new(:result => expected)
64
+ options = { :interpolator => mock_interpolator }
65
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
66
+
67
+ result = url_generator.for(:style_name, {:escape => true})
68
+
69
+ assert_equal "the%20expected%20result", result
70
+ end
71
+
72
+ should "escape the result of the interpolator using a method on the object, if asked to escape" do
73
+ expected = Class.new do
74
+ def escape
75
+ "the escaped result"
76
+ end
77
+ end.new
78
+ mock_attachment = MockAttachment.new
79
+ mock_interpolator = MockInterpolator.new(:result => expected)
80
+ options = { :interpolator => mock_interpolator}
81
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
82
+
83
+ result = url_generator.for(:style_name, {:escape => true})
84
+
85
+ assert_equal "the escaped result", result
86
+ end
87
+
88
+ should "leave spaces unescaped as asked to" do
89
+ expected = "the expected result"
90
+ mock_attachment = MockAttachment.new
91
+ mock_interpolator = MockInterpolator.new(:result => expected)
92
+ options = { :interpolator => mock_interpolator}
93
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
94
+
95
+ result = url_generator.for(:style_name, {:escape => false})
96
+
97
+ assert_equal "the expected result", result
98
+ end
99
+
100
+ should "default to leaving spaces unescaped" do
101
+ expected = "the expected result"
102
+ mock_attachment = MockAttachment.new
103
+ mock_interpolator = MockInterpolator.new(:result => expected)
104
+ options = { :interpolator => mock_interpolator}
105
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
106
+
107
+ result = url_generator.for(:style_name, {})
108
+
109
+ assert_equal "the expected result", result
110
+ end
111
+
112
+ should "produce URLs without the updated_at value when the object does not respond to updated_at" do
113
+ expected = "the expected result"
114
+ mock_interpolator = MockInterpolator.new(:result => expected)
115
+ mock_attachment = MockAttachment.new(:responds_to_updated_at => false)
116
+ options = { :interpolator => mock_interpolator}
117
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
118
+
119
+ result = url_generator.for(:style_name, {:timestamp => true})
120
+
121
+ assert_equal expected, result
122
+ end
123
+
124
+ should "produce URLs without the updated_at value when the updated_at value is nil" do
125
+ expected = "the expected result"
126
+ mock_interpolator = MockInterpolator.new(:result => expected)
127
+ mock_attachment = MockAttachment.new(:responds_to_updated_at => true, :updated_at => nil)
128
+ options = { :interpolator => mock_interpolator}
129
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
130
+
131
+ result = url_generator.for(:style_name, {:timestamp => true})
132
+
133
+ assert_equal expected, result
134
+ end
135
+
136
+ should "produce URLs with the updated_at when it exists" do
137
+ expected = "the expected result"
138
+ updated_at = 1231231234
139
+ mock_interpolator = MockInterpolator.new(:result => expected)
140
+ mock_attachment = MockAttachment.new(:updated_at => updated_at)
141
+ options = { :interpolator => mock_interpolator}
142
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
143
+
144
+ result = url_generator.for(:style_name, {:timestamp => true})
145
+
146
+ assert_equal "#{expected}?#{updated_at}", result
147
+ end
148
+
149
+ should "produce URLs with the updated_at when it exists, separated with a & if a ? follow by = already exists" do
150
+ expected = "the?expected=result"
151
+ updated_at = 1231231234
152
+ mock_interpolator = MockInterpolator.new(:result => expected)
153
+ mock_attachment = MockAttachment.new(:updated_at => updated_at)
154
+ options = { :interpolator => mock_interpolator}
155
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
156
+
157
+ result = url_generator.for(:style_name, {:timestamp => true})
158
+
159
+ assert_equal "#{expected}&#{updated_at}", result
160
+ end
161
+
162
+ should "produce URLs without the updated_at when told to do as much" do
163
+ expected = "the expected result"
164
+ updated_at = 1231231234
165
+ mock_interpolator = MockInterpolator.new(:result => expected)
166
+ mock_attachment = MockAttachment.new(:updated_at => updated_at)
167
+ options = { :interpolator => mock_interpolator}
168
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
169
+
170
+ result = url_generator.for(:style_name, {:timestamp => false})
171
+
172
+ assert_equal expected, result
173
+ end
174
+
175
+ should "produce the correct URL when the instance has a file name" do
176
+ expected = "the expected result"
177
+ mock_attachment = MockAttachment.new(:original_filename => 'exists')
178
+ mock_interpolator = MockInterpolator.new
179
+ options = { :interpolator => mock_interpolator, :url => expected}
180
+
181
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
182
+ url_generator.for(:style_name, {})
183
+
184
+ assert mock_interpolator.has_interpolated_pattern?(expected),
185
+ "expected the interpolator to be passed #{expected.inspect} but it wasn't"
186
+ end
187
+ end
metadata CHANGED
@@ -1,175 +1,349 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: paperclip
3
- version: !ruby/object:Gem::Version
4
- version: 2.4.5
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
5
  prerelease:
6
+ segments:
7
+ - 2
8
+ - 5
9
+ - 0
10
+ version: 2.5.0
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: 2011-10-21 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: activerecord
16
- requirement: &70180663783480 !ruby/object:Gem::Requirement
17
+
18
+ date: 2012-01-13 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ type: :runtime
22
+ requirement: &id001 !ruby/object:Gem::Requirement
17
23
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 3
28
+ segments:
29
+ - 2
30
+ - 3
31
+ - 0
21
32
  version: 2.3.0
22
- type: :runtime
23
33
  prerelease: false
24
- version_requirements: *70180663783480
25
- - !ruby/object:Gem::Dependency
26
- name: activesupport
27
- requirement: &70180663782680 !ruby/object:Gem::Requirement
34
+ name: activerecord
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ type: :runtime
38
+ requirement: &id002 !ruby/object:Gem::Requirement
28
39
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 7
44
+ segments:
45
+ - 2
46
+ - 3
47
+ - 2
32
48
  version: 2.3.2
33
- type: :runtime
34
49
  prerelease: false
35
- version_requirements: *70180663782680
36
- - !ruby/object:Gem::Dependency
37
- name: cocaine
38
- requirement: &70180663782140 !ruby/object:Gem::Requirement
50
+ name: activesupport
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ type: :runtime
54
+ requirement: &id003 !ruby/object:Gem::Requirement
39
55
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 27
60
+ segments:
61
+ - 0
62
+ - 0
63
+ - 2
43
64
  version: 0.0.2
65
+ prerelease: false
66
+ name: cocaine
67
+ version_requirements: *id003
68
+ - !ruby/object:Gem::Dependency
44
69
  type: :runtime
70
+ requirement: &id004 !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ hash: 3
76
+ segments:
77
+ - 0
78
+ version: "0"
45
79
  prerelease: false
46
- version_requirements: *70180663782140
47
- - !ruby/object:Gem::Dependency
48
80
  name: mime-types
49
- requirement: &70180663781760 !ruby/object:Gem::Requirement
81
+ version_requirements: *id004
82
+ - !ruby/object:Gem::Dependency
83
+ type: :development
84
+ requirement: &id005 !ruby/object:Gem::Requirement
50
85
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- type: :runtime
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ hash: 3
90
+ segments:
91
+ - 0
92
+ version: "0"
56
93
  prerelease: false
57
- version_requirements: *70180663781760
58
- - !ruby/object:Gem::Dependency
59
94
  name: shoulda
60
- requirement: &70180663781280 !ruby/object:Gem::Requirement
61
- none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
95
+ version_requirements: *id005
96
+ - !ruby/object:Gem::Dependency
66
97
  type: :development
98
+ requirement: &id006 !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ~>
102
+ - !ruby/object:Gem::Version
103
+ hash: 15
104
+ segments:
105
+ - 0
106
+ - 4
107
+ - 0
108
+ version: 0.4.0
67
109
  prerelease: false
68
- version_requirements: *70180663781280
69
- - !ruby/object:Gem::Dependency
70
110
  name: appraisal
71
- requirement: &70180663780840 !ruby/object:Gem::Requirement
72
- none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
111
+ version_requirements: *id006
112
+ - !ruby/object:Gem::Dependency
77
113
  type: :development
114
+ requirement: &id007 !ruby/object:Gem::Requirement
115
+ none: false
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ hash: 3
120
+ segments:
121
+ - 0
122
+ version: "0"
78
123
  prerelease: false
79
- version_requirements: *70180663780840
80
- - !ruby/object:Gem::Dependency
81
124
  name: mocha
82
- requirement: &70180663780420 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ! '>='
86
- - !ruby/object:Gem::Version
87
- version: '0'
125
+ version_requirements: *id007
126
+ - !ruby/object:Gem::Dependency
88
127
  type: :development
89
- prerelease: false
90
- version_requirements: *70180663780420
91
- - !ruby/object:Gem::Dependency
92
- name: aws-s3
93
- requirement: &70180663779980 !ruby/object:Gem::Requirement
128
+ requirement: &id008 !ruby/object:Gem::Requirement
94
129
  none: false
95
- requirements:
96
- - - ! '>='
97
- - !ruby/object:Gem::Version
98
- version: '0'
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ hash: 3
134
+ segments:
135
+ - 0
136
+ version: "0"
137
+ prerelease: false
138
+ name: aws-sdk
139
+ version_requirements: *id008
140
+ - !ruby/object:Gem::Dependency
99
141
  type: :development
142
+ requirement: &id009 !ruby/object:Gem::Requirement
143
+ none: false
144
+ requirements:
145
+ - - ~>
146
+ - !ruby/object:Gem::Version
147
+ hash: 19
148
+ segments:
149
+ - 1
150
+ - 3
151
+ - 4
152
+ version: 1.3.4
100
153
  prerelease: false
101
- version_requirements: *70180663779980
102
- - !ruby/object:Gem::Dependency
103
154
  name: sqlite3
104
- requirement: &70180663779560 !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
155
+ version_requirements: *id009
156
+ - !ruby/object:Gem::Dependency
110
157
  type: :development
158
+ requirement: &id010 !ruby/object:Gem::Requirement
159
+ none: false
160
+ requirements:
161
+ - - ~>
162
+ - !ruby/object:Gem::Version
163
+ hash: 19
164
+ segments:
165
+ - 1
166
+ - 1
167
+ - 0
168
+ version: 1.1.0
111
169
  prerelease: false
112
- version_requirements: *70180663779560
113
- - !ruby/object:Gem::Dependency
114
170
  name: cucumber
115
- requirement: &70180663779140 !ruby/object:Gem::Requirement
171
+ version_requirements: *id010
172
+ - !ruby/object:Gem::Dependency
173
+ type: :development
174
+ requirement: &id011 !ruby/object:Gem::Requirement
116
175
  none: false
117
- requirements:
118
- - - ! '>='
119
- - !ruby/object:Gem::Version
120
- version: '0'
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ hash: 3
180
+ segments:
181
+ - 0
182
+ version: "0"
183
+ prerelease: false
184
+ name: aruba
185
+ version_requirements: *id011
186
+ - !ruby/object:Gem::Dependency
121
187
  type: :development
188
+ requirement: &id012 !ruby/object:Gem::Requirement
189
+ none: false
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ hash: 3
194
+ segments:
195
+ - 0
196
+ version: "0"
122
197
  prerelease: false
123
- version_requirements: *70180663779140
124
- - !ruby/object:Gem::Dependency
125
198
  name: capybara
126
- requirement: &70180663778720 !ruby/object:Gem::Requirement
199
+ version_requirements: *id012
200
+ - !ruby/object:Gem::Dependency
201
+ type: :development
202
+ requirement: &id013 !ruby/object:Gem::Requirement
203
+ none: false
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ hash: 3
208
+ segments:
209
+ - 0
210
+ version: "0"
211
+ prerelease: false
212
+ name: bundler
213
+ version_requirements: *id013
214
+ - !ruby/object:Gem::Dependency
215
+ type: :development
216
+ requirement: &id014 !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ~>
220
+ - !ruby/object:Gem::Version
221
+ hash: 15
222
+ segments:
223
+ - 0
224
+ - 2
225
+ version: "0.2"
226
+ prerelease: false
227
+ name: cocaine
228
+ version_requirements: *id014
229
+ - !ruby/object:Gem::Dependency
230
+ type: :development
231
+ requirement: &id015 !ruby/object:Gem::Requirement
232
+ none: false
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ hash: 3
237
+ segments:
238
+ - 0
239
+ version: "0"
240
+ prerelease: false
241
+ name: fog
242
+ version_requirements: *id015
243
+ - !ruby/object:Gem::Dependency
244
+ type: :development
245
+ requirement: &id016 !ruby/object:Gem::Requirement
127
246
  none: false
128
- requirements:
129
- - - ! '>='
130
- - !ruby/object:Gem::Version
131
- version: '0'
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ hash: 3
251
+ segments:
252
+ - 0
253
+ version: "0"
254
+ prerelease: false
255
+ name: rake
256
+ version_requirements: *id016
257
+ - !ruby/object:Gem::Dependency
132
258
  type: :development
259
+ requirement: &id017 !ruby/object:Gem::Requirement
260
+ none: false
261
+ requirements:
262
+ - - ">="
263
+ - !ruby/object:Gem::Version
264
+ hash: 3
265
+ segments:
266
+ - 0
267
+ version: "0"
133
268
  prerelease: false
134
- version_requirements: *70180663778720
269
+ name: fakeweb
270
+ version_requirements: *id017
135
271
  description: Easy upload management for ActiveRecord
136
- email: jyurek@thoughtbot.com
272
+ email:
273
+ - jyurek@thoughtbot.com
137
274
  executables: []
275
+
138
276
  extensions: []
139
- extra_rdoc_files:
140
- - README.md
141
- files:
142
- - README.md
277
+
278
+ extra_rdoc_files: []
279
+
280
+ files:
281
+ - .gitignore
282
+ - .travis.yml
283
+ - Appraisals
284
+ - CONTRIBUTING.md
285
+ - Gemfile
286
+ - Gemfile.lock
143
287
  - LICENSE
288
+ - NEWS
289
+ - README.md
144
290
  - Rakefile
291
+ - cucumber/paperclip_steps.rb
292
+ - features/basic_integration.feature
293
+ - features/rake_tasks.feature
294
+ - features/step_definitions/attachment_steps.rb
295
+ - features/step_definitions/html_steps.rb
296
+ - features/step_definitions/rails_steps.rb
297
+ - features/step_definitions/s3_steps.rb
298
+ - features/step_definitions/web_steps.rb
299
+ - features/support/env.rb
300
+ - features/support/fakeweb.rb
301
+ - features/support/fixtures/.boot_config.rb.swo
302
+ - features/support/fixtures/boot_config.txt
303
+ - features/support/fixtures/gemfile.txt
304
+ - features/support/fixtures/preinitializer.txt
305
+ - features/support/paths.rb
306
+ - features/support/rails.rb
307
+ - features/support/selectors.rb
308
+ - gemfiles/rails2.gemfile
309
+ - gemfiles/rails3.gemfile
310
+ - gemfiles/rails3_1.gemfile
311
+ - generators/paperclip/USAGE
312
+ - generators/paperclip/paperclip_generator.rb
313
+ - generators/paperclip/templates/paperclip_migration.rb.erb
145
314
  - init.rb
315
+ - lib/generators/paperclip/USAGE
146
316
  - lib/generators/paperclip/paperclip_generator.rb
147
317
  - lib/generators/paperclip/templates/paperclip_migration.rb.erb
148
- - lib/generators/paperclip/USAGE
318
+ - lib/paperclip.rb
149
319
  - lib/paperclip/attachment.rb
150
320
  - lib/paperclip/callback_compatibility.rb
151
321
  - lib/paperclip/geometry.rb
152
322
  - lib/paperclip/interpolations.rb
153
323
  - lib/paperclip/iostream.rb
324
+ - lib/paperclip/matchers.rb
154
325
  - lib/paperclip/matchers/have_attached_file_matcher.rb
155
326
  - lib/paperclip/matchers/validate_attachment_content_type_matcher.rb
156
327
  - lib/paperclip/matchers/validate_attachment_presence_matcher.rb
157
328
  - lib/paperclip/matchers/validate_attachment_size_matcher.rb
158
- - lib/paperclip/matchers.rb
159
329
  - lib/paperclip/missing_attachment_styles.rb
160
- - lib/paperclip/options.rb
161
330
  - lib/paperclip/processor.rb
162
331
  - lib/paperclip/railtie.rb
332
+ - lib/paperclip/schema.rb
333
+ - lib/paperclip/storage.rb
163
334
  - lib/paperclip/storage/filesystem.rb
164
335
  - lib/paperclip/storage/fog.rb
165
336
  - lib/paperclip/storage/s3.rb
166
- - lib/paperclip/storage.rb
167
337
  - lib/paperclip/style.rb
168
338
  - lib/paperclip/thumbnail.rb
169
339
  - lib/paperclip/upfile.rb
340
+ - lib/paperclip/url_generator.rb
170
341
  - lib/paperclip/version.rb
171
- - lib/paperclip.rb
172
342
  - lib/tasks/paperclip.rake
343
+ - paperclip.gemspec
344
+ - rails/init.rb
345
+ - shoulda_macros/paperclip.rb
346
+ - test/.gitignore
173
347
  - test/attachment_test.rb
174
348
  - test/database.yml
175
349
  - test/fixtures/12k.png
@@ -178,12 +352,12 @@ files:
178
352
  - test/fixtures/animated.gif
179
353
  - test/fixtures/bad.png
180
354
  - test/fixtures/fog.yml
355
+ - test/fixtures/question?mark.png
181
356
  - test/fixtures/s3.yml
182
357
  - test/fixtures/spaced file.png
183
358
  - test/fixtures/text.txt
184
359
  - test/fixtures/twopage.pdf
185
360
  - test/fixtures/uppercase.PNG
186
- - test/fog_test.rb
187
361
  - test/geometry_test.rb
188
362
  - test/helper.rb
189
363
  - test/integration_test.rb
@@ -193,46 +367,54 @@ files:
193
367
  - test/matchers/validate_attachment_content_type_matcher_test.rb
194
368
  - test/matchers/validate_attachment_presence_matcher_test.rb
195
369
  - test/matchers/validate_attachment_size_matcher_test.rb
196
- - test/options_test.rb
197
370
  - test/paperclip_missing_attachment_styles_test.rb
198
371
  - test/paperclip_test.rb
199
372
  - test/processor_test.rb
373
+ - test/schema_test.rb
200
374
  - test/storage/filesystem_test.rb
375
+ - test/storage/fog_test.rb
201
376
  - test/storage/s3_live_test.rb
202
377
  - test/storage/s3_test.rb
203
378
  - test/style_test.rb
379
+ - test/support/mock_attachment.rb
380
+ - test/support/mock_interpolator.rb
381
+ - test/support/mock_model.rb
382
+ - test/support/mock_url_generator_builder.rb
204
383
  - test/thumbnail_test.rb
205
384
  - test/upfile_test.rb
206
- - rails/init.rb
207
- - generators/paperclip/paperclip_generator.rb
208
- - generators/paperclip/templates/paperclip_migration.rb.erb
209
- - generators/paperclip/USAGE
210
- - shoulda_macros/paperclip.rb
385
+ - test/url_generator_test.rb
211
386
  homepage: https://github.com/thoughtbot/paperclip
212
387
  licenses: []
388
+
213
389
  post_install_message:
214
- rdoc_options:
215
- - --line-numbers
216
- - --inline-source
217
- require_paths:
390
+ rdoc_options: []
391
+
392
+ require_paths:
218
393
  - lib
219
- required_ruby_version: !ruby/object:Gem::Requirement
394
+ required_ruby_version: !ruby/object:Gem::Requirement
220
395
  none: false
221
- requirements:
222
- - - ! '>='
223
- - !ruby/object:Gem::Version
224
- version: '0'
225
- required_rubygems_version: !ruby/object:Gem::Requirement
396
+ requirements:
397
+ - - ">="
398
+ - !ruby/object:Gem::Version
399
+ hash: 3
400
+ segments:
401
+ - 0
402
+ version: "0"
403
+ required_rubygems_version: !ruby/object:Gem::Requirement
226
404
  none: false
227
- requirements:
228
- - - ! '>='
229
- - !ruby/object:Gem::Version
230
- version: '0'
231
- requirements:
405
+ requirements:
406
+ - - ">="
407
+ - !ruby/object:Gem::Version
408
+ hash: 3
409
+ segments:
410
+ - 0
411
+ version: "0"
412
+ requirements:
232
413
  - ImageMagick
233
414
  rubyforge_project: paperclip
234
- rubygems_version: 1.8.10
415
+ rubygems_version: 1.8.11
235
416
  signing_key:
236
417
  specification_version: 3
237
418
  summary: File attachments as attributes for ActiveRecord
238
419
  test_files: []
420
+