<commit_before>module Maildrop
  class Client

    def initialize(options={})
      token = Maildrop::Authorizer.token(Maildrop.configuration.code)
      @client = DropboxClient.new(token)
    end

    def store!(message)
      now = Time.now.strftime("%Y-%m-%d")
      file = "#{now}/#{message.subject.parameterize}.html"
      @client.put_file(file, message.body.to_s)

      # message.attachments.each do |name, attachment|
      #   attachment_path = "#{now}/#{name}"
      #   @client.put_file(attachment_path, attachment.to_s)
      # end
    end
  end
end<commit_msg>Removes rails requirement for parameterizing message subject<commit_after>module Maildrop
  class Client

    def initialize(options={})
      token = Maildrop::Authorizer.token(Maildrop.configuration.code)
      @client = DropboxClient.new(token)
    end

    def store!(message)
      now = Time.now.strftime("%Y-%m-%d")
      file = "#{now}/#{underscoreize(message.subject)}.html"
      @client.put_file(file, message.body.to_s)

      # message.attachments.each do |name, attachment|
      #   attachment_path = "#{now}/#{name}"
      #   @client.put_file(attachment_path, attachment.to_s)
      # end
    end

    def underscoreize(string)
      string.downcase.gsub(" ", "_")
    end
  end
end
{'fraction_non_alphanumeric': 0.13668499607227022, 'fraction_numerical': 0.0, 'mean_word_length': 3.1229773462783172, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1269242', 'n_tokens_mistral': 411, 'n_tokens_neox': 403, 'n_words': 71}