<commit_before>class Violation < ActiveRecord::Base
  belongs_to :tweet
  belongs_to :group
  has_many :trigger_violations
  has_many :triggers, through: :trigger_violations

  def charge_the_user
    user = self.tweet.user
    admin = User.find(self.group.admin_id)
    words = self.triggers.pluck(:name).join(" and ")
    AppTwitter.tweet_to(build_message(user, words))
    
    unless user.id == admin.id
      admin_venmo_id = admin.venmo_id
      amount = self.group.dollar_amount
      time = self.tweet.created_at.strftime("%I:%M:%S %p")
      note = "I said #{words} on twitter around #{time} UTC. auto-payment via swear-jar"
      access_token = user.token

      conn = Faraday.new(:url => 'https://api.venmo.com') do |faraday|
        faraday.request  :url_encoded 
        faraday.response :logger<commit_msg>fixes Venmo display error<commit_after>class Violation < ActiveRecord::Base
  belongs_to :tweet
  belongs_to :group
  has_many :trigger_violations
  has_many :triggers, through: :trigger_violations

  def charge_the_user
    user = self.tweet.user
    admin = User.find(self.group.admin_id)
    words = self.triggers.pluck(:name).join(" and ")
    AppTwitter.tweet_to(build_message(user, words))
    
    unless user.id == admin.id
      admin_venmo_id = admin.venmo_id
      amount = self.group.dollar_amount
      time = self.tweet.created_at.strftime("%I:%M:%S %p").gsub(":", " ")
      note = "I said #{words} on twitter around #{time} UTC. auto-payment via swear-jar"
      access_token = user.token

      conn = Faraday.new(:url => 'https://api.venmo.com') do |faraday|
        faraday.request  :url_encoded 
        faraday.response :logger
{'fraction_non_alphanumeric': 0.12043139604553625, 'fraction_numerical': 0.0, 'mean_word_length': 3.3603133159268928, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4856436', 'n_tokens_mistral': 576, 'n_tokens_neox': 554, 'n_words': 116}