<commit_before>require 'rubygems'
require 'active_support'
require 'active_resource'

module ZendeskAPI
  class Error < StandardError; end

  class << self

    def authenticate(account, username, password)
      @username = username
      @password = password
      self::Base.user = username
      self::Base.password = password
      self::Base.site = "http://#{account}.zendesk.com"
    end

    def resources
      @resources ||= []
    end
  end

  class Base < ActiveResource::Base
    self.format = :xml
    def self.inherited(base)
      ZendeskAPI.resources << base
    end<commit_msg>format to use json<commit_after>require 'rubygems'
require 'active_support'
require 'active_resource'

module ZendeskAPI
  class Error < StandardError; end

  class << self

    def authenticate(account, username, password)
      @username = username
      @password = password
      self::Base.user = username
      self::Base.password = password
      self::Base.site = "http://#{account}.zendesk.com"
    end

    def resources
      @resources ||= []
    end
  end

  class Base < ActiveResource::Base
    self.format = :json
    def self.inherited(base)
      ZendeskAPI.resources << base
    end
{'fraction_non_alphanumeric': 0.1020066889632107, 'fraction_numerical': 0.0, 'mean_word_length': 2.99, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '4907891', 'n_tokens_mistral': 356, 'n_tokens_neox': 345, 'n_words': 90}