zendesk_apps_support 3.3.4 → 3.3.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19222b64e8ff67b0afffaf3c9fe90ea2e7b84336
|
4
|
+
data.tar.gz: e3947b4cf588795edcf1a2ad094e4ab568da46d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dca48bfc664508930843c1b8d9954e126ccb0d0db5bd8275530f3f99a855697aef9aca2f4880c186acfd8c5937a3b0606e263f770440bc7757139a507020043
|
7
|
+
data.tar.gz: b05e60e7d88015ee3bd496b27aeefdaac5e80d24fc5f4853210aaaee4a4a867339614ea42903a4add1aaa6a9dfa1f816430d4a48cbb7c3d1a8a4c53aee2198e6
|
data/config/locales/en.yml
CHANGED
@@ -10,10 +10,11 @@ en:
|
|
10
10
|
one: 'JSHint error in %{file}: %{errors}'
|
11
11
|
other: 'JSHint errors in %{file}: %{errors}'
|
12
12
|
no_template_deprecated_in_v2: 'noTemplate is deprecated and cannot be
|
13
|
-
used with
|
13
|
+
used with framework version 2 or above. Set the autoLoad or autoHide
|
14
14
|
property for each specific location instead. Learn more: %{link}.'
|
15
15
|
no_parameters_required: Parameters can't be defined for marketing-only
|
16
16
|
apps
|
17
|
+
marketing_only_app_cant_be_private: Marketing-only apps must not be private
|
17
18
|
no_location_required: Locations can't be defined when you specify requirements
|
18
19
|
only
|
19
20
|
no_framework_version_required: Framework versions can't be set when you
|
@@ -23,6 +23,10 @@ parts:
|
|
23
23
|
key: "txt.apps.admin.error.app_build.no_parameters_required"
|
24
24
|
title: "App builder job: prevent adding parameters while marketing only"
|
25
25
|
value: "Parameters can't be defined for marketing-only apps"
|
26
|
+
- translation:
|
27
|
+
key: "txt.apps.admin.error.app_build.marketing_only_app_cant_be_private"
|
28
|
+
title: "App builder job: prevent creating a private marketing only app"
|
29
|
+
value: "Marketing-only apps must not be private"
|
26
30
|
- translation:
|
27
31
|
key: "txt.apps.admin.error.app_build.no_location_required"
|
28
32
|
title: "App builder job: ban location while requirements only"
|
@@ -47,12 +47,10 @@ module ZendeskAppsSupport
|
|
47
47
|
|
48
48
|
def products
|
49
49
|
@products ||=
|
50
|
-
if requirements_only?
|
50
|
+
if requirements_only? || marketing_only?
|
51
51
|
[ Product::SUPPORT ]
|
52
52
|
else
|
53
|
-
|
54
|
-
.uniq
|
55
|
-
.map { |code| Product.find_by(code: code) }
|
53
|
+
products_from_locations
|
56
54
|
end
|
57
55
|
end
|
58
56
|
|
@@ -134,6 +132,12 @@ module ZendeskAppsSupport
|
|
134
132
|
|
135
133
|
attr_reader :locations
|
136
134
|
|
135
|
+
def products_from_locations
|
136
|
+
location_options.map { |lo| lo.location.product_code }
|
137
|
+
.uniq
|
138
|
+
.map { |code| Product.find_by(code: code) }
|
139
|
+
end
|
140
|
+
|
137
141
|
def set_locations_and_hosts
|
138
142
|
@locations =
|
139
143
|
case original_locations
|
@@ -22,6 +22,7 @@ module ZendeskAppsSupport
|
|
22
22
|
|
23
23
|
private
|
24
24
|
|
25
|
+
# rubocop:disable Metrics/AbcSize
|
25
26
|
def collate_manifest_errors(package)
|
26
27
|
manifest = package.manifest
|
27
28
|
|
@@ -33,6 +34,7 @@ module ZendeskAppsSupport
|
|
33
34
|
|
34
35
|
if manifest.marketing_only?
|
35
36
|
errors << ban_parameters(manifest)
|
37
|
+
errors << private_marketing_app_error(manifest)
|
36
38
|
else
|
37
39
|
errors << parameters_error(manifest)
|
38
40
|
errors << invalid_hidden_parameter_error(manifest)
|
@@ -57,6 +59,7 @@ module ZendeskAppsSupport
|
|
57
59
|
|
58
60
|
errors.flatten.compact
|
59
61
|
end
|
62
|
+
# rubocop:enable Metrics/AbcSize
|
60
63
|
|
61
64
|
def boolean_error(manifest)
|
62
65
|
booleans = %i(requirements_only marketing_only single_install signed_urls private)
|
@@ -100,6 +103,10 @@ module ZendeskAppsSupport
|
|
100
103
|
ValidationError.new(:no_framework_version_required) unless manifest.framework_version.nil?
|
101
104
|
end
|
102
105
|
|
106
|
+
def private_marketing_app_error(manifest)
|
107
|
+
ValidationError.new(:marketing_only_app_cant_be_private) if manifest.private?
|
108
|
+
end
|
109
|
+
|
103
110
|
def oauth_error(manifest)
|
104
111
|
return unless manifest.oauth
|
105
112
|
|
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: 3.3.
|
4
|
+
version: 3.3.5
|
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: 2017-01-
|
14
|
+
date: 2017-01-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: i18n
|