zendesk_apps_support 4.29.3 → 4.29.4

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
  SHA256:
3
- metadata.gz: dba69f9baf26e1f28d4cd6538eb63d67f9f182b04469cb3ab6d9b02f69579081
4
- data.tar.gz: 29a12f5b4f0dc4f24d9f92fe3654050ca2f20f3d3036353b411024053db94a86
3
+ metadata.gz: 8a0de7b7d7fcdd4588d5eff4a44ca2b7359630094c9660705f6964867de0324f
4
+ data.tar.gz: c2184021707a952289f78987019a8aab46fcebe51f094c8e0b5cba28aff57381
5
5
  SHA512:
6
- metadata.gz: cf68d496dfb03184b5e2065e35e13d87c6baa932809d91963c72c836142eb23b3c487d74fb0a434a0fa4345563886e9b8dd456080ee3fd805e8b7d8a993d534d
7
- data.tar.gz: 29d5b553e3df6fdae73ac4185c41023185c8a1cc52de1733faa0977ea90d0be481cd3f2a0c66152823ffacf35f6547516f8308018ddbe5e333349d6f798adb2d
6
+ metadata.gz: c523f4bc63ff062085caebc36d05d708fd475661e338811d2ab435c011499333189a55965a3bb1b7b070f16d6ce2103210caf96edaafd13b264fcc19fdd5749e
7
+ data.tar.gz: b16330afa2508ad09407910ba8887c8e2f7304306d8141493059b71773783189426482b2731e126a0b5464dfa79dbbf19de4f86b912d0b7d47d9085a86e7b51a
@@ -62,6 +62,7 @@ en:
62
62
  other: Unsupported MIME types detected in %{file_names}.
63
63
  multiple_channel_integrations: Specifying multiple channel integrations
64
64
  in requirements.json is not supported.
65
+ oauth_parameter_required: "Please upgrade to our new oauth format. Learn more: %{link}"
65
66
  invalid_cr_schema_keys:
66
67
  one: 'Custom resources schema contains an invalid key: %{invalid_keys}'
67
68
  other: 'Custom resources schema contains invalid keys: %{invalid_keys}'
@@ -10,6 +10,7 @@ module ZendeskAppsSupport
10
10
  REQUIRED_MANIFEST_FIELDS = RUBY_TO_JSON.select { |k| %i[author default_locale].include? k }.freeze
11
11
  OAUTH_REQUIRED_FIELDS = %w[client_id client_secret authorize_uri access_token_uri].freeze
12
12
  PARAMETER_TYPES = ZendeskAppsSupport::Manifest::Parameter::TYPES
13
+ OAUTH_MANIFEST_LINK = 'https://developer.zendesk.com/apps/docs/developer-guide/manifest#oauth'
13
14
 
14
15
  class << self
15
16
  def call(package)
@@ -197,14 +198,21 @@ module ZendeskAppsSupport
197
198
 
198
199
  def oauth_error(manifest)
199
200
  return unless manifest.oauth
200
-
201
+ oauth_errors = []
201
202
  missing = OAUTH_REQUIRED_FIELDS.select do |key|
202
203
  manifest.oauth[key].nil? || manifest.oauth[key].empty?
203
204
  end
204
205
 
205
206
  if missing.any?
206
- ValidationError.new('oauth_keys.missing', missing_keys: missing.join(', '), count: missing.length)
207
+ oauth_errors << \
208
+ ValidationError.new('oauth_keys.missing', missing_keys: missing.join(', '), count: missing.length)
209
+ end
210
+
211
+ unless manifest.parameters.any? { |param| param.type == 'oauth' }
212
+ oauth_errors << ValidationError.new('oauth_parameter_required',
213
+ link: OAUTH_MANIFEST_LINK)
207
214
  end
215
+ oauth_errors
208
216
  end
209
217
 
210
218
  def parameters_error(manifest)
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.29.3
4
+ version: 4.29.4
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: 2020-07-15 00:00:00.000000000 Z
14
+ date: 2020-07-22 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: i18n
@@ -319,7 +319,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
319
319
  - !ruby/object:Gem::Version
320
320
  version: 1.3.6
321
321
  requirements: []
322
- rubygems_version: 3.0.6
322
+ rubyforge_project:
323
+ rubygems_version: 2.7.10
323
324
  signing_key:
324
325
  specification_version: 4
325
326
  summary: Support to help you develop Zendesk Apps.