carrierwave 0.7.0 → 0.7.1
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.
- data/README.md +6 -6
- data/lib/carrierwave/mount.rb +6 -4
- data/lib/carrierwave/uploader/configuration.rb +6 -1
- data/lib/carrierwave/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -430,7 +430,7 @@ config/initializers/carrierwave.rb
|
|
430
430
|
|
431
431
|
## Testing with CarrierWave
|
432
432
|
|
433
|
-
It's a good idea to test
|
433
|
+
It's a good idea to test your uploaders in isolation. In order to speed up your
|
434
434
|
tests, it's recommended to switch off processing in your tests, and to use the
|
435
435
|
file storage. In Rails you could do that by adding an initializer with:
|
436
436
|
|
@@ -658,7 +658,7 @@ of ImageMagick without having to worry about installing all the RMagick librarie
|
|
658
658
|
|
659
659
|
See the MiniMagick site for more details:
|
660
660
|
|
661
|
-
|
661
|
+
https://github.com/minimagic/minimagick
|
662
662
|
|
663
663
|
And the ImageMagick command line options for more for whats on offer:
|
664
664
|
|
@@ -706,9 +706,9 @@ your translations file:
|
|
706
706
|
```yaml
|
707
707
|
errors:
|
708
708
|
messages:
|
709
|
-
carrierwave_processing_error:
|
710
|
-
carrierwave_integrity_error:
|
711
|
-
carrierwave_download_error:
|
709
|
+
carrierwave_processing_error: "Cannot resize image."
|
710
|
+
carrierwave_integrity_error: "Not an image."
|
711
|
+
carrierwave_download_error: "Couldn't download image."
|
712
712
|
```
|
713
713
|
|
714
714
|
## Large files
|
@@ -771,7 +771,7 @@ Please test with the latest Ruby 1.8.x and 1.9.x versions using RVM if possible.
|
|
771
771
|
### Running active record tests
|
772
772
|
|
773
773
|
Make sure you have a local MySQL database named `carrierwave_test` with the username
|
774
|
-
`root` and empty password.
|
774
|
+
`root` and empty password.
|
775
775
|
|
776
776
|
## License
|
777
777
|
|
data/lib/carrierwave/mount.rb
CHANGED
@@ -296,11 +296,13 @@ module CarrierWave
|
|
296
296
|
end
|
297
297
|
|
298
298
|
def write_identifier
|
299
|
-
return if record.frozen?
|
299
|
+
return if record.frozen?
|
300
300
|
|
301
|
-
|
302
|
-
|
303
|
-
|
301
|
+
if remove?
|
302
|
+
record.write_uploader(serialization_column, '')
|
303
|
+
elsif not uploader.identifier.blank?
|
304
|
+
record.write_uploader(serialization_column, uploader.identifier)
|
305
|
+
end
|
304
306
|
end
|
305
307
|
|
306
308
|
def identifier
|
@@ -90,8 +90,13 @@ module CarrierWave
|
|
90
90
|
@#{name} = value
|
91
91
|
end
|
92
92
|
|
93
|
+
def #{name}=(value)
|
94
|
+
@#{name} = value
|
95
|
+
end
|
96
|
+
|
93
97
|
def #{name}
|
94
|
-
value =
|
98
|
+
value = @#{name} if instance_variable_defined?(:@#{name})
|
99
|
+
value = self.class.#{name} unless instance_variable_defined?(:@#{name})
|
95
100
|
value.instance_of?(Proc) ? value.call : value
|
96
101
|
end
|
97
102
|
RUBY
|
data/lib/carrierwave/version.rb
CHANGED
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.7.
|
4
|
+
version: 0.7.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|