From 89766c1efd25dcadd7860c27ab4b1e948c8ddadb Mon Sep 17 00:00:00 2001 From: Mihai Moiseanu Date: Thu, 7 Mar 2024 11:04:17 +0200 Subject: [PATCH] remove unused variable --- lib/mangopay/authorization_token.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/mangopay/authorization_token.rb b/lib/mangopay/authorization_token.rb index 1b8bd99..e5fb36b 100644 --- a/lib/mangopay/authorization_token.rb +++ b/lib/mangopay/authorization_token.rb @@ -17,8 +17,7 @@ def get_token token = storage.get env_key = get_environment_key_for_token if token.nil? || token['timestamp'].nil? || token['timestamp'] <= Time.now || token['environment_key'] != env_key - headers = {} - token = MangoPay.request(:post, "/#{MangoPay.version_code}/oauth/token", {}, {}, headers, Proc.new do |req| + token = MangoPay.request(:post, "/#{MangoPay.version_code}/oauth/token", {}, {}, {}, Proc.new do |req| cfg = MangoPay.configuration req.basic_auth cfg.client_id, cfg.client_apiKey req.body = 'grant_type=client_credentials' @@ -74,7 +73,7 @@ def get end def store(token) - File.open(file_path, File::RDWR|File::CREAT, 0644) do |f| + File.open(file_path, File::RDWR | File::CREAT, 0644) do |f| f.flock(File::LOCK_EX) f.truncate(0) f.rewind