From eb4ea881ee44176e81e0056f527cc7ed63563f2c Mon Sep 17 00:00:00 2001 From: Danilo Grieco Date: Tue, 16 Apr 2024 20:32:15 +0200 Subject: [PATCH] Fix c --- lib/sharepoint/client.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/sharepoint/client.rb b/lib/sharepoint/client.rb index 70ac4e3..0c63877 100644 --- a/lib/sharepoint/client.rb +++ b/lib/sharepoint/client.rb @@ -20,11 +20,10 @@ class Token attr_accessor :expires_in attr_accessor :access_token attr_accessor :fetched_at - attr_accessor :config + attr_reader :config - def initialize(c) - self.config = c - puts config + def initialize(config) + @config = config end def ensure @@ -46,7 +45,7 @@ def fetch } easy = Ethon::Easy.new - easy.http_request(config.auth.token_url, :post, { body: auth_request }) + easy.http_request(config.token_url, :post, { body: auth_request }) http_resp = easy.perform raise InvalidTokenError.new(http_resp.body.to_s) unless http_resp.code == 200