Add rake task to reprocess sponsor logos

rake logo:reprocess
This commit is contained in:
Aditya Prakash 2016-04-25 17:18:02 +05:30
parent d662ebd252
commit d47e9c317d
3 changed files with 8 additions and 3 deletions

View file

@ -66,10 +66,9 @@ base operating systems. Check Google ;-)
#### 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
> Sponsor.find_each { |s| s.logo.reprocess! }
$ rake logo:reprocess
```
#### Use openID

View file

6
lib/tasks/logo.rake Normal file
View 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