-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinit.rb
16 lines (13 loc) · 844 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Due to the sequence of dependency processing and plugin initialization, these statements cannot be used to auto-install
# missing gems -they are here solely for documentation.
config.gem 'exifr', :version => '>=1.0.3'
config.gem 'rmagick', :version => '>=2.7.2', :lib => 'RMagick'
config.gem 'aws-s3', :version => '>=0.6.2', :lib => 'aws/s3'
require 'geometry'
require 'hapgood/attach'
Hapgood::Attach::StandardImageGeometry = { :thumbnail => ::Geometry.from_s("128x128>"),
:vignette => ::Geometry.from_s('256x256>'),
:proof => ::Geometry.from_s('512x512>'),
:max => ::Geometry.from_s('2097152@')} # 2 Megapixels
ActiveRecord::Base.send(:extend, Hapgood::Attach::ActMethods)
FileUtils.mkdir_p Hapgood::Attach::Sources::Base.tempfile_path