<commit_before>require "remote_factory_girl/version"
require 'remote_factory_girl/config'
require 'remote_factory_girl/http'
require 'remote_factory_girl/response_parser'
require 'remote_factory_girl/config_struct'
require 'remote_factory_girl/hash_to_dot'
require 'remote_factory_girl/json_to_active_resource'

module RemoteFactoryGirl

  class JsonToActiveResourceDecorator

    attr_reader :json_to_active_resource

    def initialize(json_to_active_resource)
      @json_to_active_resource = json_to_active_resource
    end

    def resource(resource = nil)
      json
    end
  end

  class RemoteFactoryGirl

    attr_reader :name, :attributes, :config

    def initialize(name, attributes, config)
      @name       = name
      @attributes = attributes
      @config     = config 
    end

    def parse(parser = ResponseParser)
      parser.parse(post.json, config.to_hash)
    end

    def post(http = Http)
      @post ||= http.post(config, params)
    end
<commit_msg>Remove old WIP code<commit_after>require "remote_factory_girl/version"
require 'remote_factory_girl/config'
require 'remote_factory_girl/http'
require 'remote_factory_girl/response_parser'
require 'remote_factory_girl/config_struct'
require 'remote_factory_girl/hash_to_dot'
require 'remote_factory_girl/json_to_active_resource'

module RemoteFactoryGirl
  class RemoteFactoryGirl

    attr_reader :name, :attributes, :config

    def initialize(name, attributes, config)
      @name       = name
      @attributes = attributes
      @config     = config 
    end

    def parse(parser = ResponseParser)
      parser.parse(post.json, config.to_hash)
    end

    def post(http = Http)
      @post ||= http.post(config, params)
    end

{'fraction_non_alphanumeric': 0.07346938775510205, 'fraction_numerical': 0.0, 'mean_word_length': 4.047058823529412, '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': '743260', 'n_tokens_mistral': 525, 'n_tokens_neox': 505, 'n_words': 110}