<commit_before>require 'fog/core'

module Fog
  module Octocloud

    extend Fog::Provider

    service(:compute, 'octocloud/compute', 'Compute')

  end
end

# Monkey patch out provider lookup
module Fog
  module Compute
    class << self
      alias_method :super_new, :new

      def new(attributes)
        dup_attr = attributes.dup # prevent delete from having side effects
        provider = dup_attr.delete(:provider).to_s.downcase.to_sym
        if provider == :octocloud
          require 'fog/octocloud/compute'
          Fog::Compute::Octocloud.new(dup_attr)
        else
          super_new(attributes)
        end
      end
    end
  end
end<commit_msg>Change alias method name to prevent conflicts<commit_after>require 'fog/core'

module Fog
  module Octocloud

    extend Fog::Provider

    service(:compute, 'octocloud/compute', 'Compute')

  end
end

# Monkey patch out provider lookup
module Fog
  module Compute
    class << self
      alias_method :pre_octocloud_new, :new

      def new(attributes)
        dup_attr = attributes.dup # prevent delete from having side effects
        provider = dup_attr.delete(:provider).to_s.downcase.to_sym
        if provider == :octocloud
          require 'fog/octocloud/compute'
          Fog::Compute::Octocloud.new(dup_attr)
        else
          pre_octocloud_new(attributes)
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07692307692307693, 'fraction_numerical': 0.0, 'mean_word_length': 2.6578249336870026, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2317034', 'n_tokens_mistral': 431, 'n_tokens_neox': 412, 'n_words': 109}