Skip to content

Commit ae177ce

Browse files
committed
lint: rubocop: fix various
1 parent a1e2363 commit ae177ce

File tree

2 files changed

+9
-24
lines changed

2 files changed

+9
-24
lines changed

lib/ringcentral_sdk/rest/client.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@ class Client
2323
URL_PREFIX = '/restapi'.freeze
2424
DEFAULT_LANGUAGE = 'en-us'.freeze
2525

26-
attr_reader :config
27-
attr_reader :http
28-
attr_reader :logger
29-
attr_reader :oauth2client
30-
attr_reader :user_agent
31-
attr_reader :messages
26+
attr_reader :config, :http, :logger, :messages, :oauth2client, :user_agent
3227

3328
def initialize
3429
init_attributes

lib/ringcentral_sdk/rest/configuration.rb

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,13 @@ module RingCentralSdk
99
module REST
1010
# Configuration class populated by Client constructor block
1111
class Configuration
12-
attr_accessor :server_url
13-
attr_accessor :client_id
14-
attr_accessor :client_secret
15-
attr_accessor :redirect_url
16-
17-
attr_accessor :username
18-
attr_accessor :extension
19-
attr_accessor :password
20-
attr_accessor :token
21-
attr_accessor :token_file
22-
attr_accessor :jwt
23-
24-
attr_accessor :load_env
25-
attr_accessor :headers
26-
attr_accessor :retry
27-
attr_accessor :retry_options
28-
attr_accessor :logger
12+
attr_accessor :server_url,
13+
:client_id, :client_secret,
14+
:redirect_url,
15+
:jwt, :token, :token_file,
16+
:load_env,
17+
:headers, :retry, :retry_options
18+
:logger
2919

3020
def inflate
3121
@logger = default_logger if !defined?(@logger) || @logger.nil?
@@ -51,9 +41,9 @@ def load_environment
5141
# @username = ENV['RINGCENTRAL_USERNAME'] if ENV.key? 'RINGCENTRAL_USERNAME'
5242
# @extension = ENV['RINGCENTRAL_EXTENSION'] if ENV.key? 'RINGCENTRAL_EXTENSION'
5343
# @password = ENV['RINGCENTRAL_PASSWORD'] if ENV.key? 'RINGCENTRAL_PASSWORD'
44+
@jwt = ENV['RINGCENTRAL_JWT'] if ENV.key? 'RINGCENTRAL_JWT'
5445
@token = ENV['RINGCENTRAL_TOKEN'] if ENV.key? 'RINGCENTRAL_TOKEN'
5546
@token_file = ENV['RINGCENTRAL_TOKEN_FILE'] if ENV.key? 'RINGCENTRAL_TOKEN_FILE'
56-
@jwt = ENV['RINGCENTRAL_JWT'] if ENV.key? 'RINGCENTRAL_JWT'
5747
@retry = ENV['RINGCENTRAL_RETRY'] if ENV.key? 'RINGCENTRAL_RETRY'
5848
@retry_options = ENV['RINGCENTRAL_RETRY_OPTIONS'] if ENV.key? 'RINGCENTRAL_RETRY_OPTIONS'
5949
@headers = ENV['RINGCENTRAL_HEADERS'] if ENV.key? 'RINGCENTRAL_HEADERS'

0 commit comments

Comments
 (0)