<commit_before># Requirements
# =======================================================================

# Stdlib
# -----------------------------------------------------------------------

# Deps
# -----------------------------------------------------------------------
require 'nrser/extras'

# Project / Package
# -----------------------------------------------------------------------
require 'qb/errors'
require 'qb/version'
require 'qb/util'
require 'qb/path'


# Refinements
# =======================================================================

require 'nrser/refinements'
using NRSER

require 'nrser/refinements/types'
using NRSER::Types


# Definitions
# =======================================================================

module QB
  
  # Constants
  # =====================================================================
  
  ROOT = (Pathname.new(__FILE__).dirname + '..').expand_path
  GEM_ROLES_DIR = ROOT + 'roles'
  USER_ROLES_DIR = Pathname.new(ENV['HOME']).join '.ansible', 'roles'
  
  
  # Mixins
  # =====================================================================
  
  include SemanticLogger::Loggable
  
  
  def self.debug *args
    if args[0].is_a? String
      logger.debug *args
    else
      logger.debug payload: args
    end
    
    # return unless ENV['QB_DEBUG'] && args.length > 0
    # 
    # header = 'DEBUG'
    # 
    # if args[0].is_a? String
    #   header += " " + args.shift
    # end
    # 
    # dumpObj = case args.length
    # when 0
    #   header
    # when 1
    #   {header => args[0]}
    # else
    #   {header => args}
    # end
    # 
    # # $stderr.puts("DEBUG " + format(msg, values))
    # $stderr.puts dumpObj.pretty_inspect
  end
    
end


# Post-Processing
# =======================================================================

# needs QB::*_ROLES_DIR
require 'qb/role'
require 'qb/options'
require 'qb/repo'
require 'qb/cli'

require 'qb/ansible'
# Depreciated namespace:
require 'qb/ansible_module'

require 'qb/package'

require 'qb/github'<commit_msg>Make QB.debug maybe a bit better<commit_after># Requirements
# =======================================================================

# Stdlib
# -----------------------------------------------------------------------

# Deps
# -----------------------------------------------------------------------
require 'nrser/extras'

# Project / Package
# -----------------------------------------------------------------------
require 'qb/errors'
require 'qb/version'
require 'qb/util'
require 'qb/path'


# Refinements
# =======================================================================

require 'nrser/refinements'
using NRSER

require 'nrser/refinements/types'
using NRSER::Types


# Definitions
# =======================================================================

module QB
  
  # Constants
  # =====================================================================
  
  ROOT = (Pathname.new(__FILE__).dirname + '..').expand_path
  GEM_ROLES_DIR = ROOT + 'roles'
  USER_ROLES_DIR = Pathname.new(ENV['HOME']).join '.ansible', 'roles'
  
  
  # Mixins
  # =====================================================================
  
  include SemanticLogger::Loggable
  
  
  # Support for the old custom debug logging, now sent to {SemanticLogger}.
  # 
  def self.debug *args
    if args[0].is_a? String
      logger.debug *args
    else
      # De-array if there's only one arg
      args = args[0] if args.length == 1
      # And send the args to SM as the payload
      logger.debug payload: args
    end
  end
    
end


# Post-Processing
# =======================================================================

# needs QB::*_ROLES_DIR
require 'qb/role'
require 'qb/options'
require 'qb/repo'
require 'qb/cli'

require 'qb/ansible'
# Depreciated namespace:
require 'qb/ansible_module'

require 'qb/package'

require 'qb/github'
{'fraction_non_alphanumeric': 0.4119318181818182, 'fraction_numerical': 0.0023243801652892563, 'mean_word_length': 2.476660682226212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '2386029', 'n_tokens_mistral': 1107, 'n_tokens_neox': 1028, 'n_words': 223}