zendesk_apps_support 4.41.0 → 4.42.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a867de06df6934328f28746767d50097a5d5b385c8da990d94a2daff49aa3c2d
4
- data.tar.gz: d651c97273656fb230011b9e7acc31cc2cb4f655bd2277ff696f2097d1b100d1
3
+ metadata.gz: 4a4b57610d473248babf721ef9edd4adff8a6fb96aea6d3e323f3a6919d19f49
4
+ data.tar.gz: d2bc43a0736ebe9950423d77d5adba5549d83dab35671aae797d78233b7128ae
5
5
  SHA512:
6
- metadata.gz: 561065d305edf5ca0d45479a0fd601aa095cd191b667ddabeb95ffacf1aee801287f82469ab1e72189bbb60cb6c25b1f2001ea567dc2833ee62e2d230fb367f8
7
- data.tar.gz: 1836657e718f8eda2e38299ad23010e68e57c88fdfcd675673a4bbd5c353c67308e8538dc274637d00261bec45a248c2e5fd4988cf133509004e83f881cf2647
6
+ metadata.gz: bc6ab57adfa809e876b5fd03ade9fefd683a7d64fb65d4d44da6d03b4b1f5a4feacbfacf710b50281bbcaa890c91355742ece1e67384b4ce2d3569406ef24525
7
+ data.tar.gz: da3d8aceccf0e66f308718ecdc469e7d632ece824b578e6ec38b67e34ccb0577eeed3e7c35cba7068c9d5ce35ec8bd3184fa28054705470b17bcef4c7837c139
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  Classes to manage and validate Zendesk Apps. This is a gem used in [Zendesk Apps Tools](https://github.com/zendesk/zendesk_apps_tools/).
5
5
 
6
6
  ## Owners
7
- This repo is owned and maintained by the Zendesk Apps team. You can reach us on vegemite@zendesk.com. We are located in Melbourne!
7
+ This repo is owned and maintained by the Zendesk Apps team. You can reach us on wattle@zendesk.com. We are located in Melbourne!
8
8
 
9
9
  ## Getting Started
10
10
  When you want to help **develop** this tool, you will need to clone this repo.
@@ -16,7 +16,7 @@ This project uses Rspec, which can be run with `bundle exec rake`.
16
16
 
17
17
  ## Contribute
18
18
  * Put up a PR into the master branch.
19
- * CC and get two +1 from @zendesk/wattle, or @zendesk/vegemite.
19
+ * CC and get two +1 from @zendesk/wattle.
20
20
 
21
21
  ## Bugs
22
22
  Bugs can be reported as an issue here on github, or submitted to support@zendesk.com. By mentioning this project it will assigned to the right team.
@@ -123,6 +123,8 @@ en:
123
123
  for %{product}: %{missing_key}'
124
124
  products_do_not_match_manifest_products: Products in manifest (%{manifest_products})
125
125
  do not match products in translations (%{translation_products})
126
+ password_parameter_deprecated: 'Password parameter type is deprecated and will not
127
+ be accepted in the future. Use Basic Access Authentication instead. Learn more: %{link}.'
126
128
  insecure_token_parameter_in_manifest: 'Make sure to set secure to true
127
129
  when using keys in Settings. Learn more: %{link}'
128
130
  default_secure_or_hidden_parameter_in_manifest: Default values for secure
@@ -354,6 +354,11 @@ parts:
354
354
  title: "Validation message to indicate missing secure(true) field in manifest's token parameter. Do not translate 'secure' and 'true'. Secure(true) in manifest refers to https://developer.zendesk.com/apps/docs/developer-guide/using_sdk#using-secure-settings"
355
355
  value: "Make sure to set secure to true when using keys in Settings. Learn more: %{link}"
356
356
  screenshot: "https://drive.google.com/open?id=1ss3nNN2RG29R7StjCtiH8qjuwFBlRApJ"
357
+ - translation:
358
+ key: "txt.apps.admin.error.app_build.translation.password_parameter_deprecated"
359
+ title: "Validation message to indicate deprecated password parameter is being used. Do not translate 'Password'."
360
+ value: "Password parameter type is deprecated and will not be accepted in the future. Use Basic Access Authentication instead. Learn more: %{link}."
361
+ screenshot: "https://drive.google.com/file/d/1S2cecD3h1pIoc5mpG-D966B0gHNlRvhz"
357
362
  - translation:
358
363
  key: "txt.apps.admin.error.app_build.translation.default_secure_or_hidden_parameter_in_manifest"
359
364
  title: "Validation message to indicate that a hidden or secure manifest parameter has a default value. Do not translate 'secure' and 'hidden'. Secure(true) in manifest refers to https://developer.zendesk.com/apps/docs/developer-guide/using_sdk#using-secure-settings"
@@ -31,9 +31,9 @@ module ZendeskAppsSupport
31
31
  @warnings = []
32
32
  end
33
33
 
34
- def validate(marketplace: true, skip_marketplace_translations: false, apply_password_parameter_check: false)
34
+ def validate(marketplace: true, skip_marketplace_translations: false, error_on_password_parameter: false)
35
35
  errors = []
36
- errors << Validations::Manifest.call(self, apply_password_parameter_check: apply_password_parameter_check)
36
+ errors << Validations::Manifest.call(self, error_on_password_parameter: error_on_password_parameter)
37
37
 
38
38
  if has_valid_manifest?(errors)
39
39
  errors << Validations::Marketplace.call(self) if marketplace
@@ -61,8 +61,8 @@ module ZendeskAppsSupport
61
61
  errors.flatten.compact
62
62
  end
63
63
 
64
- def validate!(marketplace: true, skip_marketplace_translations: false, apply_password_parameter_check: false)
65
- errors = validate(marketplace: marketplace, skip_marketplace_translations: skip_marketplace_translations, apply_password_parameter_check: apply_password_parameter_check)
64
+ def validate!(marketplace: true, skip_marketplace_translations: false, error_on_password_parameter: false)
65
+ errors = validate(marketplace: marketplace, skip_marketplace_translations: skip_marketplace_translations, error_on_password_parameter: error_on_password_parameter)
66
66
  raise errors.first if errors.any?
67
67
  true
68
68
  end
@@ -13,7 +13,7 @@ module ZendeskAppsSupport
13
13
  OAUTH_MANIFEST_LINK = 'https://developer.zendesk.com/apps/docs/developer-guide/manifest#oauth'
14
14
 
15
15
  class << self
16
- def call(package, apply_password_parameter_check: false)
16
+ def call(package, error_on_password_parameter: false)
17
17
  unless package.has_file?('manifest.json')
18
18
  nested_manifest = package.files.find { |file| file =~ %r{\A[^/]+?/manifest\.json\Z} }
19
19
  if nested_manifest
@@ -22,7 +22,9 @@ module ZendeskAppsSupport
22
22
  return [ValidationError.new(:missing_manifest)]
23
23
  end
24
24
 
25
- collate_manifest_errors(package, apply_password_parameter_check)
25
+ package.warnings << password_parameter_warning unless error_on_password_parameter
26
+
27
+ collate_manifest_errors(package, error_on_password_parameter)
26
28
  rescue JSON::ParserError => e
27
29
  return [ValidationError.new(:manifest_not_json, errors: e)]
28
30
  rescue ZendeskAppsSupport::Manifest::OverrideError => e
@@ -31,7 +33,7 @@ module ZendeskAppsSupport
31
33
 
32
34
  private
33
35
 
34
- def collate_manifest_errors(package, apply_password_parameter_check)
36
+ def collate_manifest_errors(package, error_on_password_parameter)
35
37
  manifest = package.manifest
36
38
 
37
39
  errors = [
@@ -50,7 +52,7 @@ module ZendeskAppsSupport
50
52
  invalid_version_error(manifest) ]
51
53
  end,
52
54
  ban_no_template(manifest),
53
- if apply_password_parameter_check
55
+ if error_on_password_parameter
54
56
  [ deprecate_password_parameter_type(manifest) ]
55
57
  end
56
58
  ]
