Module: ZendeskAppsSupport::Validations::Mime
- Defined in:
- lib/zendesk_apps_support/validations/mime.rb
Constant Summary collapse
- UNSUPPORTED_MIME_TYPES =
%w[ vnd.rar rar zip gzip pdf doc docx avi bin bz bz2 csh sh jar mp3 mpeg odt pptx ppt xls xlsx 7z ].freeze
Class Method Summary collapse
Class Method Details
.call(package) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/zendesk_apps_support/validations/mime.rb', line 13 def call(package) unsupported_files = package.files.find_all { |app_file| block_listed?(app_file) }.map(&:relative_path) [mime_type_warning(unsupported_files)] if unsupported_files.any? end |