<commit_before>module WeixinAuthorize

  class << self

    attr_accessor :config

    def configure
      yield self.config ||= Config.new
    end

    def weixin_redis
      return nil if config.nil?
      @redis ||= config.redis
    end

    # 可选配置: RestClient timeout, etc.
    # key 必须是符号
    def rest_client_options
      config.rest_client_options || {timeout: 2, open_timeout: 3, verify_ssl: true}
    end
  end

  class Config
    attr_accessor :redis, :rest_client_options
  end
end
<commit_msg>fixed config blank bug if not config<commit_after>module WeixinAuthorize

  class << self

    attr_accessor :config

    def configure
      yield self.config ||= Config.new
    end

    def weixin_redis
      return nil if config.nil?
      @redis ||= config.redis
    end

    # 可选配置: RestClient timeout, etc.
    # key 必须是符号
    def rest_client_options
      if config.nil?
        return {timeout: 2, open_timeout: 3, verify_ssl: true}
      end
      config.rest_client_options
    end
  end

  class Config
    attr_accessor :redis, :rest_client_options
  end
end

{'fraction_non_alphanumeric': 0.06691449814126393, 'fraction_numerical': 0.0037174721189591076, 'mean_word_length': 2.5780730897009967, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1053575', 'n_tokens_mistral': 373, 'n_tokens_neox': 360, 'n_words': 100}