hubspot-api-client-patched-pn 9.5.1.trocco.0.0.8 → 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 +4 -4
- data/lib/hubspot/version.rb +1 -1
- data/lib/hubspot-api-client.rb +2 -2
- data/lib/hubspot_patches/skip_hapikey.rb +22 -0
- metadata +2 -2
- data/lib/hubspot/patch_skip_hapikey.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5b3d4f23329fd81ca48c515f7225ad20b9f7c5ec33227885c48f5b9eee2bbae
|
4
|
+
data.tar.gz: 65c390064ad9f15a04c8e8dc98226408a50174b0d9804f87c791d7badc15aecb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50a60b1e19eb7893f454d770762277176d53c234992d1845da1111f84706c7b4fa4255129296d44affc06a4e77ef471e119a80c00f44db8fee07a621bc80f98d
|
7
|
+
data.tar.gz: 21223972831046ec79d4878f80861ada9bb585673f9ecb49cb7e7e84ac9ca318306fd974d335c8e588ff18c449addc99d32d57d2dbd5e21b6a4568ea5e5e5323
|
data/lib/hubspot/version.rb
CHANGED
data/lib/hubspot-api-client.rb
CHANGED
@@ -5,8 +5,6 @@ require_rel 'hubspot/*.rb'
|
|
5
5
|
require_rel 'hubspot/helpers'
|
6
6
|
require_rel 'hubspot'
|
7
7
|
|
8
|
-
require_relative 'hubspot/patch_skip_hapikey'
|
9
|
-
|
10
8
|
module Hubspot
|
11
9
|
class << self
|
12
10
|
CLIENTS = [
|
@@ -47,3 +45,5 @@ module Hubspot
|
|
47
45
|
end
|
48
46
|
end
|
49
47
|
end
|
48
|
+
|
49
|
+
require_relative 'hubspot_patches/skip_hapikey'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Hubspot
|
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
|
12
|
+
|
13
|
+
# CRM 配下にある全ての ApiClient に prepend
|
14
|
+
module Crm
|
15
|
+
constants.each do |sub|
|
16
|
+
mod = const_get(sub)
|
17
|
+
next unless mod.const_defined?(:ApiClient)
|
18
|
+
|
19
|
+
mod::ApiClient.prepend SkipHapikeyPatch
|
20
|
+
end
|
21
|
+
end
|
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.
|
4
|
+
version: 9.5.1.trocco.0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- primeNumber
|
@@ -990,8 +990,8 @@ files:
|
|
990
990
|
- lib/hubspot/helpers/get_all_helper.rb
|
991
991
|
- lib/hubspot/helpers/webhooks_helper.rb
|
992
992
|
- lib/hubspot/oauth_helper.rb
|
993
|
-
- lib/hubspot/patch_skip_hapikey.rb
|
994
993
|
- lib/hubspot/version.rb
|
994
|
+
- lib/hubspot_patches/skip_hapikey.rb
|
995
995
|
- spec/codegen/automation/actions/api/callbacks_api_spec.rb
|
996
996
|
- spec/codegen/automation/actions/api/definitions_api_spec.rb
|
997
997
|
- spec/codegen/automation/actions/api/functions_api_spec.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# HubSpot API 9.5.1 Monkey-Patch : skip blank hapikey on OAuth
|
2
|
-
module Hubspot
|
3
|
-
module Crm
|
4
|
-
module Schemas
|
5
|
-
class ApiClient # :nodoc:
|
6
|
-
alias _orig_update_params_for_auth! update_params_for_auth!
|
7
|
-
|
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
|
-
|
14
|
-
_orig_update_params_for_auth!(header_params, query_params, auth_names)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|