From 8da575ba41ba6cd39eb23378eb90e2a54bc2db65 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Mon, 31 Oct 2011 18:23:25 +0000 Subject: [PATCH] Removed dependence on mini_exiftool. We'll need to write a paperclip processor that uses Imagemagick to get the appropriate details. --- Gemfile | 2 +- Gemfile.lock | 2 -- app/models/photo.rb | 20 +++++++++----------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index ce37866..7c7029a 100644 --- a/Gemfile +++ b/Gemfile @@ -46,7 +46,7 @@ gem 'pg' gem 'devise' gem 'formtastic' gem 'squeel' -gem 'mini_exiftool' +#gem 'mini_exiftool' gem 'will_paginate' gem 'rdiscount' gem 'paperclip' diff --git a/Gemfile.lock b/Gemfile.lock index aad6d95..5452a41 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -79,7 +79,6 @@ GEM mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.17.2) - mini_exiftool (1.3.1) multi_json (1.0.3) orm_adapter (0.0.5) paperclip (2.4.5) @@ -171,7 +170,6 @@ DEPENDENCIES haml hpricot jquery-rails - mini_exiftool paperclip pg powder diff --git a/app/models/photo.rb b/app/models/photo.rb index e12754c..38609e5 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -1,5 +1,3 @@ -require 'mini_exiftool' - class Photo < ActiveRecord::Base has_and_belongs_to_many :categories @@ -17,7 +15,7 @@ class Photo < ActiveRecord::Base :bucket => 'danbarberphoto', :url => ":s3_eu_url" - after_create :get_exif + #after_create :get_exif @@per_page = 11 @@ -45,12 +43,12 @@ class Photo < ActiveRecord::Base self.save end -private - def get_exif - exif = MiniExiftool.new photo.queued_for_write[:original].path - self.title = exif.title if self.title.empty? - self.description = exif.description if self.description.empty? - self.taken_at = exif.date_time_original - self.save - end +#private + #def get_exif + # exif = MiniExiftool.new photo.queued_for_write[:original].path + # self.title = exif.title if self.title.empty? + # self.description = exif.description if self.description.empty? + # self.taken_at = exif.date_time_original + # self.save + #end end