<commit_before>$LOAD_PATH << File.join(File.dirname(__FILE__), '../vendor/activesupport/lib')
$LOAD_PATH << File.join(File.dirname(__FILE__), '../vendor/activeresource/lib')
require 'active_support'
require 'active_resource'

module Lighthouse
  class << self
    attr_reader :account, :token

    def resources
      @resources ||= []
    end

    def account=(name)
      resources.each do |klass|
        klass.site = klass.site_format % name
      end
      @account = name
    end

    def token=(value)
      resources.each do |klass|
        klass.custom_headers['X-LighthouseToken'] = value
      end
      @token = value
    end
  end

  class Base < ActiveResource::Base
    def self.inherited(base)
      Lighthouse.resources << base
      class << base
        attr_accessor :site_format
      end
      base.site_format = 'http://%s.lighthouseapp.com'
      super<commit_msg>change #custom_headers to just #headers<commit_after>$LOAD_PATH << File.join(File.dirname(__FILE__), '../vendor/activesupport/lib')
$LOAD_PATH << File.join(File.dirname(__FILE__), '../vendor/activeresource/lib')
require 'active_support'
require 'active_resource'

module Lighthouse
  class << self
    attr_reader :account, :token

    def resources
      @resources ||= []
    end

    def account=(name)
      resources.each do |klass|
        klass.site = klass.site_format % name
      end
      @account = name
    end

    def token=(value)
      resources.each do |klass|
        klass.headers['X-LighthouseToken'] = value
      end
      @token = value
    end
  end

  class Base < ActiveResource::Base
    def self.inherited(base)
      Lighthouse.resources << base
      class << base
        attr_accessor :site_format
      end
      base.site_format = 'http://%s.lighthouseapp.com'
      super
{'fraction_non_alphanumeric': 0.11364902506963788, 'fraction_numerical': 0.0, 'mean_word_length': 2.718426501035197, 'pattern_counts': {'":': 0, '<': 25, '<?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': '4180338', 'n_tokens_mistral': 551, 'n_tokens_neox': 540, 'n_words': 123}