<commit_before>require "apn/connection"

module APN
  class Application
    include Connection
    APPS             = {}
    OPTION_KEYS      = [:pool_size, :pool_timeout, :host, :port, :root, :password, :certificate_name, :full_certificate_path].freeze
    DELEGATE_METHODS = [:with_connection, :connection_pool].concat(OPTION_KEYS).freeze

    def self.register(*args, &block)
      new(*args, &block).tap do |app|
        APPS[app.name] = app if app.certificate
      end
    end

    attr_reader :name
<commit_msg>Fix certificate delegation for multiple apps<commit_after>require "apn/connection"

module APN
  class Application
    include Connection
    APPS             = {}
    OPTION_KEYS      = [:pool_size, :pool_timeout, :host, :port, :root, :password, :certificate_name, :full_certificate_path].freeze
    DELEGATE_METHODS = [:with_connection, :connection_pool, :certificate].concat(OPTION_KEYS).freeze

    def self.register(*args, &block)
      new(*args, &block).tap do |app|
        APPS[app.name] = app if app.certificate
      end
    end

    attr_reader :name

{'fraction_non_alphanumeric': 0.1091581868640148, 'fraction_numerical': 0.0, 'mean_word_length': 3.416326530612245, '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': '1421965', 'n_tokens_mistral': 355, 'n_tokens_neox': 349, 'n_words': 78}