carrierwave 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of carrierwave might be problematic. Click here for more details.

@@ -243,19 +243,24 @@ module CarrierWave
243
243
  #
244
244
  # [CarrierWave::ProcessingError] if manipulation failed.
245
245
  #
246
- def manipulate!(options={})
246
+ def manipulate!(options={}, &block)
247
247
  cache_stored_file! if !cached?
248
248
  image = ::Magick::Image.read(current_path)
249
249
 
250
250
  frames = if image.size > 1
251
251
  list = ::Magick::ImageList.new
252
- image.each do |frame|
253
- list << (block_given? ? yield( frame ) : frame)
252
+ image.each_with_index do |frame, index|
253
+ processed_frame = if block_given?
254
+ yield *[frame, index].take(block.arity)
255
+ else
256
+ frame
257
+ end
258
+ list << processed_frame if processed_frame
254
259
  end
255
260
  block_given? ? list : list.append(true)
256
261
  else
257
262
  frame = image.first
258
- frame = yield( frame ) if block_given?
263
+ frame = yield( *[frame, 0].take(block.arity) ) if block_given?
259
264
  frame
260
265
  end
261
266
 
@@ -67,7 +67,7 @@ module CarrierWave
67
67
  # [url (String)] The URL where the remote file is stored
68
68
  #
69
69
  def process_uri(uri)
70
- URI.parse(URI.escape(URI.unescape(uri)).gsub("[", "%5B").gsub("]", "%5D"))
70
+ URI.parse(URI.escape(URI.unescape(uri)).gsub("[", "%5B").gsub("]", "%5D").gsub("+", "%2B"))
71
71
  end
72
72
 
73
73
  end # Download
@@ -216,6 +216,7 @@ module CarrierWave
216
216
  active_versions.each do |name, v|
217
217
  next if v.cached?
218
218
 
219
+ v.send(:cache_id=, cache_id)
219
220
  # If option :from_version is present, create cache using cached file from
220
221
  # version indicated
221
222
  if self.class.versions[name][:options] && self.class.versions[name][:options][:from_version]
@@ -229,7 +230,6 @@ module CarrierWave
229
230
  else
230
231
  v.cache!(processed_parent)
231
232
  end
232
- v.send(:cache_id=, cache_id)
233
233
  end
234
234
  end
235
235
 
@@ -1,3 +1,3 @@
1
1
  module CarrierWave
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-02 00:00:00.000000000 Z
12
+ date: 2012-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70103427625320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: 3.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: 3.2.0
24
+ version_requirements: *70103427625320
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: activemodel
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70103427624520 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ! '>='
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: 3.2.0
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: 3.2.0
35
+ version_requirements: *70103427624520
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: mysql2
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &70103427623860 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ! '>='
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: '0'
54
44
  type: :development
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
46
+ version_requirements: *70103427623860
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: rails
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &70103427623000 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ! '>='
@@ -69,31 +54,21 @@ dependencies:
69
54
  version: 3.2.0
70
55
  type: :development
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: 3.2.0
57
+ version_requirements: *70103427623000
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: cucumber
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &70103427622140 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
- - - '='
63
+ - - =
84
64
  - !ruby/object:Gem::Version
85
65
  version: 1.1.4
86
66
  type: :development
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - '='
92
- - !ruby/object:Gem::Version
93
- version: 1.1.4
68
+ version_requirements: *70103427622140
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: json
96
- requirement: !ruby/object:Gem::Requirement
71
+ requirement: &70103427621460 !ruby/object:Gem::Requirement
97
72
  none: false
98
73
  requirements:
99
74
  - - ! '>='
@@ -101,15 +76,10 @@ dependencies:
101
76
  version: '0'
102
77
  type: :development
103
78
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
79
+ version_requirements: *70103427621460
110
80
  - !ruby/object:Gem::Dependency
111
81
  name: rspec
112
- requirement: !ruby/object:Gem::Requirement
82
+ requirement: &70103427620560 !ruby/object:Gem::Requirement
113
83
  none: false
114
84
  requirements:
115
85
  - - ~>
@@ -117,15 +87,10 @@ dependencies:
117
87
  version: '2.0'
118
88
  type: :development
119
89
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ~>
124
- - !ruby/object:Gem::Version
125
- version: '2.0'
90
+ version_requirements: *70103427620560
126
91
  - !ruby/object:Gem::Dependency
127
92
  name: sham_rack
128
- requirement: !ruby/object:Gem::Requirement
93
+ requirement: &70103427620060 !ruby/object:Gem::Requirement
129
94
  none: false
130
95
  requirements:
131
96
  - - ! '>='
@@ -133,15 +98,10 @@ dependencies:
133
98
  version: '0'
134
99
  type: :development
135
100
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
101
+ version_requirements: *70103427620060
142
102
  - !ruby/object:Gem::Dependency
143
103
  name: timecop
144
- requirement: !ruby/object:Gem::Requirement
104
+ requirement: &70103427619580 !ruby/object:Gem::Requirement
145
105
  none: false
146
106
  requirements:
147
107
  - - ! '>='
@@ -149,15 +109,10 @@ dependencies:
149
109
  version: '0'
150
110
  type: :development
151
111
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
112
+ version_requirements: *70103427619580
158
113
  - !ruby/object:Gem::Dependency
159
114
  name: fog
160
- requirement: !ruby/object:Gem::Requirement
115
+ requirement: &70103427619000 !ruby/object:Gem::Requirement
161
116
  none: false
162
117
  requirements:
163
118
  - - ! '>='
@@ -165,15 +120,10 @@ dependencies:
165
120
  version: 1.3.1
166
121
  type: :development
167
122
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
171
- - - ! '>='
172
- - !ruby/object:Gem::Version
173
- version: 1.3.1
123
+ version_requirements: *70103427619000
174
124
  - !ruby/object:Gem::Dependency
175
125
  name: mini_magick
176
- requirement: !ruby/object:Gem::Requirement
126
+ requirement: &70103427618580 !ruby/object:Gem::Requirement
177
127
  none: false
178
128
  requirements:
179
129
  - - ! '>='
@@ -181,15 +131,10 @@ dependencies:
181
131
  version: '0'
182
132
  type: :development
183
133
  prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ! '>='
188
- - !ruby/object:Gem::Version
189
- version: '0'
134
+ version_requirements: *70103427618580
190
135
  - !ruby/object:Gem::Dependency
191
136
  name: rmagick
192
- requirement: !ruby/object:Gem::Requirement
137
+ requirement: &70103427618120 !ruby/object:Gem::Requirement
193
138
  none: false
194
139
  requirements:
195
140
  - - ! '>='
@@ -197,12 +142,7 @@ dependencies:
197
142
  version: '0'
198
143
  type: :development
199
144
  prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
- requirements:
203
- - - ! '>='
204
- - !ruby/object:Gem::Version
205
- version: '0'
145
+ version_requirements: *70103427618120
206
146
  description: Upload files in your Ruby applications, map them to a range of ORMs,
207
147
  store them on different backends.
208
148
  email:
@@ -266,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
206
  version: '0'
267
207
  requirements: []
268
208
  rubyforge_project: carrierwave
269
- rubygems_version: 1.8.21
209
+ rubygems_version: 1.8.10
270
210
  signing_key:
271
211
  specification_version: 3
272
212
  summary: Ruby file upload library