<commit_before>require "remote_partial/engine"
require_relative '../app/models/remote_partial/exceptions'

begin
  require 'webmock'
  WebMock.disable! if defined?(WebMock)
rescue LoadError
  # Ignore - WebMock not available
end
module RemotePartial

  def self.define(args = {})
    Builder.build(args)
  end

  def self.partial_location
    File.expand_path('app/views/remote_partials', Rails.root)
  end

end<commit_msg>Adds test for partial table to RemotePartial.define<commit_after>require "remote_partial/engine"
require_relative '../app/models/remote_partial/exceptions'

begin
  require 'webmock'
  WebMock.disable! if defined?(WebMock)
rescue LoadError
  # Ignore - WebMock not available
end
module RemotePartial

  def self.define(args = {})
    if Partial.table_exists?
      Builder.build(args)
    else
      unless @remote_partial_table_missing_message_logged
        message = "RemotePartial.define will not run until the '#{Partial.table_name}' table exists. See RemotePartial README"
        puts message
        Rails.logger.warn message
        @remote_partial_table_missing_message_logged = true
      end
    end
  end

  def self.partial_location
    File.expand_path('app/views/remote_partials', Rails.root)
  end

end
{'fraction_non_alphanumeric': 0.08293075684380032, 'fraction_numerical': 0.0, 'mean_word_length': 4.012096774193548, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1640577', 'n_tokens_mistral': 376, 'n_tokens_neox': 376, 'n_words': 89}