zendesk_apps_support 4.41.0 → 4.43.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 +4 -4
- data/README.md +18 -3
- data/config/locales/en.yml +2 -0
- data/config/locales/translations/zendesk_apps_support.yml +5 -0
- data/lib/zendesk_apps_support/package.rb +4 -4
- data/lib/zendesk_apps_support/validations/manifest.rb +13 -4
- data/lib/zendesk_apps_support/validations/secrets.rb +2 -2
- data/lib/zendesk_apps_support/validations/translations.rb +1 -1
- data/lib/zendesk_apps_support/version.rb +3 -0
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb1263460bfbe9c194c8fda9e78daf072564bef7a21aedb306de03b559ce5421
|
4
|
+
data.tar.gz: ddabccda72e04ab33db2a26175ca262da66981b683b1a1c5160553d14b59ebfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44bc5bd9f53ed9a6b3d7ddd41fa235056967e5cd53a6b8e6a12cd5cc27e69e4cf3314e8f2b318cc336d182295965aa14f54b29de8d923915b2aec4bc007ea8a3
|
7
|
+
data.tar.gz: faaa6f86ad8e7cf652853817570b8b56b3fc27121a8d6c6451b4c07492582432a7794929d2dbe9890639883a017628ea8eda1c0afda0dcecf114d2ad18f53fa8
|
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
|
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.
|
@@ -15,8 +15,23 @@ Very likely you want to try out your changes with the use of ZAT. See [ZAT](http
|
|
15
15
|
This project uses Rspec, which can be run with `bundle exec rake`.
|
16
16
|
|
17
17
|
## Contribute
|
18
|
-
* Put up a PR into the
|
19
|
-
* CC and get two +1 from @zendesk/wattle
|
18
|
+
* Put up a PR into the main branch.
|
19
|
+
* CC and get two +1 from @zendesk/wattle.
|
20
|
+
|
21
|
+
### Releasing a new version
|
22
|
+
A new version is published to RubyGems.org every time a change to `version.rb` is pushed to the `main` branch.
|
23
|
+
In short, follow these steps:
|
24
|
+
1. Update `version.rb`,
|
25
|
+
2. run `bundle lock` to update `Gemfile.lock`,
|
26
|
+
3. merge this change into `main`, and
|
27
|
+
4. look at [the action](https://github.com/zendesk/zendesk_apps_support/actions/workflows/publish.yml) for output.
|
28
|
+
|
29
|
+
To create a pre-release from a non-main branch:
|
30
|
+
1. change the version in `version.rb` to something like `1.2.0.pre.1` or `2.0.0.beta.2`,
|
31
|
+
2. push this change to your branch,
|
32
|
+
3. go to [Actions → “Publish to RubyGems.org” on GitHub](https://github.com/zendesk/zendesk_apps_support/actions/workflows/publish.yml),
|
33
|
+
4. click the “Run workflow” button,
|
34
|
+
5. pick your branch from a dropdown.
|
20
35
|
|
21
36
|
## Bugs
|
22
37
|
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.
|
data/config/locales/en.yml
CHANGED
@@ -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,
|
34
|
+
def validate(marketplace: true, skip_marketplace_translations: false, error_on_password_parameter: false)
|
35
35
|
errors = []
|
36
|
-
errors << Validations::Manifest.call(self,
|
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,
|
65
|
-
errors = validate(marketplace: marketplace, skip_marketplace_translations: skip_marketplace_translations,
|
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,
|
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
|
-
|
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,
|
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
|
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
|
@@ -9,7 +9,7 @@ module ZendeskAppsSupport
|
|
9
9
|
].freeze
|
10
10
|
|
11
11
|
APPLICATION_SECRETS = {
|
12
|
-
# rubocop:disable
|
12
|
+
# rubocop:disable Layout/LineLength
|
13
13
|
'Slack Token' => /(xox[p|b|o|a]-*.[a-z0-9])/,
|
14
14
|
'RSA Private Key' => /-----BEGIN RSA PRIVATE KEY-----/,
|
15
15
|
'SSH Private Key (OpenSSH)' => /-----BEGIN OPENSSH PRIVATE KEY-----/,
|
@@ -45,7 +45,7 @@ module ZendeskAppsSupport
|
|
45
45
|
'Attachment Token Key' => /(attachment_token_key.*.[0-9a-f]{24,72})/,
|
46
46
|
'Password' => /([pP][aA][sS][sS][wW][oO][rR][dD].*.[0-9a-zA-Z+_.-]{4,156})/,
|
47
47
|
'Token' => /([tT][oO][kK][eE][nN]( [:\"=-]|[:\"=-]).*.[0-9a-zA-Z+_.-]{4,156})/
|
48
|
-
# rubocop:enable
|
48
|
+
# rubocop:enable Layout/LineLength
|
49
49
|
}.freeze
|
50
50
|
|
51
51
|
class << self
|
@@ -19,7 +19,7 @@ module ZendeskAppsSupport
|
|
19
19
|
errors << locale_error(file, path_match[1]) << json_error(file) << format_error(file)
|
20
20
|
next unless errors.compact.empty?
|
21
21
|
if file.relative_path == 'translations/en.json'
|
22
|
-
# rubocop:disable
|
22
|
+
# rubocop:disable Layout/LineLength
|
23
23
|
errors.push(*validate_marketplace_content(file, package, opts.fetch(:skip_marketplace_translations, false)))
|
24
24
|
end
|
25
25
|
end.compact
|
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.
|
4
|
+
version: 4.43.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:
|
14
|
+
date: 2025-07-15 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: i18n
|
@@ -233,16 +233,16 @@ dependencies:
|
|
233
233
|
name: byebug
|
234
234
|
requirement: !ruby/object:Gem::Requirement
|
235
235
|
requirements:
|
236
|
-
- - "
|
236
|
+
- - ">="
|
237
237
|
- !ruby/object:Gem::Version
|
238
|
-
version:
|
238
|
+
version: '0'
|
239
239
|
type: :development
|
240
240
|
prerelease: false
|
241
241
|
version_requirements: !ruby/object:Gem::Requirement
|
242
242
|
requirements:
|
243
|
-
- - "
|
243
|
+
- - ">="
|
244
244
|
- !ruby/object:Gem::Version
|
245
|
-
version:
|
245
|
+
version: '0'
|
246
246
|
- !ruby/object:Gem::Dependency
|
247
247
|
name: bundler
|
248
248
|
requirement: !ruby/object:Gem::Requirement
|
@@ -334,11 +334,12 @@ files:
|
|
334
334
|
- lib/zendesk_apps_support/validations/templates.rb
|
335
335
|
- lib/zendesk_apps_support/validations/translations.rb
|
336
336
|
- lib/zendesk_apps_support/validations/validation_error.rb
|
337
|
+
- lib/zendesk_apps_support/version.rb
|
337
338
|
homepage: http://github.com/zendesk/zendesk_apps_support
|
338
339
|
licenses:
|
339
340
|
- Apache License Version 2.0
|
340
341
|
metadata: {}
|
341
|
-
post_install_message:
|
342
|
+
post_install_message:
|
342
343
|
rdoc_options: []
|
343
344
|
require_paths:
|
344
345
|
- lib
|
@@ -346,15 +347,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
346
347
|
requirements:
|
347
348
|
- - ">="
|
348
349
|
- !ruby/object:Gem::Version
|
349
|
-
version: '2
|
350
|
+
version: '3.2'
|
350
351
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
351
352
|
requirements:
|
352
353
|
- - ">="
|
353
354
|
- !ruby/object:Gem::Version
|
354
355
|
version: 1.3.6
|
355
356
|
requirements: []
|
356
|
-
rubygems_version: 3.
|
357
|
-
signing_key:
|
357
|
+
rubygems_version: 3.4.19
|
358
|
+
signing_key:
|
358
359
|
specification_version: 4
|
359
360
|
summary: Support to help you develop Zendesk Apps.
|
360
361
|
test_files: []
|