zendesk_apps_support 4.39.0 → 4.41.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:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: a867de06df6934328f28746767d50097a5d5b385c8da990d94a2daff49aa3c2d
         | 
| 4 | 
            +
              data.tar.gz: d651c97273656fb230011b9e7acc31cc2cb4f655bd2277ff696f2097d1b100d1
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 561065d305edf5ca0d45479a0fd601aa095cd191b667ddabeb95ffacf1aee801287f82469ab1e72189bbb60cb6c25b1f2001ea567dc2833ee62e2d230fb367f8
         | 
| 7 | 
            +
              data.tar.gz: 1836657e718f8eda2e38299ad23010e68e57c88fdfcd675673a4bbd5c353c67308e8538dc274637d00261bec45a248c2e5fd4988cf133509004e83f881cf2647
         | 
    
        data/config/locales/en.yml
    CHANGED
    
    | @@ -149,6 +149,8 @@ en: | |
| 149 149 | 
             
                        oauth_parameter_cannot_be_secure: oauth parameter cannot be set to be
         | 
| 150 150 | 
             
                          secure.
         | 
| 151 151 | 
             
                        invalid_url: '%{field} must be a valid URL, got "%{value}".'
         | 
| 152 | 
            +
                        password_parameter_type_deprecated: 'Password parameter type can no longer
         | 
| 153 | 
            +
                          be used. Use Secure settings instead. Learn more: %{link}.'
         | 
| 152 154 | 
             
                    warning:
         | 
| 153 155 | 
             
                      app_build:
         | 
| 154 156 | 
             
                        deprecated_version: You are targeting a deprecated version of the framework.
         | 
| @@ -415,3 +415,7 @@ parts: | |
| 415 415 | 
             
                  key: "txt.apps.admin.error.app_build.invalid_url"
         | 
| 416 416 | 
             
                  title: "App builder job: this value needs to be a valid URL, but something else was passed in. placeholder value is taken from user input. You can translate as: The value %{field} must be a valid URL... to avoid any gender issues."
         | 
| 417 417 | 
             
                  value: "%{field} must be a valid URL, got \"%{value}\"."
         | 
| 418 | 
            +
              - translation:
         | 
| 419 | 
            +
                  key: "txt.apps.admin.error.app_build.password_parameter_type_deprecated"
         | 
| 420 | 
            +
                  title: "App builder job: Password parameter type is deprecated"
         | 
| 421 | 
            +
                  value: "Password parameter type can no longer be used. Use Secure settings instead. Learn more: %{link}."
         | 
| @@ -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, apply_password_parameter_check: false)
         | 
| 35 35 | 
             
                  errors = []
         | 
| 36 | 
            -
                  errors << Validations::Manifest.call(self)
         | 
| 36 | 
            +
                  errors << Validations::Manifest.call(self, apply_password_parameter_check: apply_password_parameter_check)
         | 
| 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, apply_password_parameter_check: false)
         | 
| 65 | 
            +
                  errors = validate(marketplace: marketplace, skip_marketplace_translations: skip_marketplace_translations, apply_password_parameter_check: apply_password_parameter_check)
         | 
| 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, apply_password_parameter_check: 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,7 @@ module ZendeskAppsSupport | |
| 22 22 | 
             
                        return [ValidationError.new(:missing_manifest)]
         | 
| 23 23 | 
             
                      end
         | 
| 24 24 |  | 
| 25 | 
            -
                      collate_manifest_errors(package)
         | 
| 25 | 
            +
                      collate_manifest_errors(package, apply_password_parameter_check)
         | 
| 26 26 | 
             
                    rescue JSON::ParserError => e
         | 
| 27 27 | 
             
                      return [ValidationError.new(:manifest_not_json, errors: e)]
         | 
| 28 28 | 
             
                    rescue ZendeskAppsSupport::Manifest::OverrideError => e
         | 
| @@ -31,7 +31,7 @@ module ZendeskAppsSupport | |
| 31 31 |  | 
| 32 32 | 
             
                    private
         | 
| 33 33 |  | 
| 34 | 
            -
                    def collate_manifest_errors(package)
         | 
