zendesk_apps_support 4.4.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ca887b91a9c145b4714cd80b37c346064fdf9f0
|
|
4
|
+
data.tar.gz: 6439af11eca81816dc44a7999a7cd5b9b4891508
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a6ecfc6ce4154238be60b5daba6323ec6e75069f6b56a4a26ef8e1db30f98c20ab2fdbe1afcf408fd603043ab45bb127c43b7481f53b31a93ac7bbaaca9dcaa
|
|
7
|
+
data.tar.gz: cbe1950ae18916d69691734e7ef50518500111d85984522a439de5862ace924c5abdcdcc64c17008f4332b22585f4727599524c4f1de4cf87a2a163f4b95fdce
|
data/config/locales/en.yml
CHANGED
|
@@ -57,7 +57,6 @@ en:
|
|
|
57
57
|
banner:
|
|
58
58
|
invalid_format: Banner image must be a PNG file.
|
|
59
59
|
invalid_size: Invalid banner image dimensions. Must be %{required_banner_width}x%{required_banner_height}px.
|
|
60
|
-
dirty_svg: '%{svg} contains invalid markup and was unable to be automatically regenerated.'
|
|
61
60
|
oauth_keys:
|
|
62
61
|
missing:
|
|
63
62
|
one: 'Missing required oauth field in manifest: %{missing_keys}'
|
|
@@ -119,4 +118,3 @@ en:
|
|
|
119
118
|
deprecated_version: You are targeting a deprecated version of the framework.
|
|
120
119
|
Your app will work, but it might break when the new framework version
|
|
121
120
|
is deployed.
|
|
122
|
-
sanitised_svg: "The markup in %{svg} has been edited for use in Zendesk, and may not display as intended."
|
data/lib/zendesk_apps_support.rb
CHANGED
|
@@ -27,7 +27,6 @@ module ZendeskAppsSupport
|
|
|
27
27
|
autoload :Stylesheets, 'zendesk_apps_support/validations/stylesheets'
|
|
28
28
|
autoload :Requirements, 'zendesk_apps_support/validations/requirements'
|
|
29
29
|
autoload :Banner, 'zendesk_apps_support/validations/banner'
|
|
30
|
-
autoload :Svg, 'zendesk_apps_support/validations/svg'
|
|
31
30
|
end
|
|
32
31
|
|
|
33
32
|
class Manifest
|
|
@@ -30,7 +30,6 @@ module ZendeskAppsSupport
|
|
|
30
30
|
def validate(marketplace: true)
|
|
31
31
|
[].tap do |errors|
|
|
32
32
|
errors << Validations::Manifest.call(self)
|
|
33
|
-
|
|
34
33
|
if has_manifest?
|
|
35
34
|
errors << Validations::Marketplace.call(self) if marketplace
|
|
36
35
|
errors << Validations::Source.call(self)
|
|
@@ -44,7 +43,6 @@ module ZendeskAppsSupport
|
|
|
44
43
|
end
|
|
45
44
|
|
|
46
45
|
errors << Validations::Banner.call(self) if has_banner?
|
|
47
|
-
errors << Validations::Svg.call(self) if has_svgs?
|
|
48
46
|
|
|
49
47
|
errors.flatten!.compact!
|
|
50
48
|
end
|
|
@@ -93,10 +91,6 @@ module ZendeskAppsSupport
|
|
|
93
91
|
@lib_files ||= js_files.select { |f| f =~ %r{^lib/} }
|
|
94
92
|
end
|
|
95
93
|
|
|
96
|
-
def svg_files
|
|
97
|
-
@svg_files ||= files.select { |f| f =~ %r{^assets/.*\.svg$} }
|
|
98
|
-
end
|
|
99
|
-
|
|
100
94
|
def template_files
|
|
101
95
|
files.select { |f| f =~ %r{^templates/.*\.hdbs$} }
|
|
102
96
|
end
|
|
@@ -274,10 +268,6 @@ module ZendeskAppsSupport
|
|
|
274
268
|
has_file?('assets/banner.png')
|
|
275
269
|
end
|
|
276
270
|
|
|
277
|
-
def has_svgs?
|
|
278
|
-
svg_files.any?
|
|
279
|
-
end
|
|
280
|
-
|
|
281
271
|
def location_icons
|
|
282
272
|
Hash.new { |h, k| h[k] = {} }.tap do |location_icons|
|
|
283
273
|
manifest.location_options.each do |location_options|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zendesk_apps_support
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.4.
|
|
4
|
+
version: 4.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James A. Rosen
|
|
@@ -111,34 +111,6 @@ dependencies:
|
|
|
111
111
|
- - "~>"
|
|
112
112
|
- !ruby/object:Gem::Version
|
|
113
113
|
version: 0.3.0
|
|
114
|
-
- !ruby/object:Gem::Dependency
|
|
115
|
-
name: loofah
|
|
116
|
-
requirement: !ruby/object:Gem::Requirement
|
|
117
|
-
requirements:
|
|
118
|
-
- - ">="
|
|
119
|
-
- !ruby/object:Gem::Version
|
|
120
|
-
version: '0'
|
|
121
|
-
type: :runtime
|
|
122
|
-
prerelease: false
|
|
123
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
124
|
-
requirements:
|
|
125
|
-
- - ">="
|
|
126
|
-
- !ruby/object:Gem::Version
|
|
127
|
-
version: '0'
|
|
128
|
-
- !ruby/object:Gem::Dependency
|
|
129
|
-
name: nokogiri
|
|
130
|
-
requirement: !ruby/object:Gem::Requirement
|
|
131
|
-
requirements:
|
|
132
|
-
- - "~>"
|
|
133
|
-
- !ruby/object:Gem::Version
|
|
134
|
-
version: 1.6.8.1
|
|
135
|
-
type: :runtime
|
|
136
|
-
prerelease: false
|
|
137
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
138
|
-
requirements:
|
|
139
|
-
- - "~>"
|
|
140
|
-
- !ruby/object:Gem::Version
|
|
141
|
-
version: 1.6.8.1
|
|
142
114
|
- !ruby/object:Gem::Dependency
|
|
143
115
|
name: rspec
|
|
144
116
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -195,20 +167,6 @@ dependencies:
|
|
|
195
167
|
- - "~>"
|
|
196
168
|
- !ruby/object:Gem::Version
|
|
197
169
|
version: 0.46.0
|
|
198
|
-
- !ruby/object:Gem::Dependency
|
|
199
|
-
name: byebug
|
|
200
|
-
requirement: !ruby/object:Gem::Requirement
|
|
201
|
-
requirements:
|
|
202
|
-
- - ">="
|
|
203
|
-
- !ruby/object:Gem::Version
|
|
204
|
-
version: '0'
|
|
205
|
-
type: :development
|
|
206
|
-
prerelease: false
|
|
207
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
208
|
-
requirements:
|
|
209
|
-
- - ">="
|
|
210
|
-
- !ruby/object:Gem::Version
|
|
211
|
-
version: '0'
|
|
212
170
|
description: Support to help you develop Zendesk Apps.
|
|
213
171
|
email:
|
|
214
172
|
- dev@zendesk.com
|
|
@@ -249,7 +207,6 @@ files:
|
|
|
249
207
|
- lib/zendesk_apps_support/validations/requirements.rb
|
|
250
208
|
- lib/zendesk_apps_support/validations/source.rb
|
|
251
209
|
- lib/zendesk_apps_support/validations/stylesheets.rb
|
|
252
|
-
- lib/zendesk_apps_support/validations/svg.rb
|
|
253
210
|
- lib/zendesk_apps_support/validations/templates.rb
|
|
254
211
|
- lib/zendesk_apps_support/validations/translations.rb
|
|
255
212
|
- lib/zendesk_apps_support/validations/validation_error.rb
|
|
@@ -265,7 +222,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
265
222
|
requirements:
|
|
266
223
|
- - ">="
|
|
267
224
|
- !ruby/object:Gem::Version
|
|
268
|
-
version: '
|
|
225
|
+
version: '0'
|
|
269
226
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
227
|
requirements:
|
|
271
228
|
- - ">="
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
require 'loofah'
|
|
3
|
-
|
|
4
|
-
module ZendeskAppsSupport
|
|
5
|
-
module Validations
|
|
6
|
-
module Svg
|
|
7
|
-
class << self
|
|
8
|
-
def call(package)
|
|
9
|
-
errors = []
|
|
10
|
-
package.svg_files.each do |svg|
|
|
11
|
-
markup = svg.read
|
|
12
|
-
clean_markup = Loofah.scrub_xml_document(markup, :prune).to_html
|
|
13
|
-
filepath = svg.relative_path
|
|
14
|
-
|
|
15
|
-
next if clean_markup == markup
|
|
16
|
-
begin
|
|
17
|
-
IO.write(filepath, clean_markup)
|
|
18
|
-
package.warnings << I18n.t('txt.apps.admin.warning.sanitised_svg', svg: filepath)
|
|
19
|
-
rescue
|
|
20
|
-
errors << ValidationError.new(:dirty_svg, svg: filepath)
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
errors
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|