Coder Social home page Coder Social logo

turkee's Introduction

RAILS 4 SUPPORT

Rails 4 support is currently being tested. To try it out, just use Turkee’s master branch. In your Gemfile, add the following :

gem 'turkee', :git => 'https://github.com/aantix/turkee.git', branch: 'master'

WHAT TURKEE CAN DO

  • Perform user feedback studies easily.

  • Seamlessly convert your Rails forms for use on Mechanical Turk.

  • Easily import the data posted by the Mechanical Turk workers back into your data models.

External forms are created using a simple form helper. HITs are created by issuing a rake command. Retrieving submitted response data and importing that data into your model(s) requires just one more rake command.

INSTALL/UPGRADE

Add turkee to your Gemfile as a gem dependency, then do a ‘bundle install’:

gem 'turkee'

If you’re upgrading Turkee (1.1.1 and prior) or installing for the first time, run:

rails g turkee --skip

(the skip flag will ensure that you don’t overwrite prior Turkee initializers and migrations.)

This will copy the needed migrations and config/initializer into your application directory.

To access the Turkee rake tasks, add the following to your application’s Rakefile:

require 'tasks/turkee'

If you haven’t created a Mechanical Turk account, surf on over to Amazon’s Web Services and create an AWS account.

Once you have your account created, you can access your AWS access key and secret access key from here.

CONFIGURATION

Inside the config/initializers directory, you’ll see the file turkee.rb. Edit the file with your Amazon credentials.

AWSACCESSKEYID      = 'XXXXXXXXXXXXXXXXXX'
AWSSECRETACCESSKEY  = 'YYYYYYYYYYYYYYYYYYYYYYYYYYYY'

RTurk::logger.level     = Logger::DEBUG
RTurk.setup(AWSACCESSKEYID, AWSSECRETACCESSKEY, :sandbox => (Rails.env == 'production' ? false : true))

Run the migrations :

rake db:migrate

MIXED CONTENT WARNINGS

Mechanical Turk will open your forms in an iFrame from a secure URL (ssl). If you test locally with localhost, you’re going to need to be running SSL so that you don’t receive a mixed content warning within Chrome and a blank screen. Thin allows for local SSL.

# Gemfile
gem 'thin', :group => :development

Then you can start the server by calling :

thin start --ssl

BASIC FORMS

1) You should disable form controls if the Turker hasn’t accepted the HIT. You can determine this from your controller:

class SurveysController < ApplicationController

    def new
        @disabled      = Turkee::TurkeeFormHelper::disable_form_fields?(params)

        # If you wanted to find the associated turkee_task, you could do a find by hitId
        #  Not necessary in a simple example.
        # @turkee_task   = Turkee::TurkeeTask.find_by_hit_id(params[:hitId]).id rescue nil

        ...
        @survey        = Survey.new
    end

2) Change your forms to use the form helper.

<%= turkee_form_for(@survey, params) do |f| %>
    <p><%= f.text_area :value, :disabled => @disabled %></p>
    <p><%= f.submit 'Create', :disabled => @disabled %></p>
<% end %>

Using the turkee_form_for helper will post the form to the Mechanical Turk sandbox if you’re in development/test mode, otherwise it will be posted to Mechanical Turk production/live site.

3) Run the following rake task to post to Mechanical Turk :

# Host URL of your application
# Title of your HIT
# Description of your HIT
# Model name of your task form (the New action should be implemented)
# Number of assignments for HIT
# The reward for a successful completion
# The lifetime of the HIT in days (e.g. 5 days)

rake turkee:post_hit[<Host>, <Title>, <Description>, <Model>, <Number of Assignments>, <Reward>, <Lifetime>]

e.g. :
rake turkee:post_hit["https://www.yourapp.com","Please complete our survey","Tell us your favorite color.","Survey",100,0.05,5,1]
** Do not put spaces before or after commas for the rake task parameters

This will insert a row for the requested HIT into the turkee_tasks table. The turkee_tasks entry stores (along with the other properties) the HIT URL (e.g. workersandbox.mturk.com/mturk/preview?groupId=1HGHJJGHQSJB7WMWJ33YS8WM169XNIL ) and HIT ID (e.g. 1J1EXO8SUQ3URTTUYGHJ7EKUT11 ). These values are returned from Mechanical Turk when the HIT request is posted.