| 34 | 
            +
                    def collate_manifest_errors(package, apply_password_parameter_check)
         | 
| 35 35 | 
             
                      manifest = package.manifest
         | 
| 36 36 |  | 
| 37 37 | 
             
                      errors = [
         | 
| @@ -49,7 +49,10 @@ module ZendeskAppsSupport | |
| 49 49 | 
             
                            missing_framework_version(manifest),
         | 
| 50 50 | 
             
                            invalid_version_error(manifest) ]
         | 
| 51 51 | 
             
                        end,
         | 
| 52 | 
            -
                        ban_no_template(manifest)
         | 
| 52 | 
            +
                        ban_no_template(manifest),
         | 
| 53 | 
            +
                        if apply_password_parameter_check
         | 
| 54 | 
            +
                         [ deprecate_password_parameter_type(manifest) ]
         | 
| 55 | 
            +
                        end
         | 
| 53 56 | 
             
                      ]
         | 
| 54 57 | 
             
                      errors.flatten.compact
         | 
| 55 58 | 
             
                    end
         | 
| @@ -207,6 +210,13 @@ module ZendeskAppsSupport | |
| 207 210 | 
             
                      ValidationError.new(:no_framework_version_required) unless manifest.framework_version.nil?
         | 
| 208 211 | 
             
                    end
         | 
| 209 212 |  | 
| 213 | 
            +
                    def deprecate_password_parameter_type(manifest)
         | 
| 214 | 
            +
                      secure_settings_link = 'https://developer.zendesk.com/documentation/apps/app-developer-guide/making-api-requests-from-a-zendesk-app/#using-secure-settings'
         | 
| 215 | 
            +
                      if manifest.parameters.any? { |p| p.type == 'password' }
         | 
| 216 | 
            +
                        ValidationError.new(:password_parameter_type_deprecated, link: secure_settings_link)
         | 
| 217 | 
            +
                      end
         | 
| 218 | 
            +
                    end
         | 
| 219 | 
            +
             | 
| 210 220 | 
             
                    def private_marketing_app_error(manifest)
         | 
| 211 221 | 
             
                      ValidationError.new(:marketing_only_app_cant_be_private) if manifest.private?
         | 
| 212 222 | 
             
                    end
         | 
    
        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. | 
| 4 | 
            +
              version: 4.41.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:  | 
| 14 | 
            +
            date: 2024-09-30 00:00:00.000000000 Z
         | 
| 15 15 | 
             
            dependencies:
         | 
| 16 16 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 17 17 | 
             
              name: i18n
         | 
| @@ -104,9 +104,9 @@ dependencies: | |
| 104 104 | 
             
                - - ">="
         | 
| 105 105 | 
             
                  - !ruby/object:Gem::Version
         | 
| 106 106 | 
             
                    version: 2.3.1
         | 
| 107 | 
            -
                - - " | 
| 107 | 
            +
                - - "<="
         | 
| 108 108 | 
             
                  - !ruby/object:Gem::Version
         | 
| 109 | 
            -
                    version: 2. | 
| 109 | 
            +
                    version: 2.22.0
         | 
| 110 110 | 
             
              type: :runtime
         | 
| 111 111 | 
             
              prerelease: false
         | 
| 112 112 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| @@ -114,9 +114,9 @@ dependencies: | |
| 114 114 | 
             
                - - ">="
         | 
| 115 115 | 
             
                  - !ruby/object:Gem::Version
         | 
| 116 116 | 
             
                    version: 2.3.1
         | 
| 117 | 
            -
                - - " | 
| 117 | 
            +
                - - "<="
         | 
| 118 118 | 
             
                  - !ruby/object:Gem::Version
         | 
| 119 | 
            -
                    version: 2. | 
| 119 | 
            +
                    version: 2.22.0
         | 
| 120 120 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 121 121 | 
             
              name: nokogiri
         | 
| 122 122 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -353,7 +353,7 @@ 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. | 
| 356 | 
            +
            rubygems_version: 3.5.16
         | 
| 357 357 | 
             
            signing_key: 
         | 
| 358 358 | 
             
            specification_version: 4
         | 
| 359 359 | 
             
            summary: Support to help you develop Zendesk Apps.
         |