<commit_before>require 'pp'

module AnsibleTowerClient
  class Api < Connection
    include Logging

    DEFAULT_ERROR_MSG = "An unknown error was returned from the provider".freeze

    attr_reader :instance
    def initialize(connection)
      @instance = connection
    end

    def config
      JSON.parse(get("config/").body)
    end

    def version
      @version ||= config["version"]
    end

    def verify_credentials
      JSON.parse(get("me").body).fetch_path("results", 0, "username")<commit_msg>avoid redundant redirects<commit_after>require 'pp'

module AnsibleTowerClient
  class Api < Connection
    include Logging

    DEFAULT_ERROR_MSG = "An unknown error was returned from the provider".freeze

    attr_reader :instance
    def initialize(connection)
      @instance = connection
    end

    def config
      JSON.parse(get("config/").body)
    end

    def version
      @version ||= config["version"]
    end

    def verify_credentials
      JSON.parse(get("me/").body).fetch_path("results", 0, "username")
{'fraction_non_alphanumeric': 0.09583736689254599, 'fraction_numerical': 0.001936108422071636, 'mean_word_length': 3.203252032520325, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5502130', 'n_tokens_mistral': 304, 'n_tokens_neox': 288, 'n_words': 79}