Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated gemspec to 2.0.0.

  • Loading branch information...
commit 6736d711e6faa5a03a7954f5a2655e5070d0576e 1 parent ae612f3
Jim Jones authored
2  Gemfile.lock
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- turkee (1.2.2)
+ turkee (2.0.0)
lockfile
rails (>= 3.1.1)
rturk (>= 2.4.0)
61 README.rdoc
View
@@ -1,18 +1,19 @@
-== Turkee Description
+== DESCRIPTION
-Seamlessly convert your Rails forms for use on Mechanical Turk. Then, easily import the data posted by the Mechanical Turk workers back into your data models.
+* 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
+== 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
@@ -29,9 +30,9 @@ If you haven't created a Mechanical Turk account, surf on over to {Amazon's Web
Once you have your account created, you can access your AWS access key and secret access key from {here.}[https://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key]
-== Configuration
+== CONFIGURATION
-Inside the config/initializers directory, you'll see the file turkee.rb. Edit that file with your Amazon credenti.
+Inside the config/initializers directory, you'll see the file turkee.rb. Edit the file with your Amazon credentials.
AWSACCESSKEYID = 'XXXXXXXXXXXXXXXXXX'
AWSSECRETACCESSKEY = 'YYYYYYYYYYYYYYYYYYYYYYYYYYYY'
@@ -39,14 +40,13 @@ Inside the config/initializers directory, you'll see the file turkee.rb. Edit t
RTurk::logger.level = Logger::DEBUG
RTurk.setup(AWSACCESSKEYID, AWSSECRETACCESSKEY, :sandbox => (Rails.env == 'production' ? false : true))
-
-== Use
-
-1) Run your migrations :
+Run the migrations :
rake db:migrate
-2) You should disable form controls if the Turker hasn't accepted the HIT. You can determine this from your controller:
+== 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
@@ -60,7 +60,7 @@ Inside the config/initializers directory, you'll see the file turkee.rb. Edit t
@survey = Survey.new
end
-3) Change your forms to use the form helper.
+2) Change your forms to use the form helper.
<%= turkee_form_for(@survey, params) do |f| %>
<p><%= f.text_area :value, :disabled => @disabled %></p>
@@ -69,7 +69,8 @@ Inside the config/initializers directory, you'll see the file turkee.rb. Edit t
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.
-4) Run the following rake task to post to Mechanical Turk :
+
+3) Run the following rake task to post to Mechanical Turk :
# Host URL of your application
# Title of your HIT
# Description of your HIT
@@ -88,9 +89,28 @@ This will insert a row for the requested HIT into the turkee_tasks table. The t
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 http://www.yourapp.com/surveys/new
-5) Allow some time for the Mechanical Turk workers ("Turkers") to respond to your HIT.
+== 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>]
-6) Run the rake task that retrieves the values from Mechanical Turk and stores the user entered values into your model.
+ # 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:
+
+http://i.imgur.com/wIU40BA.png
+
+== 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.
@@ -104,7 +124,12 @@ Or you can directly call :
Turkee::TurkeeTask.process_hits
-7) 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.
+
+== STUDIES
+
+== 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?
@@ -112,14 +137,14 @@ As for Mechanical Turk approval, if the row is created and you haven't specified
end
end
-8) 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. :
+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
-9) 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. :
+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
2  VERSION
View
@@ -1 +1 @@
-1.2.1
+2.0.0
2  lib/helpers/turkee_forms_helper.rb
View
@@ -34,7 +34,7 @@ def turkee_study(id = nil)
style << "width: 400px; height: 375px; z-index: 100; padding: 10px;"
style << "background-color: rgba(0,0,0, 0.5); border: 1px solid #000;"
div_for(task, :style => style) do
- content = content_tag(:h3, "DIRECTIONS", :style => 'text-align: right; font-color:#FFF;')
+ content = content_tag(:h3, "DIRECTIONS", :style => 'text-align: right; color:#FF0000;')
content << task.hit_description.html_safe
content << '<hr/>'.html_safe
content << turkee_form_for(study, params) do |f|
40 turkee.gemspec
View
@@ -1,38 +1,24 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+
Gem::Specification.new do |s|
s.name = %q{turkee}
- s.version = "1.2.2"
+ s.version = "2.0.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = [%q{Jim Jones}]
- s.date = %q{2013-01-09}
- s.description = %q{Turkee will help you to create your Rails forms, post the HITs, and retrieve the user entered values from Mechanical Turk.}
+ s.date = %q{2013-04-27}
+ s.description = %q{Turkee will help you to easily create usability studies, post HITs, and retrieve the user entered values from Mechanical Turk.}
s.email = %q{jjones@aantix.com}
s.extra_rdoc_files = [
"LICENSE",
"README.rdoc"
]
- s.files = [
- "Gemfile",
- "Rakefile",
- "lib/generators/turkee/templates/turkee.rb",
- "lib/generators/turkee/templates/turkee_imported_assignments.rb.erb",
- "lib/generators/turkee/templates/add_completed_tasks.rb.erb",
- "lib/generators/turkee/templates/turkee_migration.rb.erb",
- "lib/generators/turkee/templates/add_imported_assignment_details.rb.erb",
- "lib/generators/turkee/templates/add_hit_duration.rb.erb",
- "lib/generators/turkee/templates/add_expired.rb.erb",
- "lib/generators/turkee/turkee_generator.rb",
- "lib/tasks/turkee.rb",
- "lib/turkee.rb",
- "lib/models/turkee_imported_assignment.rb",
- "lib/models/turkee_study.rb",
- "lib/models/turkee_task.rb",
- "lib/helpers/turkee_forms_helper.rb",
- "lib/turkee.rb",
- "spec/spec.opts",
- "spec/spec_helper.rb",
- "spec/models/turkee_task_spec.rb"
- ]
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {spec}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+
s.homepage = %q{http://github.com/aantix/turkee}
s.post_install_message = %q{
========================================================================
@@ -50,10 +36,6 @@ Gem::Specification.new do |s|
For instructions on gem usage, visit:
http://github.com/aantix/turkee#readme
- ** If you like the Turkee gem, please click the "watch" button on the
- Github project page. You'll make me smile and feel appreciated. :)
- http://github.com/aantix/turkee
-
========================================================================
-- Gobble, gobble.
}
Please sign in to comment.
Something went wrong with that request. Please try again.