<commit_before>#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'cinch'
require 'daemons'
load File.expand_path('config.rb', File.dirname(__FILE__))

Daemons.run_proc(moombot['name'], dir: moombot['home']) do
  bot = Cinch::Bot.new do
    configure do |c|
      c.server = moombot['cinch']['server']
      c.port = moombot['cinch']['port']
      c.nick = moombot['cinch']['nick']
      c.realname = moombot['cinch']['nick'].capitalize
      c.user = moombot['cinch']['nick']
      c.channels = moombot['cinch']['channels']
      c.plugins.plugins = moombot['plugins'].map do |p|
        Object.const_get(p.capitalize << 'Plugin')
      end
      if moombot['cinch']['ssl']
        c.ssl = Cinch::Configuration::SSL.new(
          'use' => moombot['cinch']['ssl']['use'],
          'verify' => moombot['cinch']['ssl']['verify'])
      end
    end
  end<commit_msg>Pass Chef attributes for SSL config<commit_after>#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'cinch'
require 'daemons'
load File.expand_path('config.rb', File.dirname(__FILE__))

Daemons.run_proc(moombot['name'], dir: moombot['home']) do
  bot = Cinch::Bot.new do
    configure do |c|
      c.server = moombot['cinch']['server']
      c.port = moombot['cinch']['port']
      c.nick = moombot['cinch']['nick']
      c.realname = moombot['cinch']['nick'].capitalize
      c.user = moombot['cinch']['nick']
      c.channels = moombot['cinch']['channels']
      c.plugins.plugins = moombot['plugins'].map do |p|
        Object.const_get(p.capitalize << 'Plugin')
      end
      if moombot['cinch']['ssl']
        c.ssl = Cinch::Configuration::SSL.new(moombot['cinch']['ssl'])
      end
    end
  end
{'fraction_non_alphanumeric': 0.19940119760479041, 'fraction_numerical': 0.0011976047904191617, 'mean_word_length': 3.3743455497382198, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '3913622', 'n_tokens_mistral': 592, 'n_tokens_neox': 583, 'n_words': 102}