diff --git a/example.env b/example.env new file mode 100644 index 0000000..88890cf --- /dev/null +++ b/example.env @@ -0,0 +1,8 @@ +HELP_SCOUT_APP_ID= +HELP_SCOUT_APP_SECRET= +TEST_MAILBOX_ID= +TEST_USER_ID= +TEST_CUSTOMER_ID= +TEST_CONVERSATION_ID= +TEST_CUSTOMER_EMAIL= +TEST_THREAD_ID= \ No newline at end of file diff --git a/help_scout-sdk.gemspec b/help_scout-sdk.gemspec index d16442a..7f0f900 100644 --- a/help_scout-sdk.gemspec +++ b/help_scout-sdk.gemspec @@ -31,8 +31,7 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.add_dependency 'activesupport' - spec.add_dependency 'faraday', '~> 1.3.0' - spec.add_dependency 'faraday_middleware', '>= 0.10.1', '< 1.0' + spec.add_dependency 'faraday', '~> 2.7' spec.required_ruby_version = '>= 2.3' spec.add_development_dependency 'awesome_print', '~> 1.8' diff --git a/lib/help_scout-sdk.rb b/lib/help_scout-sdk.rb index ba6c271..c1b3746 100644 --- a/lib/help_scout-sdk.rb +++ b/lib/help_scout-sdk.rb @@ -4,7 +4,6 @@ require 'active_support/core_ext' require 'json' require 'faraday' -require 'faraday_middleware' require 'help_scout/version' diff --git a/lib/help_scout/api/client.rb b/lib/help_scout/api/client.rb index 330f07d..0dcc2ed 100644 --- a/lib/help_scout/api/client.rb +++ b/lib/help_scout/api/client.rb @@ -13,7 +13,7 @@ def connection @_connection ||= build_connection.tap do |conn| if authorize? HelpScout::API::AccessToken.refresh! - conn.authorization(:Bearer, access_token) if access_token + conn.request(:authorization, :Bearer, access_token) if access_token end end end