<commit_before>module ManageIQ::Providers
  module AnsibleTower
    class ConfigurationManager::Refresher < ManageIQ::Providers::BaseManager::Refresher
      include ::EmsRefresh::Refreshers::EmsRefresherMixin

      def parse_inventory(manager, _targets)
        manager.with_provider_connection do |connection|
          manager.api_version = connection.version
          manager.save

          raw_ems_data = {:hosts => connection.hosts}
          ConfigurationManager::RefreshParser.configuration_inv_to_hashes(raw_ems_data)
        end
      end

      def save_inventory(manager, targets, hashes)
        EmsRefresh.save_configuration_manager_inventory(manager, hashes, targets[0])
      end
    end
  end
end
<commit_msg>Update to use the recent gem changes<commit_after>module ManageIQ::Providers
  module AnsibleTower
    class ConfigurationManager::Refresher < ManageIQ::Providers::BaseManager::Refresher
      include ::EmsRefresh::Refreshers::EmsRefresherMixin

      def parse_inventory(manager, _targets)
        manager.with_provider_connection do |connection|
          manager.api_version = connection.version
          manager.save

          raw_ems_data = {:hosts => connection.api.hosts.all}
          ConfigurationManager::RefreshParser.configuration_inv_to_hashes(raw_ems_data)
        end
      end

      def save_inventory(manager, targets, hashes)
        EmsRefresh.save_configuration_manager_inventory(manager, hashes, targets[0])
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.0725319006044325, 'fraction_numerical': 0.001343183344526528, 'mean_word_length': 3.670846394984326, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3112606', 'n_tokens_mistral': 431, 'n_tokens_neox': 412, 'n_words': 76}