<commit_before>require 'robut'
require 'json'
require 'httparty'
require 'hashie'

module Robut::Plugin
  class Shipr
    include Robut::Plugin

    autoload :Configuration, 'robut/plugin/shipr/configuration'
    autoload :Deploy, 'robut/plugin/shipr/deploy'

    DEPLOYING = 'Deploying %s to %s: %s'

    class << self

      # Public: The plugin configuration
      #
      # Returns Robut::Plugin::Shipr::Configuration
      def configuration
        @configuration ||= Configuration.new
      end

      # Public: Configure the plugin
      #
      # Examples
      #
      #   Robut::Plugin::Shipr.configure do |config|
      #     config.endpoint = 'http://shipr.company.com'
      #   end
      def configure
        yield configuration
      end
    end

    desc "deploy <repo> - Fuck it! We'll do it live!"
    match /^deploy (\S+?)(!)?$/, sent_to_me: true do |repo, force|
      deploy repo, force: force
    end

    desc "deploy <repo> to <environment> - Deploy the repo to the specified environment."
    match /^deploy (\S+?) to (\S+?)(!)?$/, sent_to_me: true do |repo, environment, force|
      deploy repo, environment: environment, force: force
    end

  private

    def deploy(*args)
      deploy = Deploy.new(*args)
      response = deploy.perform.parsed_response
      reply DEPLOYING % [deploy.name, deploy.environment, "#{self.class.configuration.api_base}/deploys/#{response['id']}"]
    end
  end

end<commit_msg>Cleanup.<commit_after>require 'robut'
require 'json'
require 'httparty'
require 'hashie'

module Robut::Plugin
  class Shipr
    include Robut::Plugin

    autoload :Configuration, 'robut/plugin/shipr/configuration'
    autoload :Deploy, 'robut/plugin/shipr/deploy'

    DEPLOYING = 'Deploying %s to %s: %s'

    class << self

      # Public: The plugin configuration
      #
      # Returns Robut::Plugin::Shipr::Configuration
      def configuration
        @configuration ||= Configuration.new
      end

      # Public: Configure the plugin
      #
      # Examples
      #
      #   Robut::Plugin::Shipr.configure do |config|
      #     config.endpoint = 'http://shipr.company.com'
      #   end
      def configure
        yield configuration
      end
    end

    desc "deploy <repo> - Fuck it! We'll do it live!"
    match /^deploy (\S+?)(!)?$/, sent_to_me: true do |repo, force|
      deploy repo, force: force
    end

    desc "deploy <repo> to <environment> - Deploy the repo to the specified environment."
    match /^deploy (\S+?) to (\S+?)(!)?$/, sent_to_me: true do |repo, environment, force|
      deploy repo, environment: environment, force: force
    end

  private

    def deploy(*args)
      deploy = Deploy.new(*args)
      response = deploy.perform.parsed_response
      reply DEPLOYING % [deploy.name, deploy.environment, "#{self.class.configuration.api_base}/deploys/#{response['id']}"]
    end
  end
end
{'fraction_non_alphanumeric': 0.12282533054975643, 'fraction_numerical': 0.0, 'mean_word_length': 2.728923476005188, 'pattern_counts': {'":': 0, '<': 13, '<?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': '1174066', 'n_tokens_mistral': 909, 'n_tokens_neox': 878, 'n_words': 245}