Skip to content

Commit

Permalink
add imagemagick buildpack
Browse files Browse the repository at this point in the history
  • Loading branch information
bshyong committed Apr 3, 2015
1 parent 7b1d175 commit 81146a3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .buildpacks
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
https://github.com/gregburek/heroku-buildpack-pgbouncer.git#v0.3.3
https://github.com/mcollina/heroku-buildpack-imagemagick
https://github.com/heroku/heroku-buildpack-ruby.git
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: bin/start-pgbouncer-stunnel bundle exec puma --port $PORT --threads ${PUMA_MIN_THREADS:-0}:${PUMA_MAX_THREADS:-4} --workers ${PUMA_WORKERS:-1} --environment ${RACK_ENV:-development} --quiet
worker: bin/bundle exec sidekiq -c 4
worker: bin/bundle exec sidekiq -c 3
5 changes: 4 additions & 1 deletion app/models/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ class Image < ActiveRecord::Base
has_many :favorites
has_many :passes

has_attached_file :file, path: ":shortcode.:extension"
has_attached_file :file, path: ":shortcode.:extension", styles: {
thumb: ["300x300", :png]
}
validates_attachment :file, content_type: { content_type: 'image/gif' }
has_attached_file :mp4, path: ':shortcode.:extension'
validates_attachment :mp4, content_type: { content_type: 'video/mp4' }

validates :original_source, uniqueness: true
validates :file_fingerprint, uniqueness: { allow_blank: true }

Expand Down

0 comments on commit 81146a3

Please sign in to comment.