Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding picture mechanical turk functionality

  • Loading branch information...
commit 1311988466603be545704c655b84107e96ff72ad 1 parent 868cd46
erik authored
Showing with 573 additions and 18 deletions.
  1. +18 −0 app/controllers/application_controller.rb
  2. +14 −4 app/controllers/cca_controller.rb
  3. +53 −0 app/controllers/pictures_controller.rb
  4. +2 −0  app/helpers/pictures_helper.rb
  5. +18 −12 app/models/cca.rb
  6. +2 −0  app/models/normalized_tag.rb
  7. +50 −0 app/models/picture.rb
  8. +2 −0  app/models/tag.rb
  9. +7 −0 app/models/tagging.rb
  10. +6 −0 app/models/turk_answer.rb
  11. +1 −1  app/models/user.rb
  12. +4 −0 app/views/admin/ccas/_form.html.erb
  13. +58 −0 app/views/pictures/show.html.erb
  14. +7 −1 config/routes.rb
  15. +39 −0 db/migrate/20110331175017_create_pictures.rb
  16. +14 −0 db/migrate/20110331214726_create_tags.rb
  17. +13 −0 db/migrate/20110331214838_create_normalized_tags.rb
  18. +15 −0 db/migrate/20110331214847_create_taggings.rb
  19. +15 −0 db/migrate/20110331221513_create_turk_answers.rb
  20. +37 −0 script/donations
  21. +76 −0 script/pictures
  22. +7 −0 test/fixtures/blacklist_emails.yml
  23. +7 −0 test/fixtures/groupings.yml
  24. +7 −0 test/fixtures/groupings_users.yml
  25. +7 −0 test/fixtures/incentives.yml
  26. +7 −0 test/fixtures/normalized_tags.yml
  27. +7 −0 test/fixtures/notification_emails.yml
  28. +7 −0 test/fixtures/pictures.yml
  29. +7 −0 test/fixtures/taggings.yml
  30. +7 −0 test/fixtures/tags.yml
  31. +7 −0 test/fixtures/turk_answers.yml
  32. +8 −0 test/functional/pictures_controller_test.rb
  33. +4 −0 test/unit/helpers/pictures_helper_test.rb
  34. +8 −0 test/unit/normalized_tag_test.rb
  35. +8 −0 test/unit/picture_test.rb
  36. +8 −0 test/unit/tag_test.rb
  37. +8 −0 test/unit/tagging_test.rb
  38. +8 −0 test/unit/turk_answer_test.rb
