<commit_before>module GoogleAppsApi
  class BaseApi



    def initialize(api_name, *args)
      api_config = GoogleAppsApi.config[api_name] || {}
      options = args.extract_options!.merge!(api_config)
      raise("Must supply admin_user") unless options[:admin_user] 
      raise("Must supply admin_password") unless options[:admin_password]
      @domain = options[:domain] || raise("Must supply domain") 
      @actions_hash = options[:action_hash] || raise("Must supply action hash")
      @actions_subs = options[:action_subs] || raise("Must supply action subs")
      @actions_hash[:next] = [:get, '']
      @actions_subs[:domain] = @domain

      @token = login(options[:admin_user], @domain, options[:admin_password], options[:service])
      @headers = {'Content-Type'=>'application/atom+xml', 'Authorization'=> 'GoogleLogin auth='+@token}.merge(options[:headers] || {})<commit_msg>modified base_api to expose domain<commit_after>module GoogleAppsApi
  class BaseApi
    attr_reader :domain


    def initialize(api_name, *args)
      api_config = GoogleAppsApi.config[api_name] || {}
      options = args.extract_options!.merge!(api_config)
      raise("Must supply admin_user") unless options[:admin_user] 
      raise("Must supply admin_password") unless options[:admin_password]
      @domain = options[:domain] || raise("Must supply domain") 
      @actions_hash = options[:action_hash] || raise("Must supply action hash")
      @actions_subs = options[:action_subs] || raise("Must supply action subs")
      @actions_hash[:next] = [:get, '']
      @actions_subs[:domain] = @domain

      @token = login(options[:admin_user], @domain, options[:admin_password], options[:service])
      @headers = {'Content-Type'=>'application/atom+xml', 'Authorization'=> 'GoogleLogin auth='+@token}.merge(options[:headers] || {})
{'fraction_non_alphanumeric': 0.14918032786885246, 'fraction_numerical': 0.0, 'mean_word_length': 4.8312101910828025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '497981', 'n_tokens_mistral': 527, 'n_tokens_neox': 519, 'n_words': 110}