@@ -449,6 +451,13 @@ module ZendeskAppsSupport
449
451
  rescue URI::InvalidURIError
450
452
  false
451
453
  end
454
+
455
+ def password_parameter_warning
456
+ I18n.t(
457
+ 'txt.apps.admin.error.app_build.translation.password_parameter_deprecated',
458
+ link: 'https://developer.zendesk.com/documentation/apps/app-developer-guide/making-api-requests-from-a-zendesk-app/#using-basic-access-authentication'
459
+ )
460
+ end
452
461
  end
453
462
  end
454
463
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zendesk_apps_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.41.0
4
+ version: 4.42.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James A. Rosen
8
8
  - Likun Liu
9
9
  - Sean Caffery
10
10
  - Daniel Ribeiro
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-09-30 00:00:00.000000000 Z
14
+ date: 2025-04-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: i18n
@@ -338,7 +338,7 @@ homepage: http://github.com/zendesk/zendesk_apps_support
338
338
  licenses:
339
339
  - Apache License Version 2.0
340
340
  metadata: {}
341
- post_install_message:
341
+ post_install_message:
342
342
  rdoc_options: []
343
343
  require_paths:
344
344
  - lib
@@ -353,8 +353,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
353
353
  - !ruby/object:Gem::Version
354
354
  version: 1.3.6
355
355
  requirements: []
356
- rubygems_version: 3.5.16
357
- signing_key:
356
+ rubygems_version: 3.5.22
357
+ signing_key:
358
358
  specification_version: 4
359
359
  summary: Support to help you develop Zendesk Apps.
360
360
  test_files: []