<commit_before>class Stream
  class Help
    def execute
      speak("~haml apps :: List each app name Haml has access to")
      speak("~haml authorize @hamlthehamster :: Add GitHub user '@hamlthehamster' to our GitHub Team")
      speak("~haml bucket :: Copy all our production S3 buckets to development")
      speak("~haml bust third-prestige :: Bust the cache for the 'third-prestige' app") 
      speak("~haml collaborate <EMAIL> :: Add '<EMAIL>' to all of our Heroku Apps")
      speak("~haml dance")
      speak("~haml help :: Display this help message")
      speak("~haml welcome :: Describe steps for welcoming a new team member")
    end
  end

  class Message < Struct.new(:body)
    class << self
      def from(json)
        puts json.inspect
        message = JSON.parse(json)
        
        if message['user_id'].nil? || message['body'].nil?
          Struct.new(:execute).new("")
        else          
          self.new(message['body'])
        end
      end
    end

    def execute
      to, command, arguments = body.split(' ').map(&:strip)

      speak("hi") if to == 'hi' && command == 'haml'

      return unless to == 'haml'

      case command
      when 'apps'        then Server::List.new(arguments)
      when 'authorize'   then GitHubAuthorizor.new(arguments)
      when 'bucket'      then CopyProductionBucketsToDevelopment.new
      when 'bust'        then BustCache.new(arguments)
      when 'collaborate' then HerokuCollaborator.new(arguments)<commit_msg>thanks => yw<commit_after>class Stream
  class Help
    def execute
      speak("~haml apps :: List each app name Haml has access to")
      speak("~haml authorize @hamlthehamster :: Add GitHub user '@hamlthehamster' to our GitHub Team")
      speak("~haml bucket :: Copy all our production S3 buckets to development")
      speak("~haml bust third-prestige :: Bust the cache for the 'third-prestige' app")
      speak("~haml collaborate <EMAIL> :: Add '<EMAIL>prest<EMAIL>' to all of our Heroku Apps")
      speak("~haml dance")
      speak("~haml help :: Display this help message")
      speak("~haml welcome :: Describe steps for welcoming a new team member")
    end
  end

  class Message < Struct.new(:body)
    class << self
      def from(json)
        puts json.inspect
        message = JSON.parse(json)

        if message['user_id'].nil? || message['body'].nil?
          Struct.new(:execute).new("")
        else
          self.new(message['body'])
        end
      end
    end

    def execute
      to, command, arguments = body.split(' ').map(&:strip)

      if command =~ /haml/i
        speak("hi")                                     if to =~ /hi/i
        speak(%w[np yw anytime].sort_by { rand }.first) if to =~ /thanks|thx/i

      return unless to == 'haml'

      case command
      when 'apps'        then Server::List.new(arguments)
      when 'authorize'   then GitHubAuthorizor.new(arguments)
      when 'bucket'      then CopyProductionBucketsToDevelopment.new
      when 'bust'        then BustCache.new(arguments)
      when 'collaborate' then HerokuCollaborator.new(arguments)
{'fraction_non_alphanumeric': 0.11537222043184016, 'fraction_numerical': 0.0006445375443119562, 'mean_word_length': 2.51131221719457, 'pattern_counts': {'":': 0, '<': 14, '<?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': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7176022', 'n_tokens_mistral': 935, 'n_tokens_neox': 915, 'n_words': 283}