<commit_before>module CrowdFlower
  class Worker < Base
    attr_reader :job
    
    def initialize( job )
      super job.connection
      @job = job
      connect
    end
    
    def resource_uri
      "/jobs/#{@job.id}/workers"
    end
    
    def bonus( worker_id, amount, reason=nil )
      params = {
        :amount => amount,
        :reason => reason
      }
      connection.post( "#{resource_uri}/#{worker_id}/bonus", :body => params )
    end

    def reject( worker_id )
      connection.put( "#{resource_uri}/#{worker_id}/reject", :headers => { "Content-Length" => "0" } )
    end
    
    def ban(worker_id)
      connection.put("#{resource_uri}/#{worker_id}/ban", :headers => { "Content-Length" => "0" })
    end
    
    def deban(worker_id)
      connection.put("#{resource_uri}/#{worker_id}/deban", :headers => { "Content-Length" => "0" })
    end
    
    def amt_notify( worker_id, subject, message )<commit_msg>removes ban and deban methods from lib/crowdflower/worker.rb<commit_after>module CrowdFlower
  class Worker < Base
    attr_reader :job
    
    def initialize( job )
      super job.connection
      @job = job
      connect
    end
    
    def resource_uri
      "/jobs/#{@job.id}/workers"
    end
    
    def bonus( worker_id, amount, reason=nil )
      params = {
        :amount => amount,
        :reason => reason
      }
      connection.post( "#{resource_uri}/#{worker_id}/bonus", :body => params )
    end

    def reject( worker_id )
      connection.put( "#{resource_uri}/#{worker_id}/reject", :headers => { "Content-Length" => "0" } )
    end

    def amt_notify( worker_id, subject, message )
{'fraction_non_alphanumeric': 0.13816189896530737, 'fraction_numerical': 0.002434570906877663, 'mean_word_length': 2.396694214876033, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '2611703', 'n_tokens_mistral': 532, 'n_tokens_neox': 530, 'n_words': 118}