<commit_before>#!/usr/bin/env ruby

require 'rubygems' if RUBY_VERSION < '1.9.0'
require 'sensu-handler'

class Deregister < Sensu::Handler
  def handle
    delete_sensu_client!
  end

  def delete_sensu_client!
    response = api_request(:DELETE, '/clients/' + @event['client']['name']).code
    deletion_status(response)<commit_msg>remove condition on requiring rubygems<commit_after>#!/usr/bin/env ruby

require 'rubygems'
require 'sensu-handler'

class Deregister < Sensu::Handler
  def handle
    delete_sensu_client!
  end

  def delete_sensu_client!
    response = api_request(:DELETE, '/clients/' + @event['client']['name']).code
    deletion_status(response)
{'fraction_non_alphanumeric': 0.12743628185907047, 'fraction_numerical': 0.004497751124437781, 'mean_word_length': 5.018018018018018, 'pattern_counts': {'":': 0, '<': 6, '<?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': '3198422', 'n_tokens_mistral': 239, 'n_tokens_neox': 222, 'n_words': 46}