View
18 app/controllers/application_controller.rb
@@ -264,4 +264,22 @@ def flash_and_redirect(type, message, url = root_path)
end
end
+ def check_for_cca_turk_for_pictures
+ # get all answers by user...
+ turk_answers = @cca.get_answers_by_user(current_user.id)
+ if turk_answers.length >= 15
+ credit = Credit.create(:user_id => current_user.id, :description => "Awarded for #{@cca.title} | #{@cca.id}", :amount => 0.50*turk_answers.length, :cca_id => @cca.id)
+ return "/stories/almost-funded"
+ else
+ picture_ids_string = turk_answers.map(&:turkable_id).join(",")
+ picture = Picture.random(@cca.id, picture_ids_string)
+ unless picture.empty?
+ return "/cca/#{@cca.id}/pictures/#{picture.first.id}"
+ else
+ credit = Credit.create(:user_id => current_user.id, :description => "Awarded for #{@cca.title} | #{@cca.id}", :amount => 0.50*turk_answers.length, :cca_id => @cca.id)
+ return "/stories/almost-funded"
+ end
+ end
+ end
+
end
View
18 app/controllers/cca_controller.rb
@@ -8,7 +8,18 @@ def index
end
def show
- @pitch = Pitch.find_by_id(params[:pitch_id]) if params[:pitch_id]
+ if @cca.is_picture_task
+ if current_user
+ redirect_to check_for_cca_turk_for_pictures
+ return
+ else
+ session[:return_url] = cca_path(@cca)
+ redirect_to new_session_path
+ return
+ end
+ end
+
+ @pitch = Pitch.find_by_id(params[:pitch_id]) if params[:pitch_id]
if current_user
latest_answer = CcaAnswer.latest_answer(@cca,current_user)
@cache_form = latest_answer ? latest_answer : nil
@@ -72,9 +83,8 @@ def submit_answers
end
def apply_credits
- @cca = find_resource
- @filter = "almost-funded"
- @news_items = NewsItem.constrain_type(@filter).send(@filter.gsub('-','_')).order_results(@filter).browsable.by_network(current_network).paginate(:page => params[:page])
+ redirect_to "/stories/almost-funded"
+ return
end
def credit_to_pitch?
View
53 app/controllers/pictures_controller.rb
@@ -0,0 +1,53 @@
+class PicturesController < ApplicationController
+
+ #resources_controller_for :picture
+
+ def show
+ @picture = Picture.find_by_id(params[:id])
+ @cca = @picture.cca
+ end
+
+ def tag
+ @picture = Picture.find_by_id(params[:id])
+ @cca = @picture.cca
+
+ if params[:taglist].blank?
+
+ @picture.errors.add("","You have not specified any tags.")
+ render :action => "show"
+ return
+
+ else
+
+ tags = params[:taglist].split(",").collect{ |tag| tag.strip }
+ if tags.length < 3
+ @picture.errors.add("","You have to specify at least 3 tags.")
+ render :action => "show"
+ return
+ end
+
+ # loop through the tags specified...
+ tags.each do |t|
+ # update the normalized tag...
+ normalized_tag = NormalizedTag.find_by_tag(t.downcase)
+ normalized_tag = NormalizedTag.create({:tag => normalized_tag, :tag_count=>0}) unless normalized_tag
+ normalized_tag.update_attributes(:tag_count => (normalized_tag.tag_count+1))
+
+ # update the tag...
+ tag = Tag.find_by_tag(t)
+ tag = Tag.create({ :tag => t, :normalized_tag_id => normalized_tag.id, :tag_count=>0 }) unless tag
+ tag.update_attributes(:tag_count => (tag.tag_count+1))
+
+ # link the tag to the picture...
+ taggings = Tagging.create({:taggable_type => 'Picture', :taggable_id => @picture.id, :tag_id => tag.id, :normalized_tag_id => normalized_tag.id})
+
+ # save the answer...
+ turk_answer = TurkAnswer.create({:turkable_type => 'Picture', :turkable_id => @picture.id, :user_id => current_user.id, :cca_id => @cca.id})
+
+ redirect_to check_for_cca_turk_for_pictures
+ return
+ end
+ end
+ end
+
+end
View
2  app/helpers/pictures_helper.rb
@@ -0,0 +1,2 @@
+module PicturesHelper
+end
View
30 app/models/cca.rb
@@ -6,22 +6,24 @@ class Cca < ActiveRecord::Base
has_many :cca_answers, :conditions => 'cca_answers.default_answer=0 OR cca_answers.default_answer is null'
has_many :default_cca_answers, :class_name=>"CcaAnswer", :conditions => 'cca_answers.default_answer=1', :foreign_key => "cca_id"
has_many :credits, :foreign_key=>'cca_id'
-
+ has_many :pictures
+ has_many :turk_answers
+
attr_accessor :providing_default_answer
@@providing_default_answer = false
has_attached_file :banner,
- :styles => { :thumb => '99x8#',
- :large_banner => "992x78#",
- :small_banner => "496x39#"},
- :storage => :s3,
- :s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
- :bucket => S3_BUCKET,
- :path => "cca-banners/" <<
- ":attachment/:id_partition/" <<
- ":basename_:style.:extension",
- :url => "cca-banners/:attachment/:id_partition/" <<
- ":basename_:style.:extension"
+ :styles => { :thumb => '99x8#',
+ :large_banner => "992x78#",
+ :small_banner => "496x39#"},
+ :storage => :s3,
+ :s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
+ :bucket => S3_BUCKET,
+ :path => "cca-banners/" <<
+ ":attachment/:id_partition/" <<
+ ":basename_:style.:extension",
+ :url => "cca-banners/:attachment/:id_partition/" <<
+ ":basename_:style.:extension"
unless Rails.env.development?
validates_attachment_content_type :banner,
@@ -44,6 +46,9 @@ def self.STATUS_VALUES
["Pending","Live","Finished"]
end
+ def get_answers_by_user(user_id)
+ turk_answers.find(:all, :conditions => ["user_id=?", user_id])
+ end
def has_begun?(user)
CcaAnswer.find_by_user_id_and_cca_id(user.id, self.id)
@@ -65,6 +70,7 @@ def check_credit_settings
def survey_completed?(user)
# checks if user has completed this survey
+ return true if self.get_answers_by_user(user.id).length>5
completed_answer = self.cca_answers.find(:first, :conditions => "user_id = #{user.id} and status = 1")
return false if completed_answer.blank?
return true
View
2  app/models/normalized_tag.rb
@@ -0,0 +1,2 @@
+class NormalizedTag < ActiveRecord::Base
+end
View
50 app/models/picture.rb
@@ -0,0 +1,50 @@
+class Picture < ActiveRecord::Base
+
+ belongs_to :cca
+ has_many :normalized_tags
+ has_many :tags
+ has_many :users, :through => :tags
+
+ # add the tag system...
+ has_many :taggings, :as => :taggable, :dependent => :destroy
+ has_many :tags, :through => :taggings
+ has_many :normalized_tags, :through => :taggings
+
+ has_many :turk_answers, :as => :turkable
+
+ attr_accessor :taglist
+
+ has_attached_file :photo,
+ :styles => { :thumb => '50x50#', :large => '600x400', :medium => '300x200' },
+ :storage => :s3,
+ :s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
+ :bucket => S3_BUCKET,
+ :path => "photos/" <<
+ ":attachment/:id_partition/" <<
+ ":basename_:style.:extension",
+ :url => "photos/:attachment/:id_partition/" <<
+ ":basename_:style.:extension",
+ :default_url => "/images/featured_images/missing_:style.png"
+
+ #if Rails.env.production?
+ validates_attachment_content_type :photo,
+ :content_type => ['image/jpeg', 'image/pjpeg', 'image/gif', 'image/png',
+ 'image/x-png', 'image/jpg'],
+ :message => "Oops! Make sure you are uploading an image file.",
+ :unless => :no_photo_name
+
+ validates_attachment_size :photo, :in => 1..5.megabytes, :unless => :no_photo_name
+ #end
+
+ named_scope :random, lambda { |cca_id, picture_ids_string|
+ conditions = []
+ conditions << "cca_id=#{cca_id}"
+ conditions << "id not in (#{picture_ids_string})" unless picture_ids_string.blank?
+ {:conditions => conditions.join(" and "), :order=>"rand()", :limit=>1}
+ }
+
+ def no_photo_name
+ !photo_file_name.blank?
+ end
+
+end
View
2  app/models/tag.rb
@@ -0,0 +1,2 @@
+class Tag < ActiveRecord::Base
+end
View
7 app/models/tagging.rb
@@ -0,0 +1,7 @@
+class Tagging < ActiveRecord::Base
+
+ belongs_to :taggable, :polymorphic => true
+ has_many :tags
+ has_many :normalized_tags
+
+end
View
6 app/models/turk_answer.rb
@@ -0,0 +1,6 @@
+class TurkAnswer < ActiveRecord::Base
+
+ belongs_to :taggable, :polymorphic => true
+ belongs_to :cca
+
+end
View
2  app/models/user.rb
@@ -273,7 +273,7 @@ def facebook_user?
########### end facebook ##############
def twitter_connected?
- twitter_credential && twitter_credential.access_token
+ twitter_credential && twitter_credential.access_token
end
def citizen?
View
4 app/views/admin/ccas/_form.html.erb
@@ -14,6 +14,10 @@
<%= f.label :sponsor_id, "Sponsor" %>
<%= f.select(:sponsor_id, @users.collect {|u| [ u.full_name, u.id ] }, { :include_blank => true }) %>
</div>
+ <div class="row">
+ <%= f.label :is_picture_task, "Is the CCA a picture task?" %>
+ <%= f.check_box :is_picture_task %>
+ </div>
<div class="row">
<%= f.label :title, "Title" %>
<%= f.text_field :title %>
View
58 app/views/pictures/show.html.erb
@@ -0,0 +1,58 @@
+<% content_for :head do %>
+<% end %>
+
+<% @title = "Spot.us - Community Centered Advertising" %>
+
+<div class="surveyPageContainer">
+ <div class="ccaHowContainer" id="ccaHow">
+ <%if false%>
+ <span class="close"><img src="/images/new/ccax.png" onclick="$('#ccaHow').hide();return false;"></span>
+ <%end%>
+ <h2>How community-centered sponsorships work</h2>
+ <ul>
+ <li class="engage"><span>1.</span> Engage with this activity from our sponsor.</li>
+ <li class="accumulate"><span>2.</span> Accumulate credits to donate.</li>
+ <li class="apply"><span>3.</span> Apply your free credits to any story.</li>
+ </ul>
+ </div>
+ <div class="surveyContainer">
+ <div class="surveySidebar">
+ <%= render :partial => "cca/fund_this" if params[:pitch_id]%>
+ <%= render :partial => "cca/sponsor_info" %>
+ </div>
+
+ <div class="surveyBody">
+ <%= @cca.description.strip_double_spaces %>
+ <h2>Picture: <%=@picture.title%></h2>
+ <p style="margin-top:-20px;"><%=@picture.caption%></p>
+ <% if @picture.errors.any? %>
+ <div style="border:1px solid red;width:100%;padding:5px 10px">
+ <ul class="formErrorsList" style="list-style-type:none; font-size: 14px; ">
+ <%@picture.errors.each do |error|%>
+ <li><%=error[1]%></li>
+ <%end%>
+ </ul>
+ </div>
+ <% end %>
+ <div class="formContainer">
+ <div class="formBody">
+ <%form_tag("/cca/#{@cca.id}/pictures/#{@picture.id}/tag") do %>
+ <%=image_tag @picture.photo(:large), :width=>643, :height=>500%>
+ <br/><br/>
+ <label>Tags (separate them by comma)</label>
+ <%= text_field_tag :taglist, params[:taglist].to_s, {:style=>"width:620px;"} %>
+ <%= get_button("Apply Your Credits Now", {:name=>"apply_now", :id=>"apply_now"}) if @cca.get_answers_by_user(current_user.id).length>=5%>
+ <%= get_button("Tag") %>
+ <%end%>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+<%unless current_user%>
+ <script>
+ jQuery(document).ready(function($){
+ jQuery.facebox({ajax:"/sections/cca"});
+ });
+ </script>
+<%end%>
View
8 config/routes.rb
@@ -62,8 +62,14 @@
#map.connect "/cca/submit_answers", :controller => "cca", :action => "submit_answers"
#map.connect "/cca/apply_credits/:id", :controller => "cca", :action => "apply_credits"
#map.connect "/cca/:id", :controller => "cca", :action => "show"
- map.resources :cca, :only=>[:show, :index], :member=>{:submit_answers=>:put, :apply_credits=>:get, :results=>:get, :default_answers => :get}
+ map.connect "/cca/:cca_id/pictures/:id", :controller => "pictures", :action => "show"
+ map.connect "/cca/:cca_id/pictures/:id/tag", :controller => "pictures", :action => "tag"
+ map.resources :cca, :member=>{:submit_answers=>:put, :apply_credits=>:get, :results=>:get, :default_answers => :get}
+ # do |cca|
+ # cca.resources :pictures
+ #end
map.connect "/cca/:id/:pitch_id", :controller => "cca", :action => "show"
+
# facebook acct link
#map.resources :users, :collection => {:link_user_accounts => :get}
map.connect "users/link_user_accounts", :controller => "users", :action => "link_user_accounts"
View
39 db/migrate/20110331175017_create_pictures.rb
@@ -0,0 +1,39 @@
+class CreatePictures < ActiveRecord::Migration
+ def self.up
+ create_table :pictures do |t|
+ t.string :image_id
+ t.integer :year
+ t.string :poy
+ t.string :division
+ t.integer :category
+ t.string :award
+ t.string :first_name
+ t.string :last_name
+ t.string :organization
+ t.string :location
+ t.string :title
+ t.text :caption
+ t.string :gender
+ t.string :color
+ t.string :old_keywords
+ t.string :keywords
+ t.string :assigned_category
+ t.string :number_of_pictures
+ t.string :number_in_series
+ t.string :proof
+ t.integer :cca_id
+ t.string :photo_file_name
+ t.string :photo_content_type
+ t.integer :photo_file_size
+ t.datetime :photo_updated_at
+ t.timestamps
+ end
+
+ add_column :ccas, :is_picture_task, :boolean, :default => false
+ end
+
+ def self.down
+ drop_table :pictures
+ remove_column :ccas, :is_picture_task
+ end
+end
View
14 db/migrate/20110331214726_create_tags.rb
@@ -0,0 +1,14 @@
+class CreateTags < ActiveRecord::Migration
+ def self.up
+ create_table :tags do |t|
+ t.string :tag
+ t.integer :tag_count
+ t.integer :normalized_tag_id
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :tags
+ end
+end
View
13 db/migrate/20110331214838_create_normalized_tags.rb
@@ -0,0 +1,13 @@
+class CreateNormalizedTags < ActiveRecord::Migration
+ def self.up
+ create_table :normalized_tags do |t|
+ t.string :tag
+ t.integer :tag_count
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :normalized_tags
+ end
+end
View
15 db/migrate/20110331214847_create_taggings.rb
@@ -0,0 +1,15 @@
+class CreateTaggings < ActiveRecord::Migration
+ def self.up
+ create_table :taggings do |t|
+ t.string :taggable_type
+ t.integer :taggable_id
+ t.integer :tag_id
+ t.integer :normalized_tag_id
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :taggings
+ end
+end
View
15 db/migrate/20110331221513_create_turk_answers.rb
@@ -0,0 +1,15 @@
+class CreateTurkAnswers < ActiveRecord::Migration
+ def self.up
+ create_table :turk_answers do |t|
+ t.string :turkable_type
+ t.integer :turkable_id
+ t.integer :cca_id
+ t.integer :user_id
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :turk_answers
+ end
+end
View
37 script/donations
@@ -0,0 +1,37 @@
+#!/usr/bin/env ruby
+require File.join(File.dirname(__FILE__), '..', 'config', 'environment')
+require 'net/imap'
+require 'net/http'
+require 'rubygems'
+require 'logger'
+
+log = Logger.new(STDOUT)
+
+log.info Time.now.to_s + " Warming up to process donations..."
+csv = ""
+csv += ['User', 'Donations', '', '', 'Nr of Donations', '', ''].join(",")+"\r\n"
+csv += ['', 'Time', 'Amount', 'Total', 'Paid', 'Credits', 'Sponsors'].join(",")+"\r\n"
+users = User.all
+i = 1
+users.each do |user|
+ log.info(" - Processing user #{i} of #{users.length}")
+ data = []
+ data << "User #{user.id}"
+ data << ''
+ data << ''
+ total_count = user.all_donations.find(:all, :conditions=>"donations.status='paid' or donations.credit_id is not null").length
+ credit_count = user.all_donations.find(:all, :conditions=>"donations.credit_id is not null").length
+ data << total_count
+ data << total_count-credit_count
+ data << credit_count
+ data << user.all_donations.find(:all, :joins=>"inner join credits on credits.id=donations.id", :conditions=>"credits.cca_id is not null and donations.credit_id is not null").length
+ csv += data.join(",")+"\r\n"
+ user.all_donations.find(:all, :conditions=>"donations.status='paid' or donations.credit_id is not null").each do |d|
+ csv += ['', d.created_at, d.amount, '', '', '', ''].join(",")+"\r\n"
+ end
+ i += 1
+end
+
+File.open("/Users/eriks/spotus/donations.csv", 'w') {|f| f.write(csv) }
+
+log.info Time.now.to_s + " Done and going to sleep..."
View
76 script/pictures
@@ -0,0 +1,76 @@
+#!/usr/bin/env ruby
+require File.join(File.dirname(__FILE__), '..', 'config', 'environment')
+require 'net/imap'
+require 'net/http'
+require 'rubygems'
+require 'logger'
+require 'spreadsheet'
+
+log = Logger.new(STDOUT)
+
+log.info Time.now.to_s + " Warming up to import pictures..."
+
+xls_filename = ARGV.first
+photos_path = ARGV.second
+
+unless xls_filename.blank?
+ book = Spreadsheet.open xls_filename
+ sheet = book.worksheet 0
+ i = 0
+ nr_rows = sheet.row_count.to_i
+ sheet.each do |row|
+ if i > 0
+ log.info " -- Processing row #{i.to_s} of #{(nr_rows-1).to_s}"
+
+ # create the arg hash...
+ arg = {}
+ arg[:image_id] = row[0].to_s.gsub('.0', '')
+ arg[:year] = row[1].to_i if row[1]
+ arg[:poy] = row[2].to_i if row[2]
+ arg[:division] = row[3] if row[3]
+ arg[:category] = row[4] if row[4]
+ arg[:award] = row[5] if row[5]
+ arg[:first_name] = row[6] if row[6]
+ arg[:last_name] = row[7] if row[7]
+ arg[:organization] = row[8] if row[8]
+ arg[:location] = row[9] if row[9]
+ arg[:title] = row[10] if row[10]
+ arg[:caption] = row[11] if row[11]
+ arg[:gender] = row[12] if row[12]
+ arg[:color] = row[13] if row[13]
+
+ # handle the old keywords...
+ old_keywords = []
+ [14,15,16,17,18].each do |ind|
+ old_keywords << row[ind].to_s.split(',') unless row[ind].blank?
+ end
+ old_keywords.flatten!
+ arg[:old_keywords] = old_keywords.collect{ |ok| ok.strip }.join(",") unless old_keywords.empty?
+
+ arg[:assigned_category] = row[19]
+ arg[:number_of_pictures] = row[20]
+ arg[:number_in_series] = row[21]
+
+ # handle the proof data...
+ proof = []
+ [22,23,24].each do |ind|
+ proof << row[ind].to_s.split(',') unless row[ind].blank?
+ end
+ proof.flatten!
+ arg[:proof] = proof.collect{ |p| p.strip }.join(",") unless proof.empty?
+
+ # get the photo file and attach it...
+ my_filename = "#{arg[:image_id]}"
+ tempfile = Tempfile.new(my_filename)
+ tempfile.write open(photos_path+"/"+my_filename).read
+ arg[:photo] = tempfile
+
+ p = Picture.create(arg)
+ end
+ i += 1
+ end
+ log.info Time.now.to_s + " Done and going to sleep..."
+else
+ log.info ""
+ log.info Time.now.to_s + " Oops, you have specify a tab delimited file..."
+end
View
7 test/fixtures/blacklist_emails.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# one:
+# column: value
+#
+# two:
+# column: value
View
7 test/fixtures/groupings.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# one:
+# column: value
+#
+# two:
+# column: value
View
7 test/fixtures/groupings_users.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# one:
+# column: value
+#
+# two:
+# column: value
View
7 test/fixtures/incentives.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# one:
+# column: value
+#
+# two:
+# column: value
View
7 test/fixtures/normalized_tags.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# one:
+# column: value
+#
+# two:
+# column: value
View
7 test/fixtures/notification_emails.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# one:
+# column: value
+#
+# two:
+# column: value
View
7 test/fixtures/pictures.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# one:
+# column: value
+#
+# two:
+# column: value
View
7 test/fixtures/taggings.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# one:
+# column: value
+#
+# two:
+# column: value
View
7 test/fixtures/tags.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# one:
+# column: value
+#
+# two:
+# column: value
View
7 test/fixtures/turk_answers.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# one:
+# column: value
+#
+# two:
+# column: value
View
8 test/functional/pictures_controller_test.rb
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class PicturesControllerTest < ActionController::TestCase
+ # Replace this with your real tests.
+ test "the truth" do
+ assert true
+ end
+end
View
4 test/unit/helpers/pictures_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class PicturesHelperTest < ActionView::TestCase
+end
View
8 test/unit/normalized_tag_test.rb
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class NormalizedTagTest < ActiveSupport::TestCase
+ # Replace this with your real tests.
+ test "the truth" do
+ assert true
+ end
+end
View
8 test/unit/picture_test.rb
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class PictureTest < ActiveSupport::TestCase
+ # Replace this with your real tests.
+ test "the truth" do
+ assert true
+ end
+end
View
8 test/unit/tag_test.rb
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class TagTest < ActiveSupport::TestCase
+ # Replace this with your real tests.
+ test "the truth" do
+ assert true
+ end
+end
View
8 test/unit/tagging_test.rb
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class TaggingTest < ActiveSupport::TestCase
+ # Replace this with your real tests.
+ test "the truth" do
+ assert true
+ end
+end
View
8 test/unit/turk_answer_test.rb
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class TurkAnswerTest < ActiveSupport::TestCase
+ # Replace this with your real tests.
+ test "the truth" do
+ assert true
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.