module ZendeskAppsSupport::Validations::Marketplace
Constants
- WHITELISTED_EXPERIMENTS
Public Class Methods
Source
# File lib/zendesk_apps_support/validations/marketplace.rb, line 9 def call(package) [no_symlinks(package.root), *no_experiments(package.manifest)].compact end
Private Class Methods
Source
# File lib/zendesk_apps_support/validations/marketplace.rb, line 22 def no_experiments(manifest) invalid_experiments = manifest.enabled_experiments - WHITELISTED_EXPERIMENTS invalid_experiments.map do |experiment| ValidationError.new(:invalid_experiment, experiment: experiment) end end
Source
# File lib/zendesk_apps_support/validations/marketplace.rb, line 15 def no_symlinks(path) if Dir["#{path}/**/{*,.*}"].any? { |f| File.symlink?(f) } return ValidationError.new(:symlink_in_zip) end nil end