Sha256: 5cc8f28145784a8a2ed4eb2d65a7a59fa267fcb8b7f863967c73bd215b1d3b7a
Contents?: true
Size: 640 Bytes
Versions: 16
Compression:
Stored size: 640 Bytes
Contents
$: << File.join(File.dirname(__FILE__), '..', 'lib') require 'rubygems' require '../lib/rturk' require 'yaml' aws = YAML.load(File.open(File.join(File.dirname(__FILE__), 'mturk.yml'))) RTurk::setup(aws['AWSAccessKeyId'], aws['AWSAccessKey']) file = File.open(File.join(File.dirname(__FILE__), 'answers.yml'), 'w') 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| file.puts assignment.answers.to_hash.to_yaml assignment.approve! if assignment.status == 'Submitted' end end end
Version data entries
16 entries across 16 versions & 1 rubygems