<commit_before>require File.join(File.dirname(__FILE__), '..', 'distinguished_name')

class DistinguishedName::Canonicalize

  class << self

    def reverse(dn, order=['CN','OU','O','C'])
      @dn = dn
      @order = []
      order.each {|o| @order << o + '='}
      @separators = [',', '/']
      return @dn if dn_contains_no_equals || dn_invalid?
      @separators.each do |s|
        @current_separator = s
        @dn_elements = @dn.split(s)
        clean_array
        possibly_join_elements
        break if number_of_elements_matches_given_number_of_equal_signs?
      end<commit_msg>add deprecation warning<commit_after>require File.join(File.dirname(__FILE__), '..', 'distinguished_name')

class DistinguishedName::Canonicalize

  class << self

    def reverse(dn, order=['CN','OU','O','C'])
      STDERR.puts "Warning!  DistinguishedName::Canonicalize is deprecated.  Use DistinguishedName::Transform instead."
      @dn = dn
      @order = []
      order.each {|o| @order << o + '='}
      @separators = [',', '/']
      return @dn if dn_contains_no_equals || dn_invalid?
      @separators.each do |s|
        @current_separator = s
        @dn_elements = @dn.split(s)
        clean_array
        possibly_join_elements
        break if number_of_elements_matches_given_number_of_equal_signs?
      end
{'fraction_non_alphanumeric': 0.135258358662614, 'fraction_numerical': 0.0, 'mean_word_length': 3.141509433962264, 'pattern_counts': {'":': 0, '<': 11, '<?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': '3504350', 'n_tokens_mistral': 441, 'n_tokens_neox': 421, 'n_words': 81}