Add rake task to reprocess sponsor logos
rake logo:reprocess
This commit is contained in:
parent
d662ebd252
commit
d47e9c317d
3 changed files with 8 additions and 3 deletions
|
|
@ -66,10 +66,9 @@ base operating systems. Check Google ;-)
|
||||||
#### ImageMagick
|
#### ImageMagick
|
||||||
We use imagemagic for image manipulation of sponsor logo. You can get it from [direct install](http://software.opensuse.org/package/ImageMagick) page of the package or else check out [Download page](http://www.imagemagick.org/script/binary-releases.php) of ImageMagick.
|
We use imagemagic for image manipulation of sponsor logo. You can get it from [direct install](http://software.opensuse.org/package/ImageMagick) page of the package or else check out [Download page](http://www.imagemagick.org/script/binary-releases.php) of ImageMagick.
|
||||||
|
|
||||||
If you are upgrading your osem instance and would like to resize the exisiting logos, you would need to `reprocess!` the images:
|
If you are upgrading your osem instance and would like to resize the exisiting logos, you would need to `reprocess!` the images. You can do it by running the following rake task:
|
||||||
```
|
```
|
||||||
$ rails c
|
$ rake logo:reprocess
|
||||||
> Sponsor.find_each { |s| s.logo.reprocess! }
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Use openID
|
#### Use openID
|
||||||
|
|
|
||||||
6
lib/tasks/logo.rake
Normal file
6
lib/tasks/logo.rake
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
namespace :logo do
|
||||||
|
desc 'Resize existing logo of sponsors after change in image manipulation specifications'
|
||||||
|
task reprocess: :environment do
|
||||||
|
Sponsor.find_each { |s| s.logo.reprocess! }
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue