Sha256: c3d43d8bf811f544827b87ea284266f66b02d7aa859197004cce530915a11154

Contents?: true

Size: 873 Bytes

Versions: 10

Compression:

Stored size: 873 Bytes

Contents

Paperclip.interpolates :stream_version do |attachment, _|
  attachment.instance.revision_number
end

Paperclip.interpolates :attachable_klass do |attachment, _|
  attachable_type = attachment.instance.attachable_type
  attachable_type && attachable_type.respond_to?(:tableize) ? attachable_type.tableize : '.'
end

Paperclip.interpolates :rails_env do |_, _|
  Rails.env
end

# brew on darwin
if File.directory?(File.join("", 'usr', 'local', 'bin'))
  Paperclip.options[:command_path] = '/usr/local/bin'

# macports on darwin
elsif File.directory?(File.join("", 'opt', 'local', 'bin'))
  Paperclip.options[:command_path] = '/opt/local/bin'

# "disabled" macports due to brew on darwin
elsif File.directory?(File.join("", 'opt', 'local.brew', 'bin'))
  Paperclip.options[:command_path] = '/opt/local.brew/bin'
else
  raise RuntimeError, 'can not locate identify binary'
end

Version data entries

10 entries across 5 versions & 1 rubygems

Version Path
importable_attachments-0.0.18 lib/generators/importable_attachments/templates/initializers/paperclip.rb
importable_attachments-0.0.18 config/initializers/paperclip.rb
importable_attachments-0.0.17 config/initializers/paperclip.rb
importable_attachments-0.0.17 lib/generators/importable_attachments/templates/initializers/paperclip.rb
importable_attachments-0.0.15 lib/generators/importable_attachments/templates/initializers/paperclip.rb
importable_attachments-0.0.15 config/initializers/paperclip.rb
importable_attachments-0.0.14 lib/generators/importable_attachments/templates/initializers/paperclip.rb
importable_attachments-0.0.14 config/initializers/paperclip.rb
importable_attachments-0.0.13 config/initializers/paperclip.rb
importable_attachments-0.0.13 lib/generators/importable_attachments/templates/initializers/paperclip.rb