When a Turk worker views your HIT, the HIT will display your form within an iFrame. With the above example, Mechanical Turk will open an iFrame for the HIT assignment displaying the form www.yourapp.com/surveys/new

USER FEEDBACK STUDIES

1) Add the following method call to your app/views/layouts/application.html.haml file :

<%= turkee_study %>

2) Call the create_study rake task :

rake turkee:create_study[<Application Page URL>, <HIT Title>, <HIT Description>, <Number of Assignments>, <Reward>, <Lifetime of HIT>]

# 30 Assignments at a quarter each requesting feedback on my site
RAILS_ENV=production rake turkee:create_study['https://yoursite.com/page-to-be-test',"Can you help me test my website?","Give feedback below on what you didn't like about my site. Click submit below when you're finished.", 30,0.25, 20]

3) The Turker will see a feedback form overlayed over your website. Within this textarea, they can provide feedback.

Screenshot:

RETRIEVING RESULTS

1) Run the rake task that retrieves the values from Mechanical Turk and stores the user entered values into your model.

rake turkee:get_all_results

Rerun this task periodically to retrieve newly entered form values. You can setup this task as a cronjob to automate this.

crontab -e

# E.g. run every five minutes
*/5 * * * * cd /var/www/your/turk/application && rake turkee:get_all_results

Or you can directly call :

Turkee::TurkeeTask.process_hits

DATA RETRIEVAL; THE INS AND OUTS

1) When a response is retrieved from Mechanical Turk, Turkee attempts to create a data row for the model specified using the corresponding retrieved data. If the row cannot be created (input failed model validations), the assignment is rejected. As for Mechanical Turk approval, if the row is created and you haven’t specified your own custom approve? method for the model, the assignment will automatically be approved. If you’d like to add your own custom approval method, add the approve? instance method to your model. E.g. :

class Survey < ActiveRecord::Base
  def approve?
    (!response.blank? && !comment.blank?)
  end
end

2) When all specified assignments for a HIT have been completed, Turkee will attempt to call the optional hit_complete class method for the model. This can be used for any cleanup logic. E.g. :

class Survey < ActiveRecord::Base
  def self.hit_complete(turkee_task)
    #do something
  end
end

3) If all of specified assignments for a HIT have not been completed by the end of the HITs lifetime, Turkee will attempt to call the optional hit_expired class method for the model. This can be used for any cleanup logic. E.g. :

class Survey < ActiveRecord::Base
  def self.hit_expired(turkee_task)
    #do something
  end
end

Advanced Usage

1) You can use the params hash to pass object IDs to your forms. E.g. if you wanted to setup a form of questions about a given URL (let’s call the model UrlSurvey), your code would look something like :

URL.all do |url|
    Turkee::TurkeeTask.create_hit(host, "Enter the address displayed for the given url.",
        hit_description, UrlSurvey, num_assignments, reward,
        lifetime, duration, {}, {:url_id => url.id}, {})
end

Then when displaying your form, you can find the URL object via the params value.

2) You can pass in qualifications to allow only certain Turkers to work on your HIT.

E.g. qualifications = {:approval_rate => {:gt => 70}, :country => {:eql => ‘US’}}

Turkee::TurkeeTask.create_hit(host, hit_title, hit_description, UrlSurvey, num_assignments, reward, lifetime, duration, qualifications, {}, {})
  • The rake task does not support the passing of qualifications.

3) Turkee assumes that the form url will be the new action for the class passed to create_hit. If you have a more complex form url which would be the case for nested resources, you can use the :form_url option to designate a form url different from the default.

form_url = Rails.application.routes.url_helpers.send("new_user_survey_path",@my_survey)

Turkee::TurkeeTask.create_hit(host, hit_title, hit_description, :Survey, num_assignments, reward,
    lifetime, duration, {}, {}, {:form_url => form_url})

Copyright © 2010 - 2012 Jim Jones. See LICENSE for details.

turkee's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

turkee's Issues

Turkers can't submit HIT form

Using turkee_form_for(@model, params) as in the instructions

Turkers get this error:

