Aspose-words-cloud-ruby client debug logging is broken

Assigning the debugging configuration to true ends up throwing a NameError exception.

It seems this is happening because it’s referring to an identifier named req_body which doesn’t exist. I think what it’s supposed to refer to is req_opts.

To reproduce:

$ gem info aspose_words_cloud

*** LOCAL GEMS ***

aspose_words_cloud (23.7.0)
    Author: YaroslawEkimov
    Homepage:
    https://github.com/aspose-words-cloud/aspose-words-cloud-ruby
    License: MIT
    Installed at: /Users/james/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0

    Ruby library for communicating with the Aspose.Words Cloud API

The test script (The base url points to a container running aspose/words-cloud):

# frozen_string_literal: true

require 'aspose_words_cloud'

AsposeWordsCloud.configure do |config|
  config.client_data['ClientId'] = 'james'
  config.client_data['ClientSecret'] = 'supersecretpassword'
  config.baseUrl = 'http://192.168.1.198:8080'
  config.debugging = true
end

AsposeWordsCloud::WordsApi.new

Result:

$ ruby aspose_debugging_problem.rb 
/Users/james/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/aspose_words_cloud-23.7.0/lib/aspose_words_cloud/api_client.rb:135:in `build_request': undefined local variable or method `req_body' for #<AsposeWordsCloud::ApiClient:0x00000001057cbf18 @config=#<AsposeWordsCloud::Configuration:0x0000000105760808 @baseUrl="http://192.168.1.198:8080", @api_version="/v4.0/", @client_data={"ClientId"=>"james", "ClientSecret"=>"supersecretpassword"}, @client_data_prefix={}, @client_side_validation=true, @debugging=true, @logger=#<Logger:0x00000001057606a0 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x0000000105760560 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x0000000105760380 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x0000000105760290>, @mon_data_owner_object_id=520>>, @timeout=60>, @default_headers={"Content-Type"=>"application/json", "x-aspose-client"=>"ruby sdk", "x-aspose-version"=>"23.7.0"}> (NameError)

          @config.logger.debug "HTTP request body param ~BEGIN~\\n#{req_body}\\n~END~\\n"
                                                                   ^^^^^^^^
Did you mean?  req_opts
        from /Users/james/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/aspose_words_cloud-23.7.0/lib/aspose_words_cloud/api_client.rb:80:in `call_api'
        from /Users/james/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/aspose_words_cloud-23.7.0/lib/aspose_words_cloud/api/words_api.rb:14214:in `request_token'
        from /Users/james/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/aspose_words_cloud-23.7.0/lib/aspose_words_cloud/api/words_api.rb:42:in `initialize'
        from aspose_debugging_problem.rb:12:in `new'
        from aspose_debugging_problem.rb:12:in `<main>'

@james-ontra
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSCLOUD-2425

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.