Sha256: 769f90a96392c7ce5c006206f626c9435f966f3b99f06fefb34ca890c400ca43

Contents?: true

Size: 586 Bytes

Versions: 18

Compression:

Stored size: 586 Bytes

Contents

require File.expand_path('../example_helper', __FILE__)

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

hits = RTurk::Hit.all_reviewable

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

unless hits.empty?
  puts "Approving all assignments and disposing of each hit!"

  hits.each do |hit|
    hit.expire! if (hit.status == "Assignable" || hit.status == 'Unassignable')
    hit.assignments.each do |assignment|
      assignment.approve! if assignment.status == 'Submitted'
    end
    hit.dispose!
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rturk-2.12.1 examples/blank_slate.rb
rturk-2.12.0 examples/blank_slate.rb
rturk-2.11.3 examples/blank_slate.rb
rturk-2.11.2 examples/blank_slate.rb
rturk-2.11.1 examples/blank_slate.rb
rturk-2.11.0 examples/blank_slate.rb
rturk-2.10.3 examples/blank_slate.rb
rturk-2.10.2 examples/blank_slate.rb
rturk-2.10.1 examples/blank_slate.rb
rturk-2.10.0 examples/blank_slate.rb
rturk-2.9.0 examples/blank_slate.rb
rturk-2.8.0 examples/blank_slate.rb
rturk-2.7.0 examples/blank_slate.rb
rturk-2.6.0 examples/blank_slate.rb
rturk-2.5.2 examples/blank_slate.rb
rturk-2.5.0 examples/blank_slate.rb
rturk-2.4.1 examples/blank_slate.rb
rturk-2.4.0 examples/blank_slate.rb