There was a problem submitting your results for this HIT.

This HIT is still assigned to you. To try this HIT again, click "HITs Assigned To You" in the navigation bar, then click "Continue work on this HIT" for the HIT. If this problem persists, you can contact the Requester for this HIT using the "Contact" link above.

To return this HIT and continue working on other HITs, click the "Return HIT" button.

Neither the assignmentId, hit_id, or worker_id, is present in the form when I test it with a live HIT. Why could this be?

Deprecation Warning for Rails 4

DEPRECATION WARNING: ActionController::Integration is deprecated and will be removed, use ActionDispatch::Integration instead. (/lib/models/turkee_task.rb:245)

new_test_path

Hey! If you guys could help, it'd be appreciated. I'm getting this error in the terminal when I try to send out an initial test HIT:

$ rake turkee:post_hit["https://www.yourapp.com","Please complete our survey","Tell us your favorite color.","Test",100,0.05,5,1]
rake aborted!
undefined method new_test_path' for #<ActionDispatch::Integration::Session:0x007fe66453bd88> /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/testing/assertions/routing.rb:171:inmethod_missing'
/Users/macuser/.bundler/ruby/2.0.0/turkee-8cfe9bd96f2f/lib/models/turkee_task.rb:248:in form_url' /Users/macuser/.bundler/ruby/2.0.0/turkee-8cfe9bd96f2f/lib/models/turkee_task.rb:241:inbuild_url'
/Users/macuser/.bundler/ruby/2.0.0/turkee-8cfe9bd96f2f/lib/models/turkee_task.rb:71:in create_hit' /Users/macuser/.bundler/ruby/2.0.0/turkee-8cfe9bd96f2f/lib/tasks/turkee.rb:7:inblock (2 levels) in <top (required)>'
Tasks: TOP => turkee:post_hit

I'm having difficulty assessing how to deal with new_test_path. If you need more information, or if this an error that isn't the result of my doing, please let me know!

Thanks guys, and thanks for your work on this nice library

undefined method `assignments=' for #<RTurk::CreateHIT> when calling Turkee::TurkeeTask.create_hit

When I try to run the code to post a new hit,

hit = Turkee::TurkeeTask.create_hit("localhost:3000","Please complete our survey","Tell us your favorite color.","Response",100,0.05,5)

I get this error

NoMethodError: undefined method `assignments=' for #RTurk::CreateHIT:0x007fdfcbf75b68

its occurring in turkee_task.b line 75 in create_hit

Trying to dig in, but not sure exactly whats going on here.
It seems like it should be trying to assignments on a RTurk::HIT object, not a RTurk::CreateHIT object, but I'm not sure.

If I try to assign the assignments to the RTurk::HIT object after creation, it does not work.
(If I skip that assignments= line, it will work)

sandbox parameter dispersed?

Hi,

about the sandbox parameter

  • there is 2 variables synchronize Rturk and Turkee

** in rails app /initializer/turkee.rb
sandbox=(Rails.env == 'production' ? false : true)
RTurk.setup(AWSACCESSKEYID, AWSACCESSKEY, :sandbox => sandbox)

