Sha256: 8da802b60c40cf311f71e7c1b115d3fb753471a1e168128f170f832bb0e56229

Contents?: true

Size: 559 Bytes

Versions: 1

Compression:

Stored size: 559 Bytes

Contents

$: << File.join(File.dirname(__FILE__), '..', 'lib')
require 'rubygems'
require '../lib/rturk'

aws = YAML.load(File.open(File.join(File.dirname(__FILE__), 'mturk.yml')))
RTurk::setup(aws['AWSAccessKeyId'], aws['AWSAccessKey'], :sandbox => true)

hits = RTurk::Hit.all_reviewable

puts "#{hits.size} reviewable hits. \n"

unless hits.empty?
  puts "Reviewing all assignments"
  
  hits.each do |hit|
    hit.assignments.each do |assignment|
      puts assignment.answers['tweet']
      assignment.approve! if assignment.status == 'Submitted'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rturk-2.0.0 examples/review_answer.rb