Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions lib/zendesk_apps_support/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def validate(marketplace: true, skip_marketplace_translations: false)
end

errors << Validations::Banner.call(self) if has_banner?
errors << Validations::Svg.call(self) if has_svgs?

errors.flatten.compact
end

Expand All @@ -55,6 +53,15 @@ def validate!(marketplace: true, skip_marketplace_translations: false)
true
end

def curl_zam_svg_validation_endpoint
begin
require 'net/http'
response = Net::HTTP.get_response(URI("https://appsubmission.zendesk.com/apps/zat_validation?params=#{self}"))
raise "There was an error in validation of svgs" if response.status != 200
true
end
end

def assets
@assets ||= Dir.chdir(root) do
Dir['assets/**/*'].select { |f| File.file?(f) }
Expand Down Expand Up @@ -92,10 +99,6 @@ def lib_files
@lib_files ||= js_files.select { |f| f =~ %r{^lib/} }
end

def svg_files
@svg_files ||= files.select { |f| f =~ %r{^assets/.*\.svg$} }
end

def template_files
files.select { |f| f =~ %r{^templates/.*\.hdbs$} }
end
Expand Down Expand Up @@ -187,10 +190,6 @@ def has_file?(path)
File.file?(path_to(path))
end

def has_svgs?
svg_files.any?
end

def has_requirements?
has_file?(REQUIREMENTS_FILENAME)
end
Expand Down
81 changes: 0 additions & 81 deletions lib/zendesk_apps_support/validations/svg.rb

This file was deleted.

2 changes: 0 additions & 2 deletions zendesk_apps_support.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'image_size'
s.add_runtime_dependency 'erubis'
s.add_runtime_dependency 'jshintrb', '~> 0.3.0'
s.add_runtime_dependency 'loofah', '~> 2.2.3'
s.add_runtime_dependency 'nokogiri', '~> 1.8.5'
s.add_runtime_dependency 'rb-inotify', '0.9.10'

s.add_development_dependency 'rspec', '~> 3.4.0'
Expand Down