** and in turkee gems/ turkee.rb
self.create_hit(host, hit_title, hit_description, typ, num_assignments, reward, lifetime, keywords, task_duration)
...
TurkeeTask.create(:sandbox => (Rails.env == 'production' ? false : true),

so I want to configure the sandbox parameter in something else that depending of the production or development mode , I need to change the both variable

is there a way to create only 1 variable in Turkee that initialize RTurk

Nicolas

Lockfile issues

The lock files your using seem to have a lot of problems, just hangs the process rake task. If I comment out the lock file code it all works fine, wondering if the lockfile api changed its internal api. I'll see if I can get a patch to fix this

turkee requires turkee (>= 0)

When installing it from rubygems gem install turkee, I get the following error:

gem install turkee
ERROR:  Error installing turkee:
    turkee requires turkee (>= 0)

Then I cloned it and tried to install using rake install, the same error.

Actually there is a line in .gemspec file that adds turkee itself as a dependency. That might be the problem or may be due to the gem version installed i.e. 1.6.2 in my system.

undefined method `completed_assignments' for #<Turkee....>

When I run rake turkee:get_all_results I get this output:

rake aborted!
undefined method `completed_assignments' for #<Turkee::TurkeeTask:0x007fd0e3ca3f30>
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/activemodel-3.2.1/lib/active_model/attribute_methods.rb:407:in `method_missing'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.2.1/lib/active_record/attribute_methods.rb:126:in `method_missing'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/bundler/gems/turkee-42f6f30b0fa9/lib/turkee.rb:144:in `check_hit_completeness'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/bundler/gems/turkee-42f6f30b0fa9/lib/turkee.rb:58:in `block (2 levels) in process_hits'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.2.1/lib/active_record/relation/delegation.rb:6:in `each'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.2.1/lib/active_record/relation/delegation.rb:6:in `each'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/bundler/gems/turkee-42f6f30b0fa9/lib/turkee.rb:35:in `block in process_hits'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/lockfile-2.1.0/lib/lockfile.rb:275:in `block in lock'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/lockfile-2.1.0/lib/lockfile.rb:517:in `block (2 levels) in attempt'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/lockfile-2.1.0/lib/lockfile.rb:517:in `catch'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/lockfile-2.1.0/lib/lockfile.rb:517:in `block in attempt'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/lockfile-2.1.0/lib/lockfile.rb:517:in `loop'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/lockfile-2.1.0/lib/lockfile.rb:517:in `attempt'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/lockfile-2.1.0/lib/lockfile.rb:201:in `lock'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/lockfile-2.1.0/lib/lockfile.rb:191:in `initialize'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/bundler/gems/turkee-42f6f30b0fa9/lib/turkee.rb:31:in `new'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/bundler/gems/turkee-42f6f30b0fa9/lib/turkee.rb:31:in `process_hits'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/bundler/gems/turkee-42f6f30b0fa9/lib/tasks/turkee.rb:14:in `block (2 levels) in <top (required)>'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/Tyler/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
./bundler_stubs/rake:16:in `load'
./bundler_stubs/rake:16:in `<main>'
Tasks: TOP => turkee:get_all_results

completed_assingments seems to be an attr_reader in RTurk HITParser:

module RTurk

  class HITParser < RTurk::Parser

    attr_reader :id, :type_id, :status, :title, :created_at, :expires_at, :assignments_duration,
                :reward_amount, :max_assignments, :pending_assignments, :available_assignments,
                :completed_assignments, :auto_approval_delay, :keywords

    def initialize(hit_xml)
      @xml_obj = hit_xml
      map_content(@xml_obj,
                  :id => 'HITId',
                  :type_id => 'HITTypeId',
                  :status => 'HITStatus',
                  :title => 'Title',
                  :created_at => 'CreationTime',
                  :expires_at => 'Expiration',
                  :assignments_duration => 'AssignmentDurationInSeconds',
                  :reward_amount => 'Reward/Amount',
                  :max_assignments => 'MaxAssignments',
                  :pending_assignments => 'NumberOfAssignmentsPending',
                  :available_assignments => 'NumberOfAssignmentsAvailable',
                  :completed_assignments => 'NumberOfAssignmentsCompleted',
                  :auto_approval_delay => 'AutoApprovalDelayInSeconds')
    end
  end
end

The results from the HIT are being added to my model though.

Turkee doesn't work with Rails 4

Trying to integrate Turkee into a new Rails 4 app I'm building, and the first thing that breaks is the usage of attr_accessible instead of strong parameters

Using the 'protected_attributes' gem gets me past this first problem. I'll add more if I run into further issues

Firefox 4 form submission problem?

This appears to be browser specific but maybe others can shed some light on the subject.

When I pull up my hit with Firefox 4 and submit it, I get the following error message from Mechanical Turk :

"This HIT is still assigned to you. To try this HIT again, click "HITs Assigned To You" in the navigation bar, then click "Continue work on this HIT" for the HIT. If this problem persists, you can contact the Requester for this HIT using the "Contact" link above."

To return this HIT and continue working on other HITs, click the "Return HIT" button."

I do not receive this error if I use Safari or IE. Can anyone else validate this? Maybe there's some security differences in the way FF 4 handles cross domain form posts? I am going to have to monitor with Firebug::Net to see what headers are being sent.

Rake working locally but not on Heroku

Hi Jim, thanks for the great gem. I got the basic form part working locally but on Heroku when I try to run the rake I get a "Don't know how to build task" error. Any ideas? Have looked everywhere for an answer but can't seem to figure it out.

Rails 3 dependencies

Rails 3 gem dependencies do not automatically include rturk. Would be nice if it would :)

