zendesk_apps_support 4.10.0 → 4.11.0
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 +5 -5
- data/config/locales/translations/zendesk_apps_support.yml +1 -16
- data/lib/zendesk_apps_support.rb +1 -0
- data/lib/zendesk_apps_support/app_file.rb +1 -0
- data/lib/zendesk_apps_support/app_requirement.rb +3 -2
- data/lib/zendesk_apps_support/app_version.rb +1 -0
- data/lib/zendesk_apps_support/build_translation.rb +1 -0
- data/lib/zendesk_apps_support/engine.rb +1 -0
- data/lib/zendesk_apps_support/finders.rb +1 -0
- data/lib/zendesk_apps_support/i18n.rb +1 -0
- data/lib/zendesk_apps_support/installation.rb +1 -0
- data/lib/zendesk_apps_support/installed.rb +1 -0
- data/lib/zendesk_apps_support/location.rb +1 -0
- data/lib/zendesk_apps_support/manifest.rb +2 -1
- data/lib/zendesk_apps_support/manifest/location_options.rb +1 -0
- data/lib/zendesk_apps_support/manifest/no_override_hash.rb +1 -0
- data/lib/zendesk_apps_support/manifest/parameter.rb +3 -2
- data/lib/zendesk_apps_support/package.rb +3 -2
- data/lib/zendesk_apps_support/product.rb +1 -0
- data/lib/zendesk_apps_support/sass_functions.rb +1 -0
- data/lib/zendesk_apps_support/stylesheet_compiler.rb +1 -0
- data/lib/zendesk_apps_support/validations/banner.rb +1 -0
- data/lib/zendesk_apps_support/validations/manifest.rb +7 -7
- data/lib/zendesk_apps_support/validations/marketplace.rb +2 -1
- data/lib/zendesk_apps_support/validations/requirements.rb +1 -0
- data/lib/zendesk_apps_support/validations/source.rb +3 -2
- data/lib/zendesk_apps_support/validations/stylesheets.rb +1 -0
- data/lib/zendesk_apps_support/validations/svg.rb +1 -0
- data/lib/zendesk_apps_support/validations/templates.rb +1 -0
- data/lib/zendesk_apps_support/validations/translations.rb +2 -1
- data/lib/zendesk_apps_support/validations/validation_error.rb +1 -0
- metadata +11 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 651dbb4885312a3344235f1fc67430b4292378d8
|
|
4
|
+
data.tar.gz: 872abbf352ba3f02cae8a6902e0a09e203c9a303
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3648f0308aa79e2b962de36da307d8c8ca178b148d30ca2b81bbcd2f58d4cb9b2b740059da7353873d04c4082b6b3f70341af561d6efe86db7d36404c68e34bb
|
|
7
|
+
data.tar.gz: 14475794f8d8578fa05355ac485beb08cb463284b85868cd20dd688c3ba16369b39672dfd22864c0f960f480e30b244ceaf6783a75917d8c1e2f56c6be73b5e0
|
|
@@ -35,11 +35,6 @@ parts:
|
|
|
35
35
|
key: "txt.apps.admin.error.app_build.no_framework_version_required"
|
|
36
36
|
title: "App builder job: ban framework version while requirements only"
|
|
37
37
|
value: "Framework versions can't be set when you specify requirements only"
|
|
38
|
-
- translation:
|
|
39
|
-
key: "txt.apps.admin.error.app_build.no_app_js_required"
|
|
40
|
-
title: "App builder job: ban app.js while requirements only"
|
|
41
|
-
value: "Do not set your app to requirements only if you need app.js"
|
|
42
|
-
obsolete: "2016-02-28"
|
|
43
38
|
- translation:
|
|
44
39
|
key: "txt.apps.admin.error.app_build.manifest_not_json"
|
|
45
40
|
title: "App builder job: manifest is invalid JSON error"
|
|
@@ -187,18 +182,8 @@ parts:
|
|
|
187
182
|
- translation:
|
|
188
183
|
key: "txt.apps.admin.error.app_build.signed_setting_uri"
|
|
189
184
|
title: "App builder job: invalid URI for an iframe in the manifest. The `manifest` is a setting file, the `signed url` is https://cloud.google.com/storage/docs/access-control/signed-urls"
|
|
190
|
-
value: "
|
|
185
|
+
value: "The url (%{uri}) cannot use a setting because it is a signed url."
|
|
191
186
|
screenshot: "https://drive.google.com/open?id=1oQmBeGfNT5EDaEH3oEQoNjaCzBw5XAvL"
|
|
192
|
-
- translation:
|
|
193
|
-
key: "txt.apps.admin.error.app_build.duplicate_location.one"
|
|
194
|
-
title: "App builder job: duplicate locations"
|
|
195
|
-
value: "%{duplicate_locations} is a duplicate location."
|
|
196
|
-
obsolete: "2016-12-31"
|
|
197
|
-
- translation:
|
|
198
|
-
key: "txt.apps.admin.error.app_build.duplicate_location.other"
|
|
199
|
-
title: "App builder job: duplicate locations"
|
|
200
|
-
value: "%{duplicate_locations} are duplicate locations."
|
|
201
|
-
obsolete: "2016-12-31"
|
|
202
187
|
- translation:
|
|
203
188
|
key: "txt.apps.admin.error.app_build.name_as_parameter_name"
|
|
204
189
|
title: "App builder job: error message when developer names a parameter 'name'"
|
data/lib/zendesk_apps_support.rb
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
module ZendeskAppsSupport
|
|
3
4
|
class AppRequirement
|
|
4
|
-
TYPES = %w
|
|
5
|
+
TYPES = %w[automations channel_integrations
|
|
5
6
|
macros targets views ticket_fields triggers
|
|
6
|
-
user_fields organization_fields
|
|
7
|
+
user_fields organization_fields].freeze
|
|
7
8
|
end
|
|
8
9
|
end
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
module ZendeskAppsSupport
|
|
3
4
|
class Manifest
|
|
4
5
|
LEGACY_URI_STUB = '_legacy'
|
|
@@ -82,7 +83,7 @@ module ZendeskAppsSupport
|
|
|
82
83
|
noTemplate: no_template_locations,
|
|
83
84
|
singleInstall: single_install?,
|
|
84
85
|
signedUrls: signed_urls?
|
|
85
|
-
}.
|
|
86
|
+
}.reject { |_k, v| v.nil? }
|
|
86
87
|
end
|
|
87
88
|
|
|
88
89
|
def unknown_locations(host)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
module ZendeskAppsSupport
|
|
3
4
|
class Manifest
|
|
4
5
|
class Parameter
|
|
5
|
-
TYPES = %w
|
|
6
|
-
ATTRIBUTES = %i
|
|
6
|
+
TYPES = %w[text password checkbox url number multiline hidden].freeze
|
|
7
|
+
ATTRIBUTES = %i[name type required secure default].freeze
|
|
7
8
|
attr_reader(*ATTRIBUTES)
|
|
8
9
|
def default?
|
|
9
10
|
@has_default
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
require 'pathname'
|
|
3
4
|
require 'erubis'
|
|
4
5
|
require 'json'
|
|
@@ -15,7 +16,7 @@ module ZendeskAppsSupport
|
|
|
15
16
|
DEFAULT_SCSS = File.read(File.expand_path('../assets/default_styles.scss', __FILE__))
|
|
16
17
|
SRC_TEMPLATE = Erubis::Eruby.new(File.read(File.expand_path('../assets/src.js.erb', __FILE__)))
|
|
17
18
|
|
|
18
|
-
LOCATIONS_WITH_ICONS = %w
|
|
19
|
+
LOCATIONS_WITH_ICONS = %w[top_bar nav_bar system_top_bar ticket_editor].freeze
|
|
19
20
|
|
|
20
21
|
attr_reader :lib_root, :root, :warnings
|
|
21
22
|
|
|
@@ -326,7 +327,7 @@ module ZendeskAppsSupport
|
|
|
326
327
|
{
|
|
327
328
|
'inactive' => inactive_png
|
|
328
329
|
}.tap do |icon_state_hash|
|
|
329
|
-
%w
|
|
330
|
+
%w[active hover].each do |state|
|
|
330
331
|
specific_png = "#{product_directory}icon_#{location}_#{state}.png"
|
|
331
332
|
selected_png = has_file?("assets/#{specific_png}") ? specific_png : inactive_png
|
|
332
333
|
icon_state_hash[state] = selected_png
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# rubocop:disable ModuleLength
|
|
2
2
|
# frozen_string_literal: true
|
|
3
|
+
|
|
3
4
|
require 'uri'
|
|
4
5
|
|
|
5
6
|
module ZendeskAppsSupport
|
|
6
7
|
module Validations
|
|
7
8
|
module Manifest
|
|
8
9
|
RUBY_TO_JSON = ZendeskAppsSupport::Manifest::RUBY_TO_JSON
|
|
9
|
-
REQUIRED_MANIFEST_FIELDS = RUBY_TO_JSON.select { |k| %i
|
|
10
|
-
OAUTH_REQUIRED_FIELDS = %w
|
|
10
|
+
REQUIRED_MANIFEST_FIELDS = RUBY_TO_JSON.select { |k| %i[author default_locale].include? k }.freeze
|
|
11
|
+
OAUTH_REQUIRED_FIELDS = %w[client_id client_secret authorize_uri access_token_uri].freeze
|
|
11
12
|
PARAMETER_TYPES = ZendeskAppsSupport::Manifest::Parameter::TYPES
|
|
12
13
|
|
|
13
14
|
class << self
|
|
@@ -21,7 +22,6 @@ module ZendeskAppsSupport
|
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
collate_manifest_errors(package)
|
|
24
|
-
|
|
25
25
|
rescue JSON::ParserError => e
|
|
26
26
|
return [ValidationError.new(:manifest_not_json, errors: e)]
|
|
27
27
|
rescue ZendeskAppsSupport::Manifest::OverrideError => e
|
|
@@ -94,20 +94,20 @@ module ZendeskAppsSupport
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
def string_error(manifest)
|
|
97
|
-
manifest_strings = %i
|
|
97
|
+
manifest_strings = %i[
|
|
98
98
|
default_locale
|
|
99
99
|
version
|
|
100
100
|
framework_version
|
|
101
101
|
remote_installation_url
|
|
102
102
|
terms_conditions_url
|
|
103
103
|
google_analytics_code
|
|
104
|
-
|
|
104
|
+
]
|
|
105
105
|
errors = manifest_strings.map do |field|
|
|
106
106
|
validate_string(manifest.public_send(field), field)
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
if manifest.author
|
|
110
|
-
author_strings = %w
|
|
110
|
+
author_strings = %w[name email url]
|
|
111
111
|
errors << (author_strings.map do |field|
|
|
112
112
|
validate_string(manifest.author[field], "author #{field}")
|
|
113
113
|
end)
|
|
@@ -116,7 +116,7 @@ module ZendeskAppsSupport
|
|
|
116
116
|
end
|
|
117
117
|
|
|
118
118
|
def boolean_error(manifest)
|
|
119
|
-
booleans = %i
|
|
119
|
+
booleans = %i[requirements_only marketing_only single_install signed_urls private]
|
|
120
120
|
errors = []
|
|
121
121
|
RUBY_TO_JSON.each do |ruby, json|
|
|
122
122
|
if booleans.include? ruby
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
module ZendeskAppsSupport
|
|
3
4
|
module Validations
|
|
4
5
|
module Marketplace
|
|
5
|
-
WHITELISTED_EXPERIMENTS = %w
|
|
6
|
+
WHITELISTED_EXPERIMENTS = %w[hashParams newCssCompiler].freeze
|
|
6
7
|
|
|
7
8
|
class << self
|
|
8
9
|
def call(package)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
require 'jshintrb'
|
|
3
4
|
|
|
4
5
|
module ZendeskAppsSupport
|
|
@@ -15,8 +16,8 @@ module ZendeskAppsSupport
|
|
|
15
16
|
sub: true,
|
|
16
17
|
|
|
17
18
|
# predefined globals:
|
|
18
|
-
predef: %w
|
|
19
|
-
JSON Base64 require module exports moment
|
|
19
|
+
predef: %w[_ console services helpers alert confirm self
|
|
20
|
+
JSON Base64 require module exports moment],
|
|
20
21
|
|
|
21
22
|
browser: true
|
|
22
23
|
}.freeze
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
require 'jshintrb'
|
|
3
4
|
require 'json'
|
|
4
5
|
|
|
@@ -135,7 +136,7 @@ module ZendeskAppsSupport
|
|
|
135
136
|
end
|
|
136
137
|
|
|
137
138
|
def get_missing_keys(package, keys)
|
|
138
|
-
public_app_keys = %w
|
|
139
|
+
public_app_keys = %w[name short_description installation_instructions long_description]
|
|
139
140
|
mandatory_keys = package.manifest.private? ? ['name'] : public_app_keys
|
|
140
141
|
|
|
141
142
|
# since we support description as well as short_description for backwards compatibility,
|
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
|
+
version: 4.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James A. Rosen
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2018-
|
|
14
|
+
date: 2018-04-04 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: i18n
|
|
@@ -115,30 +115,30 @@ dependencies:
|
|
|
115
115
|
name: loofah
|
|
116
116
|
requirement: !ruby/object:Gem::Requirement
|
|
117
117
|
requirements:
|
|
118
|
-
- - "
|
|
118
|
+
- - "~>"
|
|
119
119
|
- !ruby/object:Gem::Version
|
|
120
|
-
version:
|
|
120
|
+
version: 2.2.1
|
|
121
121
|
type: :runtime
|
|
122
122
|
prerelease: false
|
|
123
123
|
version_requirements: !ruby/object:Gem::Requirement
|
|
124
124
|
requirements:
|
|
125
|
-
- - "
|
|
125
|
+
- - "~>"
|
|
126
126
|
- !ruby/object:Gem::Version
|
|
127
|
-
version:
|
|
127
|
+
version: 2.2.1
|
|
128
128
|
- !ruby/object:Gem::Dependency
|
|
129
129
|
name: nokogiri
|
|
130
130
|
requirement: !ruby/object:Gem::Requirement
|
|
131
131
|
requirements:
|
|
132
132
|
- - "~>"
|
|
133
133
|
- !ruby/object:Gem::Version
|
|
134
|
-
version: 1.
|
|
134
|
+
version: 1.8.1
|
|
135
135
|
type: :runtime
|
|
136
136
|
prerelease: false
|
|
137
137
|
version_requirements: !ruby/object:Gem::Requirement
|
|
138
138
|
requirements:
|
|
139
139
|
- - "~>"
|
|
140
140
|
- !ruby/object:Gem::Version
|
|
141
|
-
version: 1.
|
|
141
|
+
version: 1.8.1
|
|
142
142
|
- !ruby/object:Gem::Dependency
|
|
143
143
|
name: rspec
|
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -187,14 +187,14 @@ dependencies:
|
|
|
187
187
|
requirements:
|
|
188
188
|
- - "~>"
|
|
189
189
|
- !ruby/object:Gem::Version
|
|
190
|
-
version: 0.
|
|
190
|
+
version: 0.49.0
|
|
191
191
|
type: :development
|
|
192
192
|
prerelease: false
|
|
193
193
|
version_requirements: !ruby/object:Gem::Requirement
|
|
194
194
|
requirements:
|
|
195
195
|
- - "~>"
|
|
196
196
|
- !ruby/object:Gem::Version
|
|
197
|
-
version: 0.
|
|
197
|
+
version: 0.49.0
|
|
198
198
|
- !ruby/object:Gem::Dependency
|
|
199
199
|
name: byebug
|
|
200
200
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -274,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
274
274
|
version: 1.3.6
|
|
275
275
|
requirements: []
|
|
276
276
|
rubyforge_project:
|
|
277
|
-
rubygems_version: 2.
|
|
277
|
+
rubygems_version: 2.6.8
|
|
278
278
|
signing_key:
|
|
279
279
|
specification_version: 4
|
|
280
280
|
summary: Support to help you develop Zendesk Apps.
|