<commit_before>module Puppet::Parser::Functions
  newfunction(:zulipconf, :type => :rvalue) do |args|
    default = args.pop
    joined = args.join(" ")
    output = `/usr/bin/crudini --get /etc/zulip/zulip.conf #{joined} 2>&1`; result=$?.success?
    if result
      output.strip()
    else
      default
    end
  end
end
<commit_msg>puppet: Add new zulipsecret function.<commit_after>module Puppet::Parser::Functions
  newfunction(:zulipconf, :type => :rvalue) do |args|
    default = args.pop
    joined = args.join(" ")
    output = `/usr/bin/crudini --get /etc/zulip/zulip.conf #{joined} 2>&1`; result=$?.success?
    if result
      output.strip()
    else
      default
    end
  end

  newfunction(:zulipsecret, :type => :rvalue) do |args|
    default = args.pop
    joined = args.join(" ")
    output = `/usr/bin/crudini --get /etc/zulip/zulip-secrets.conf #{joined} 2>&1`; result=$?.success?
    if result
      output.strip()
    else
      default
    end
  end
end

{'fraction_non_alphanumeric': 0.15219611848825332, 'fraction_numerical': 0.006128702757916241, 'mean_word_length': 2.813229571984436, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5320838', 'n_tokens_mistral': 357, 'n_tokens_neox': 354, 'n_words': 79}