hubspot-api-client-patched-pn 9.5.1.trocco.0.0.9 → 9.5.1.trocco.0.0.10

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: b664f5ed1d8a5fe658552b5d1ce587e5efe3c897ed3c233efb2bbb3dab2ef012
4
- data.tar.gz: 273e41c5d678f9d4ab495b0f7ed6277bf85e6ef585453f35b729fb550e684538
3
+ metadata.gz: a5b3d4f23329fd81ca48c515f7225ad20b9f7c5ec33227885c48f5b9eee2bbae
4
+ data.tar.gz: 65c390064ad9f15a04c8e8dc98226408a50174b0d9804f87c791d7badc15aecb
5
5
  SHA512:
6
- metadata.gz: 481d64fa333879b3c15900d18525ada80424d47f93ca100697bed15875b1a9119872cb713fa69ca20abfab75c8009074803a0be14331ad741b3a0a10b09ab265
7
- data.tar.gz: db92c6537d1b3566e15d5a85e70628849a29ed71eef14a779c33eacb4ea817799cd8563c1c71de31b1f99de18fe33b32879d70b77de9e9105971a264b5facc7b
6
+ metadata.gz: 50a60b1e19eb7893f454d770762277176d53c234992d1845da1111f84706c7b4fa4255129296d44affc06a4e77ef471e119a80c00f44db8fee07a621bc80f98d
7
+ data.tar.gz: 21223972831046ec79d4878f80861ada9bb585673f9ecb49cb7e7e84ac9ca318306fd974d335c8e588ff18c449addc99d32d57d2dbd5e21b6a4568ea5e5e5323
@@ -1,3 +1,3 @@
1
1
  module Hubspot
2
- VERSION = '9.5.1.trocco.0.0.9'
2
+ VERSION = '9.5.1.trocco.0.0.10'
3
3
  end
@@ -1,19 +1,22 @@
1
- # HubSpot API 9.5.1 Monkey-Patch : skip blank hapikey on OAuth
2
1
  module Hubspot
3
- module Crm
4
- module Schemas
5
- class ApiClient # :nodoc:
6
- alias _orig_update_params_for_auth! update_params_for_auth!
2
+ module SkipHapikeyPatch # :nodoc:
3
+ def update_params_for_auth!(header, query, auth_names)
4
+ filtered = Array(auth_names).reject do |name|
5
+ name == 'hapikey' &&
6
+ (@config.access_token.to_s.strip != '' ||
7
+ @config.api_key['hapikey'].to_s.strip.empty?)
8
+ end
9
+ super(header, query, filtered)
10
+ end
11
+ end
7
12
 
8
- def update_params_for_auth!(header_params, query_params, auth_names)
9
- # hapikey が空なら除外
10
- auth_names = Array(auth_names).reject do |name|
11
- name == 'hapikey' && @config.api_key['hapikey'].to_s.strip.empty?
12
- end
13
+ # CRM 配下にある全ての ApiClient に prepend
14
+ module Crm
15
+ constants.each do |sub|
16
+ mod = const_get(sub)
17
+ next unless mod.const_defined?(:ApiClient)
13
18
 
14
- _orig_update_params_for_auth!(header_params, query_params, auth_names)
15
- end
16
- end
19
+ mod::ApiClient.prepend SkipHapikeyPatch
17
20
  end
18
21
  end
19
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubspot-api-client-patched-pn
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.5.1.trocco.0.0.9
4
+ version: 9.5.1.trocco.0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - primeNumber