rake turkee:post_hit: wrong number of arguments (6 for 7)

Hi
rake turkee:post_hit ["Please complete our survey", "Tell us your favorite color.", "Survey", 100, 0.05, 2]

(to fix also: turkee:post_hit and not turkee:posthit in the README)
==>
wrong number of arguments (6 for 7)
c:/Ruby187/lib/ruby/gems/1.8/gems/turkee-1.0.2/lib/tasks/turkee.rb:11:in create _hit' c:/Ruby187/lib/ruby/gems/1.8/gems/turkee-1.0.2/lib/tasks/turkee.rb:11 c:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall'

undefined method `reverse_merge!' for nil:NilClass

I'm trying to test out turkee but get a 'undefined method `reverse_merge!' for nil:NilClass' error when I try to view my form.

Here's the code:

class MechanicalTurksController < ApplicationController
  def new
    @mechanical_turk = MechanicalTurk.new
    @disabled = Turkee::TurkeeFormHelper::disable_form_fields?(params)
  end
end

<%= turkee_form_for(@mechanical_turk, params) do |f| %>
    <%= f.label :first_name %>
    <%= f.text_field :first_name, disabled: @disabled %>

    <br />
    <%= f.submit "Save", class:"btn btn-primary", disabled: @disabled %>
<% end %>

class MechanicalTurk < ActiveRecord::Base

end

I've tried this on my development as well as staging servers, and get the same errors in both places.

The error comes from the form_for_options and it appears params is missing something?

The only parameters being passed to the call to mecahnical_turks/new are the asignmentId and hitId

generators are failing

Receiving the following error upon issuing the generators:

bash-3.2$ rails g turkee
/Library/Ruby/Gems/1.8/gems/turkee-1.0.4/lib/turkee.rb:4:in require': no such file to load -- lockfile (LoadError) from /Library/Ruby/Gems/1.8/gems/turkee-1.0.4/lib/turkee.rb:4 from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:inrequire'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:ineach'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:ineach'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler.rb:120:inrequire'

I'm running Rails 3.0.4 and have completed 'bundle install' and the Rakefile 'require' per the readme.

Making Sandbox accessing local form?

Awesome gem!

When you guys say:

Mechanical Turk will open your forms in an iFrame from a secure URL (ssl). If you test locally with localhost, you're going to need to be running SSL so that you don't receive a mixed content warning within Chrome and a blank screen. Thin allows for local SSL.

How do you make the Amazon Sandbox access the form that is in my local server?

Why is duration limited to hour increments?

Ideally, I'd like to be able to specify seconds (not hours).

this line make it not possible: hit.duration = duration.to_i.hours.seconds.to_i if duration

Any thoughts on changing this to seconds? I'm happy to write the code.

Documentation bug?

I believe there is a bug in the Advanced Usage section of the wiki: https://github.com/aantix/turkee#advanced-usage

In order to get this to work in my application:
Turkee::TurkeeTask.create_hit(host, hit_title, hit_description, Survey, num_assignments, reward, lifetime, {}, {}, {:form_url => form_url})

I had to replace the model type Survey with :Survey.
Turkee::TurkeeTask.create_hit(host, hit_title, hit_description, :Survey, num_assignments, reward, lifetime, {}, {}, {:form_url => form_url})

update tag

Hi,

Could you please update the latest release to the master. I was stumped for a while when Rails kept giving me 'can't mass-assign protected attributes' error.

Thanks!

Rails 4 generate turkee fails

run rails g turkee

/deprecated_mass_assignment_security.rb:14:in attr_accessible':attr_accessible` is extracted out of Rails into a gem. Please use new recommended protection model for params

mixed content blocking.

On firefox , it is no longer a warning and blocks. It appears it still works on chrome. ssl now is required for local and production testing on firefox.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.