zendesk_apps_support 3.5.1 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locales/en.yml +1 -1
- data/lib/zendesk_apps_support/validations/requirements.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dff663a4fecfb4aad2c872f29596c5a997fcda45
|
4
|
+
data.tar.gz: 534fb2fb5ca3bf406d1a40b41cacc5fa06d190d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a54805d0630a3690458eaae3c560f847790dd977d90e4aa5a7d0068564445e0d982c973e507357ac2551f455d95115a3f1db13392091db6920913e15127c981
|
7
|
+
data.tar.gz: 9510a9430d54f4d6edddd1d148470f40a0ef854217144685bab114e859ee62c249679f03549c8a456e3e84ee2f3889d3cc073efc3d330f3c9c854d671e91e000
|
data/config/locales/en.yml
CHANGED
@@ -36,7 +36,7 @@ en:
|
|
36
36
|
an array containing strings
|
37
37
|
missing_requirements: Could not find requirements.json
|
38
38
|
requirements_not_supported: App requirements are not supported for marketing-only
|
39
|
-
apps
|
39
|
+
apps or Chat-only apps
|
40
40
|
manifest_keys:
|
41
41
|
missing:
|
42
42
|
one: 'Missing required field in manifest: %{missing_keys}'
|
@@ -8,7 +8,7 @@ module ZendeskAppsSupport
|
|
8
8
|
def call(package)
|
9
9
|
if package.manifest.requirements_only? && !package.has_requirements?
|
10
10
|
return [ValidationError.new(:missing_requirements)]
|
11
|
-
elsif package
|
11
|
+
elsif !supports_requirements(package) && package.has_requirements?
|
12
12
|
return [ValidationError.new(:requirements_not_supported)]
|
13
13
|
elsif !package.has_requirements?
|
14
14
|
return []
|
@@ -35,6 +35,10 @@ module ZendeskAppsSupport
|
|
35
35
|
|
36
36
|
private
|
37
37
|
|
38
|
+
def supports_requirements(package)
|
39
|
+
!package.manifest.marketing_only? && package.manifest.products != [Product::CHAT]
|
40
|
+
end
|
41
|
+
|
38
42
|
def missing_required_fields(requirements)
|
39
43
|
[].tap do |errors|
|
40
44
|
requirements.each do |requirement_type, requirement|
|
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.
|
4
|
+
version: 3.6.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: 2017-08-
|
14
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: i18n
|