Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions hubspot-api-client.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ $:.push File.expand_path("../lib", __FILE__)
require "hubspot/version"

Gem::Specification.new do |s|
s.name = "hubspot-api-client"
s.name = "hubspot-api-client-patched-pn"
s.version = Hubspot::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["HubSpot"]
s.authors = ["primeNumber"]
s.email = [""]
s.homepage = "https://github.com/HubSpot/hubspot-api-ruby"
s.homepage = "https://github.com/primenumber-dev/hubspot-api-ruby"
s.summary = "HubSpot Ruby API Gem"
s.description = "HubSpot Ruby API client"
s.license = "Unlicense"
s.required_ruby_version = ">= 1.9"

s.add_runtime_dependency 'typhoeus', '~> 1.4.0'
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
s.add_runtime_dependency 'json', '>= 2.1', '< 2.7'
s.add_runtime_dependency 'require_all', '~> 3.0.0'
s.add_runtime_dependency 'ffi', '~> 1.15.0'

s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
Expand Down
2 changes: 2 additions & 0 deletions lib/hubspot-api-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ def configure
end
end
end

require_relative 'hubspot_patches/skip_hapikey'
4 changes: 2 additions & 2 deletions lib/hubspot/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Hubspot
VERSION = '9.5.1'
end
VERSION = '9.5.1.trocco.0.0.10'
end
22 changes: 22 additions & 0 deletions lib/hubspot_patches/skip_hapikey.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module Hubspot
module SkipHapikeyPatch # :nodoc:
def update_params_for_auth!(header, query, auth_names)
filtered = Array(auth_names).reject do |name|
name == 'hapikey' &&
(@config.access_token.to_s.strip != '' ||
@config.api_key['hapikey'].to_s.strip.empty?)
end
super(header, query, filtered)
end
end

# CRM 配下にある全ての ApiClient に prepend
Copy link
Copy Markdown

@yas-okadatech yas-okadatech May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module Crm
constants.each do |sub|
mod = const_get(sub)
next unless mod.const_defined?(:ApiClient)

mod::ApiClient.prepend SkipHapikeyPatch
end
end
end