cloudfactory 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ Website,image_url,first_name,last_name,company
2
+ aaple.com,http://onwired.com/images/portfolio/linda-stanley-business-card.jpg,John,Lennon,Sprout
@@ -36,7 +36,7 @@ module CF
36
36
  sleep 1
37
37
  line = CF::Line.create(title,"Digitization") do |l|
38
38
  CF::InputFormat.new({:line => l, :name => "text", :required => true})
39
- CF::Station.create({:line => l, :type => "work"}) do |s|
39
+ CF::Station.create({:line => l, :type => "robot"}) do |s|
40
40
  CF::RobotWorker.create({:station => s, :type => "google_translate_robot", :settings => {:data => ["{{text}}"], :from => "en", :to => "es"}})
41
41
  end
42
42
  end
@@ -60,71 +60,7 @@ module CF
60
60
  CF::HumanWorker.new({:station => station, :number => 1, :reward => 20})
61
61
  end
62
62
  end
63
- line.stations.first.worker.to_s.should eql("{:id => => #{line.stations.first.worker.id}, :number => 1, :reward => 20, :stat_badge => {\"approval_rating\"=>80, \"assignment_duration\"=>3600, \"abandonment_rate\"=>30, \"country\"=>nil}, :skill_badges => [nil], :errors => }")
64
- end
65
- end
66
-
67
- context "create a worker with skill_badge and skill_test" do
68
- it "the Block DSL way" do
69
- WebMock.allow_net_connect!
70
- title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
71
- sleep 1
72
- badge =
73
- {
74
- :title => 'Football Fanatic',
75
- :description => "This qualification allows you to perform work at stations which have this badge.",
76
- :max_badges => 3,
77
- :test =>
78
- {
79
- :input => {:name => "Lionel Andres Messi", :country => "Argentina"},
80
- :expected_output =>
81
- [{:birthplace => "Rosario, Santa Fe, Argentina",:match_options => {:tolerance => 10, :ignore_case => true }},{:position => "CF",:match_options => {:tolerance => 1 }},{:"current-club" => "Barcelona",:match_options => {:tolerance => 1, :ignore_case => false }}]
82
- }
83
- }
84
- line = CF::Line.create(title, "Digitization") do |l|
85
- CF::InputFormat.new({:line => l, :name => "image_url", :required => true, :valid_type => "url"})
86
- CF::Station.create({:line =>l, :type => "work"}) do |s|
87
- @worker = CF::HumanWorker.new({:station => s, :number => 1, :reward => 20, :skill_badge => badge})
88
- end
89
- end
90
- line.stations.first.type.should eql("WorkStation")
91
- line.stations.first.worker.number.should eql(1)
92
- line.stations.first.worker.reward.should eql(20)
93
- line.stations.first.worker.skill_badges.first.should eql([{"title"=>"Football Fanatic", "description"=>"This qualification allows you to perform work at stations which have this badge.", "score"=>nil, "quality_rating"=>nil, "max_badges"=>3, "skill_test"=>{"score_after"=>"submit", "manual_scoring"=>false, "display_answers"=>false, "edit_answers"=>true, "retries"=>0, "pass_percentage"=>100, "test_units"=>[{"input"=>{"name"=>"Lionel Andres Messi", "country"=>"Argentina"}, "expected_output"=>[{"birthplace"=>"Rosario, Santa Fe, Argentina", "match_options"=>{"tolerance"=>"1", "ignore_case"=>"false"}, "position"=>"CF", "current-club"=>"Barcelona"}], "match_options"=>{"tolerance"=>0, "ignore_case"=>false}}]}}])
94
- line.stations.first.worker.stat_badge.should eql({"approval_rating"=>80, "assignment_duration"=>3600, "abandonment_rate"=>30, "country"=>nil})
95
- end
96
-
97
- it "in plain ruby way" do
98
- WebMock.allow_net_connect!
99
- title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
100
- sleep 1
101
- skill_badge =
102
- {
103
- :title => 'Football Fanatic',
104
- :description => "This qualification allows you to perform work at stations which have this badge.",
105
- :max_badges => 3,
106
- :test =>
107
- {
108
- :input => {:name => "Lionel Andres Messi", :country => "Argentina"},
109
- :expected_output =>
110
- [{:birthplace => "Rosario, Santa Fe, Argentina",:match_options => {:tolerance => 10, :ignore_case => true }},{:position => "CF",:match_options => {:tolerance => 1 }},{:"current-club" => "Barcelona",:match_options => {:tolerance => 1, :ignore_case => false }}]
111
- }
112
- }
113
- line = CF::Line.new(title, "Digitization")
114
- input_format = CF::InputFormat.new({:name => "image_url", :required => true, :valid_type => "url"})
115
- line.input_formats input_format
116
-
117
- station = CF::Station.new({:type => "work"})
118
- line.stations station
119
-
120
- worker = CF::HumanWorker.new({:number => 1, :reward => 20, :skill_badge => skill_badge})
121
- line.stations.first.worker = worker
122
-
123
- line.stations.first.type.should eql("WorkStation")
124
- line.stations.first.worker.number.should eql(1)
125
- line.stations.first.worker.reward.should eql(20)
126
- line.stations.first.worker.skill_badges.first.should eql([{"title"=>"Football Fanatic", "description"=>"This qualification allows you to perform work at stations which have this badge.", "score"=>nil, "quality_rating"=>nil, "max_badges"=>3, "skill_test"=>{"score_after"=>"submit", "manual_scoring"=>false, "display_answers"=>false, "edit_answers"=>true, "retries"=>0, "pass_percentage"=>100, "test_units"=>[{"input"=>{"name"=>"Lionel Andres Messi", "country"=>"Argentina"}, "expected_output"=>[{"birthplace"=>"Rosario, Santa Fe, Argentina", "match_options"=>{"tolerance"=>"1", "ignore_case"=>"false"}, "position"=>"CF", "current-club"=>"Barcelona"}], "match_options"=>{"tolerance"=>0, "ignore_case"=>false}}]}}])
127
- line.stations.first.worker.stat_badge.should eql({"approval_rating"=>80, "assignment_duration"=>3600, "abandonment_rate"=>30, "country"=>nil})
63
+ line.stations.first.worker.to_s.should eql("{:id => => #{line.stations.first.worker.id}, :number => 1, :reward => 20, :stat_badge => {\"approval_rating\"=>80, \"assignment_duration\"=>3600, \"abandonment_rate\"=>30, \"country\"=>nil}, :errors => }")
128
64
  end
129
65
  end
130
66
  end
@@ -20,7 +20,7 @@ describe CF::Line do
20
20
  line = CF::Line.create(title,"Digitization") do |l|
21
21
  CF::InputFormat.new({:line => l, :name => "image_url", :required => true, :valid_type => "url"})
22
22
  CF::InputFormat.new({:line => l, :name => "image", :required => true, :valid_type => "url"})
23
- CF::Station.new({:line => l, :type => "work"})
23
+ CF::Station.new({:line => l, :type => "work"})
24
24
  end
25
25
  line.title.should eq(title)
26
26
  line.department_name.should eq("Digitization")
@@ -338,7 +338,7 @@ describe CF::Line do
338
338
 
339
339
  run = CF::Run.create(line, "run-#{title}", File.expand_path("../../fixtures/input_data/test.csv", __FILE__))
340
340
  delete = CF::Line.destroy(title)
341
- delete['error']['message'].should eql("Cannot delete line. You have production runs using this line. Pass force option to enforce deletion.")
341
+ delete['error']['message'].should eql("Could not be deleted! Cannot delete line. You have production runs using this line. Pass force option to enforce deletion.")
342
342
  delete['code'].should_not eql(200)
343
343
 
344
344
  forced_delete = CF::Line.destroy(title, :forced => true)
@@ -367,7 +367,7 @@ describe CF::Line do
367
367
  worker_id = line_details['stations'].first['worker']['id']
368
368
  form_field_id = line_details['stations'].first['form_fields'].first['id']
369
369
  station_input_format_id = line_details['stations'].first['input_formats'].first['id']
370
- line_details.should eql({"title"=>"#{title}", "description"=>"", "department"=>"Digitization", "code"=>200, "input_formats"=>[{"id"=>"#{line_input_format_id}", "name"=>"Company", "required"=>true, "valid_type"=>nil}], "stations"=>[{"index"=>1, "type"=>"WorkStation", "worker"=>{"id"=>"#{worker_id}", "number"=>1, "reward"=>20, "type"=>"HumanWorker", "stat_badge"=>{"abandonment_rate"=>30, "approval_rating"=>80, "country"=>nil, "adult"=>nil}, "skill_badge"=>nil}, "form"=>{"title"=>"Enter text from a business card image", "instruction"=>"Describe"}, "form_fields"=>[{"id"=>"#{form_field_id}", "label"=>"First Name", "field_type"=>"short_answer", "hint"=>nil, "required"=>true, "unique"=>nil, "hide_label"=>nil, "value"=>nil}], "input_formats"=>[{"id"=>"#{station_input_format_id}", "name"=>"Company", "required"=>true, "valid_type"=>nil}]}]})
370
+ line_details.should eql({"title"=>"#{title}", "description"=>"", "department"=>"Digitization", "input_formats"=>[{"id"=>"#{line_input_format_id}", "name"=>"Company", "required"=>true, "valid_type"=>nil}], "stations"=>[{"index"=>1, "type"=>"WorkStation", "input_formats"=>[{"id"=>"#{station_input_format_id}", "name"=>"Company", "required"=>true, "valid_type"=>nil}], "worker"=>{"id"=>"#{worker_id}", "number"=>1, "reward"=>20, "type"=>"HumanWorker", "stat_badge"=>{"abandonment_rate"=>30, "approval_rating"=>80, "country"=>nil, "adult"=>nil}}, "form"=>{"title"=>"Enter text from a business card image", "instruction"=>"Describe"}, "form_fields"=>[{"id"=>"#{form_field_id}", "label"=>"First Name", "field_type"=>"short_answer", "hint"=>nil, "required"=>true, "unique"=>nil, "hide_label"=>nil, "value"=>nil, "option_values"=>nil}]}], "code"=>200})
371
371
  end
372
372
 
373
373
  it "for robot worker" do
@@ -376,7 +376,7 @@ describe CF::Line do
376
376
  sleep 1
377
377
  line = CF::Line.create(title,"Digitization") do |l|
378
378
  CF::InputFormat.new({:line => l, :name => "text", :required => "true"})
379
- CF::Station.create({:line => l, :type => "work"}) do |s|
379
+ CF::Station.create({:line => l, :type => "robot"}) do |s|
380
380
  CF::RobotWorker.create({:station => s, :type => "entity_extraction_robot", :settings => {:document => ["Franz Kafka and George Orwell are authors. Ludwig Von Beethoven and Mozart are musicians. China and Japan are countries"]}})
381
381
  end
382
382
  end
@@ -384,40 +384,7 @@ describe CF::Line do
384
384
  line_input_format_id = line_details['input_formats'].first['id']
385
385
  station_input_format_id = line_details['stations'].first['input_formats'].first['id']
386
386
  worker_id = line_details['stations'].first['worker']['id']
387
- line_details.should eql({"title"=>"#{title}", "description"=>"", "department"=>"Digitization", "code"=>200, "input_formats"=>[{"id"=>"#{line_input_format_id}", "name"=>"text", "required"=>true, "valid_type"=>nil}], "stations"=>[{"index"=>1, "type"=>"WorkStation", "worker"=>{"id"=>"#{worker_id}", "number"=>1, "reward"=>0.5, "type"=>"EntityExtractionRobot"}, "input_formats"=>[{"id"=>"#{station_input_format_id}", "name"=>"text", "required"=>true, "valid_type"=>nil}]}]})
388
- end
389
-
390
- it "with skill test feature" do
391
- WebMock.allow_net_connect!
392
- badge =
393
- {
394
- :title => 'Football Fanatic',
395
- :description => "This qualification allows you to perform work at stations which have this badge.",
396
- :max_badges => 3,
397
- :test =>
398
- {
399
- :input => {:name => "Lionel Andres Messi", :country => "Argentina"},
400
- :expected_output =>
401
- [{:birthplace => "Rosario, Santa Fe, Argentina",:match_options => {:tolerance => 10, :ignore_case => true }},{:position => "CF",:match_options => {:tolerance => 1 }},{:"current-club" => "Barcelona",:match_options => {:tolerance => 1, :ignore_case => false }}]
402
- }
403
- }
404
- title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
405
- sleep 2
406
- line = CF::Line.create(title, "Digitization") do |l|
407
- CF::InputFormat.new({:line => l, :name => "image_url", :required => true, :valid_type => "url"})
408
- CF::Station.create({:line =>l, :type => "work"}) do |s|
409
- CF::HumanWorker.new({:station => s, :number => 1, :reward => 20, :skill_badge => badge})
410
- CF::TaskForm.create({:station => s, :title => "Enter text from a business card image", :instruction => "Describe"}) do |i|
411
- CF::FormField.new({:form => i, :label => "First Name", :field_type => "short_answer", :required => "true"})
412
- end
413
- end
414
- end
415
- line_details = CF::Line.inspect(title)
416
- line_input_format_id = line_details['input_formats'].first['id']
417
- station_input_format_id = line_details['stations'].first['input_formats'].first['id']
418
- form_field_id = line_details['stations'].first['form_fields'].first['id']
419
- worker_id = line_details['stations'].first['worker']['id']
420
- line_details.should eql({"title"=>"#{title}", "description"=>"", "department"=>"Digitization", "code"=>200, "input_formats"=>[{"id"=>"#{line_input_format_id}", "name"=>"image_url", "required"=>true, "valid_type"=>"url"}], "stations"=>[{"index"=>1, "type"=>"WorkStation", "worker"=>{"id"=>"#{worker_id}", "number"=>1, "reward"=>20, "type"=>"HumanWorker", "stat_badge"=>{"abandonment_rate"=>30, "approval_rating"=>80, "country"=>nil, "adult"=>nil}, "skill_badge"=>nil}, "form"=>{"title"=>"Enter text from a business card image", "instruction"=>"Describe"}, "form_fields"=>[{"id"=>"#{form_field_id}", "label"=>"First Name", "field_type"=>"short_answer", "hint"=>nil, "required"=>true, "unique"=>nil, "hide_label"=>nil, "value"=>nil}], "input_formats"=>[{"id"=>"#{station_input_format_id}", "name"=>"image_url", "required"=>true, "valid_type"=>"url"}]}]})
387
+ line_details.should eql({"title"=>"#{title}", "description"=>"", "department"=>"Digitization", "code"=>200, "input_formats"=>[{"id"=>"#{line_input_format_id}", "name"=>"text", "required"=>true, "valid_type"=>nil}], "stations"=>[{"index"=>1, "type"=>"RobotStation", "worker"=>{"id"=>"#{worker_id}", "number"=>1, "reward"=>0.5, "type"=>"EntityExtractionRobot"}, "input_formats"=>[{"id"=>"#{station_input_format_id}", "name"=>"text", "required"=>true, "valid_type"=>nil}]}]})
421
388
  end
422
389
 
423
390
  it "should get all lines with pagination" do
@@ -443,7 +410,7 @@ describe CF::Line do
443
410
  it "as public line" do
444
411
  WebMock.allow_net_connect!
445
412
  CF.configure do |config|
446
- config.api_key = "dbe4c090ed1fc936f6b90ac83f09eceee04fc8bc"
413
+ config.api_key = "2512bb347f0cfa42c3ce24947d820a5d82d445a7"
447
414
  config.account_name = "hero"
448
415
  end
449
416
  title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
@@ -8,7 +8,7 @@ describe CF::RobotWorker do
8
8
  sleep 1
9
9
  line = CF::Line.create(title,"Digitization") do |l|
10
10
  CF::InputFormat.new({:line => l, :name => "text", :required => "true"})
11
- CF::Station.create({:line => l, :type => "work"}) do |s|
11
+ CF::Station.create({:line => l, :type => "robot"}) do |s|
12
12
  CF::RobotWorker.create({:station => s, :type => "entity_extraction_robot", :settings => {:document => ["Franz Kafka and George Orwell are authors. Ludwig Von Beethoven and Mozart are musicians. China and Japan are countries"]}})
13
13
  end
14
14
  end
@@ -255,7 +255,7 @@ module CF
255
255
  found_run['title'].should eql("run-#{title}")
256
256
  found_run['line']['title'].should eql(title)
257
257
  found_run['line']['department'].should eql("Digitization")
258
- found_run['status'].should eql("paused")
258
+ found_run['status'].should eql("active")
259
259
  end
260
260
 
261
261
  it "should create production run and try to find run with unused title" do
@@ -302,31 +302,33 @@ module CF
302
302
  end
303
303
  end
304
304
  run = CF::Run.create(line, "run-#{title}", [{"url"=> "http://www.sprout-technology.com"}])
305
+ sleep 10
305
306
  progress = run.progress_details
306
307
  progress_1 = CF::Run.progress_details("run-#{title}")
307
308
  progress.should eql(progress_1)
308
- progress['total']['progress'].should eql(0)
309
- progress['total']['units_count'].should eql(1)
309
+ progress['completed_units'].should eql(1)
310
+ progress['total_units'].should eql(1)
310
311
  end
311
312
 
312
313
  it "should get the progress details for multiple stations" do
313
314
  WebMock.allow_net_connect!
314
315
  title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
315
- sleep 1
316
+ sleep 2
316
317
  line = CF::Line.create(title,"Digitization") do |l|
317
318
  CF::InputFormat.new({:line => l, :name => "url", :valid_type => "url", :required => "true"})
318
319
  CF::Station.create({:line => l, :type => "robot"}) do |s|
319
320
  CF::RobotWorker.create({:station => s, :type => "text_extraction_robot", :settings => {:url => ["{{url}}"]}})
320
321
  end
321
- CF::Station.create({:line => l, :type => "work"}) do |s1|
322
+ CF::Station.create({:line => l, :type => "robot"}) do |s1|
322
323
  CF::RobotWorker.create({:station => s1, :type => "keyword_matching_robot", :settings => {:content => ["{{contents_of_url}}"], :keywords => ["SaaS","see","additional","deepak","saroj"]}})
323
324
  end
324
325
  end
325
326
  run = CF::Run.create(line, "run-#{title}", [{"url"=> "http://techcrunch.com/2011/07/26/with-v2-0-assistly-brings-a-simple-pricing-model-rewards-and-a-bit-of-free-to-customer-service-software"}])
327
+ sleep 5
326
328
  progress = run.progress_details
327
329
  progress_1 = CF::Run.progress_details("run-#{title}")
328
330
  progress.should eql(progress_1)
329
- progress['total']['units_count'].should eql(1)
331
+ progress['total_units'].should eql(1)
330
332
  end
331
333
  end
332
334
 
@@ -358,7 +360,7 @@ module CF
358
360
  run_2 = CF::Run.create(line_2, "run-#{title}_2", [{"url"=> "http://www.sprout-technology.com"}])
359
361
  got_run = CF::Run.all
360
362
  got_run['runs'].class.should eql(Array)
361
- got_run['runs'].first['status'].should eql("active")
363
+ got_run['runs'].first['status'].should eql("completed")
362
364
  end
363
365
 
364
366
  it "should return all the runs for a line" do
@@ -0,0 +1,45 @@
1
+ require 'spec_helper'
2
+
3
+ module CF
4
+ describe CF::HumanWorker do
5
+ context "create badge" do
6
+ it "should create stat badge for worker in block DSL way" do
7
+ WebMock.allow_net_connect!
8
+ stat_badge = {:approval_rating => 40, :assignment_duration => 1800}
9
+ title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
10
+ sleep 1
11
+ line = CF::Line.create(title, "Digitization") do |l|
12
+ CF::InputFormat.new({:line => l, :name => "image_url", :required => true, :valid_type => "url"})
13
+ CF::Station.create({:line =>l, :type => "work"}) do |s|
14
+ CF::HumanWorker.new({:station => s, :number => 1, :reward => 20, :stat_badge => stat_badge})
15
+ end
16
+ end
17
+ line.stations.first.type.should eql("WorkStation")
18
+ line.stations.first.worker.number.should eql(1)
19
+ line.stations.first.worker.reward.should eql(20)
20
+ line.stations.first.worker.stat_badge.should eql({"approval_rating"=>40, "assignment_duration"=>1800, "abandonment_rate"=>30, "country"=>nil})
21
+ end
22
+
23
+ it "should create stat badge for worker in plain ruby way" do
24
+ WebMock.allow_net_connect!
25
+ stat_badge = {:approval_rating => 40, :assignment_duration => 1800}
26
+ title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
27
+ sleep 1
28
+ line = CF::Line.new(title, "Digitization")
29
+ input_format = CF::InputFormat.new({:name => "image_url", :required => true, :valid_type => "url"})
30
+ line.input_formats input_format
31
+
32
+ station = CF::Station.new({:type => "work"})
33
+ line.stations station
34
+
35
+ worker = CF::HumanWorker.new({:number => 1, :reward => 20, :stat_badge => stat_badge})
36
+ line.stations.first.worker = worker
37
+
38
+ line.stations.first.type.should eql("WorkStation")
39
+ line.stations.first.worker.number.should eql(1)
40
+ line.stations.first.worker.reward.should eql(20)
41
+ line.stations.first.worker.stat_badge.should eql({"approval_rating"=>40, "assignment_duration"=>1800, "abandonment_rate"=>30, "country"=>nil})
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,105 @@
1
+ require 'spec_helper'
2
+
3
+ describe CF::TestRun do
4
+ context "create a production test run" do
5
+ it "should create a test production in a plain ruby way" do
6
+ WebMock.allow_net_connect!
7
+ title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
8
+ sleep 1
9
+ line = CF::Line.new(title, "Digitization")
10
+ input_format_1 = CF::InputFormat.new({:name => "Company", :required => true})
11
+ input_format_2 = CF::InputFormat.new({:name => "Website", :required => true, :valid_type => "url"})
12
+ line.input_formats input_format_1
13
+ line.input_formats input_format_2
14
+
15
+ station = CF::Station.new({:type => "work"})
16
+ line.stations station
17
+
18
+ worker = CF::HumanWorker.new({:number => 1, :reward => 20})
19
+ line.stations.first.worker = worker
20
+
21
+ form = CF::TaskForm.new({:title => "Enter text from a business card image", :instruction => "Describe"})
22
+ line.stations.first.form = form
23
+
24
+ form_fields_1 = CF::FormField.new({:label => "First Name", :field_type => "short_answer", :required => "true"})
25
+ line.stations.first.form.form_fields form_fields_1
26
+ form_fields_2 = CF::FormField.new({:label => "Middle Name", :field_type => "short_answer"})
27
+ line.stations.first.form.form_fields form_fields_2
28
+ form_fields_3 = CF::FormField.new({:label => "Last Name", :field_type => "short_answer", :required => "true"})
29
+ line.stations.first.form.form_fields form_fields_3
30
+
31
+ gold_standard = CF::GoldStandard.new({ :line => line,
32
+ :name => "gold_standard_#{Time.new.strftime('%Y%b%d-%H%M%S')}",
33
+ :input => {'image_url' => "http://onwired.com/images/portfolio/linda-stanley-business-card.jpg"},
34
+ :expected_output => {"first_name" => {"value" => "John"}, "last_name" => {"value" => "Lennon"}, "company" => {"value" => "Sprout"}}
35
+ })
36
+ run = CF::TestRun.create(line, "run-#{title}", 1)
37
+ run.line.should eql(line)
38
+ sleep 4
39
+ CF::Run.find(run.title)["progress"].should eq({"completed_units"=>0, "total_units"=>1})
40
+
41
+ end
42
+ it "should create a test production in a block DSL way" do
43
+ WebMock.allow_net_connect!
44
+ title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
45
+ sleep 1
46
+ line = CF::Line.create(title,"Digitization") do |l|
47
+ CF::InputFormat.new({:line => l, :name => "Company", :required => true, :valid_type => "general"})
48
+ CF::InputFormat.new({:line => l, :name => "Website", :required => true, :valid_type => "url"})
49
+ CF::Station.create({:line => l, :type => "work"}) do |s|
50
+ CF::HumanWorker.new({:station => s, :number => 1, :reward => 10})
51
+ CF::TaskForm.create({:station => s, :title => "Enter text from a business card image", :instruction => "Describe"}) do |i|
52
+ CF::FormField.new({:form => i, :label => "First Name", :field_type => "short_answer", :required => "true"})
53
+ CF::FormField.new({:form => i, :label => "Middle Name", :field_type => "short_answer"})
54
+ CF::FormField.new({:form => i, :label => "Last Name", :field_type => "short_answer", :required => "true"})
55
+ end
56
+ end
57
+ end
58
+ gold_standard = CF::GoldStandard.new({ :line => line,
59
+ :name => "gold_standard_#{Time.new.strftime('%Y%b%d-%H%M%S')}",
60
+ :input => {'image_url' => "http://onwired.com/images/portfolio/linda-stanley-business-card.jpg"},
61
+ :expected_output => {"first_name" => {"value" => "John"}, "last_name" => {"value" => "Lennon"}, "company" => {"value" => "Sprout"}}
62
+ })
63
+ run = CF::TestRun.new(line, "run-#{title}", 1)
64
+ run.line.should eql(line)
65
+ sleep 4
66
+ CF::Run.find(run.title)["progress"].should eq({"completed_units"=>0, "total_units"=>1})
67
+ end
68
+
69
+ it "should rais error if goldstandard number is not valid" do
70
+ WebMock.allow_net_connect!
71
+ title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
72
+ sleep 1
73
+ line = CF::Line.new(title, "Digitization")
74
+ input_format_1 = CF::InputFormat.new({:name => "Company", :required => true})
75
+ input_format_2 = CF::InputFormat.new({:name => "Website", :required => true, :valid_type => "url"})
76
+ line.input_formats input_format_1
77
+ line.input_formats input_format_2
78
+
79
+ station = CF::Station.new({:type => "work"})
80
+ line.stations station
81
+
82
+ worker = CF::HumanWorker.new({:number => 1, :reward => 20})
83
+ line.stations.first.worker = worker
84
+
85
+ form = CF::TaskForm.new({:title => "Enter text from a business card image", :instruction => "Describe"})
86
+ line.stations.first.form = form
87
+
88
+ form_fields_1 = CF::FormField.new({:label => "First Name", :field_type => "short_answer", :required => "true"})
89
+ line.stations.first.form.form_fields form_fields_1
90
+ form_fields_2 = CF::FormField.new({:label => "Middle Name", :field_type => "short_answer"})
91
+ line.stations.first.form.form_fields form_fields_2
92
+ form_fields_3 = CF::FormField.new({:label => "Last Name", :field_type => "short_answer", :required => "true"})
93
+ line.stations.first.form.form_fields form_fields_3
94
+
95
+ gold_standard = CF::GoldStandard.create({ :line => line,
96
+ :name => "gold_standard_#{Time.new.strftime('%Y%b%d-%H%M%S')}",
97
+ :input => {'image_url' => "http://onwired.com/images/portfolio/linda-stanley-business-card.jpg"},
98
+ :expected_output => {"first_name" => {"value" => "John"}, "last_name" => {"value" => "Lennon"}, "company" => {"value" => "Sprout"}}
99
+ })
100
+ run = CF::TestRun.new(line, "run-#{title}", 4)
101
+ run.errors.should eql(["Error Only 1 gold standard available"])
102
+ end
103
+
104
+ end
105
+ end
metadata CHANGED
@@ -1,288 +1,291 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: cloudfactory
3
- version: !ruby/object:Gem::Version
4
- version: 0.4.4
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.4.5
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - CloudFactory.com
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-21 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+
13
+ date: 2012-02-01 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
15
16
  name: i18n
16
- requirement: &2154498580 !ruby/object:Gem::Requirement
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
17
19
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
22
24
  type: :runtime
23
- prerelease: false
24
- version_requirements: *2154498580
25
- - !ruby/object:Gem::Dependency
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
26
27
  name: activesupport
27
- requirement: &2154498080 !ruby/object:Gem::Requirement
28
+ prerelease: false
29
+ requirement: &id002 !ruby/object:Gem::Requirement
28
30
  none: false
29
- requirements:
31
+ requirements:
30
32
  - - ~>
31
- - !ruby/object:Gem::Version
32
- version: '3.0'
33
+ - !ruby/object:Gem::Version
34
+ version: "3.0"
33
35
  type: :runtime
34
- prerelease: false
35
- version_requirements: *2154498080
36
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
37
38
  name: hashie
38
- requirement: &2154497580 !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id003 !ruby/object:Gem::Requirement
39
41
  none: false
40
- requirements:
42
+ requirements:
41
43
  - - ~>
42
- - !ruby/object:Gem::Version
43
- version: '1.0'
44
+ - !ruby/object:Gem::Version
45
+ version: "1.0"
44
46
  type: :runtime
45
- prerelease: false
46
- version_requirements: *2154497580
47
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
48
49
  name: rest-client
49
- requirement: &2154497200 !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id004 !ruby/object:Gem::Requirement
50
52
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
55
57
  type: :runtime
56
- prerelease: false
57
- version_requirements: *2154497200
58
- - !ruby/object:Gem::Dependency
58
+ version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
59
60
  name: json
60
- requirement: &2154496740 !ruby/object:Gem::Requirement
61
+ prerelease: false
62
+ requirement: &id005 !ruby/object:Gem::Requirement
61
63
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: "0"
66
68
  type: :runtime
67
- prerelease: false
68
- version_requirements: *2154496740
69
- - !ruby/object:Gem::Dependency
69
+ version_requirements: *id005
70
+ - !ruby/object:Gem::Dependency
70
71
  name: thor
71
- requirement: &2154496240 !ruby/object:Gem::Requirement
72
+ prerelease: false
73
+ requirement: &id006 !ruby/object:Gem::Requirement
72
74
  none: false
73
- requirements:
75
+ requirements:
74
76
  - - ~>
75
- - !ruby/object:Gem::Version
76
- version: '0.14'
77
+ - !ruby/object:Gem::Version
78
+ version: "0.14"
77
79
  type: :runtime
78
- prerelease: false
79
- version_requirements: *2154496240
80
- - !ruby/object:Gem::Dependency
80
+ version_requirements: *id006
81
+ - !ruby/object:Gem::Dependency
81
82
  name: highline
82
- requirement: &2154495820 !ruby/object:Gem::Requirement
83
+ prerelease: false
84
+ requirement: &id007 !ruby/object:Gem::Requirement
83
85
  none: false
84
- requirements:
85
- - - ! '>='
86
- - !ruby/object:Gem::Version
87
- version: '0'
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: "0"
88
90
  type: :runtime
89
- prerelease: false
90
- version_requirements: *2154495820
91
- - !ruby/object:Gem::Dependency
91
+ version_requirements: *id007
92
+ - !ruby/object:Gem::Dependency
92
93
  name: httparty
93
- requirement: &2154495280 !ruby/object:Gem::Requirement
94
+ prerelease: false
95
+ requirement: &id008 !ruby/object:Gem::Requirement
94
96
  none: false
95
- requirements:
97
+ requirements:
96
98
  - - ~>
97
- - !ruby/object:Gem::Version
98
- version: '0.7'
99
+ - !ruby/object:Gem::Version
100
+ version: "0.7"
99
101
  type: :runtime
100
- prerelease: false
101
- version_requirements: *2154495280
102
- - !ruby/object:Gem::Dependency
102
+ version_requirements: *id008
103
+ - !ruby/object:Gem::Dependency
103
104
  name: terminal-table
104
- requirement: &2154494780 !ruby/object:Gem::Requirement
105
+ prerelease: false
106
+ requirement: &id009 !ruby/object:Gem::Requirement
105
107
  none: false
106
- requirements:
108
+ requirements:
107
109
  - - ~>
108
- - !ruby/object:Gem::Version
109
- version: '1.4'
110
+ - !ruby/object:Gem::Version
111
+ version: "1.4"
110
112
  type: :runtime
111
- prerelease: false
112
- version_requirements: *2154494780
113
- - !ruby/object:Gem::Dependency
113
+ version_requirements: *id009
114
+ - !ruby/object:Gem::Dependency
114
115
  name: millisami-csv-hash
115
- requirement: &2154494400 !ruby/object:Gem::Requirement
116
+ prerelease: false
117
+ requirement: &id010 !ruby/object:Gem::Requirement
116
118
  none: false
117
- requirements:
118
- - - ! '>='
119
- - !ruby/object:Gem::Version
120
- version: '0'
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: "0"
121
123
  type: :runtime
122
- prerelease: false
123
- version_requirements: *2154494400
124
- - !ruby/object:Gem::Dependency
124
+ version_requirements: *id010
125
+ - !ruby/object:Gem::Dependency
125
126
  name: awesome_print
126
- requirement: &2154493940 !ruby/object:Gem::Requirement
127
+ prerelease: false
128
+ requirement: &id011 !ruby/object:Gem::Requirement
127
129
  none: false
128
- requirements:
129
- - - ! '>='
130
- - !ruby/object:Gem::Version
131
- version: '0'
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: "0"
132
134
  type: :runtime
133
- prerelease: false
134
- version_requirements: *2154493940
135
- - !ruby/object:Gem::Dependency
135
+ version_requirements: *id011
136
+ - !ruby/object:Gem::Dependency
136
137
  name: ruby-debug19
137
- requirement: &2154493520 !ruby/object:Gem::Requirement
138
+ prerelease: false
139
+ requirement: &id012 !ruby/object:Gem::Requirement
138
140
  none: false
139
- requirements:
140
- - - ! '>='
141
- - !ruby/object:Gem::Version
142
- version: '0'
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: "0"
143
145
  type: :development
144
- prerelease: false
145
- version_requirements: *2154493520
146
- - !ruby/object:Gem::Dependency
146
+ version_requirements: *id012
147
+ - !ruby/object:Gem::Dependency
147
148
  name: ruby-debug19
148
- requirement: &2154493100 !ruby/object:Gem::Requirement
149
+ prerelease: false
150
+ requirement: &id013 !ruby/object:Gem::Requirement
149
151
  none: false
150
- requirements:
151
- - - ! '>='
152
- - !ruby/object:Gem::Version
153
- version: '0'
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ version: "0"
154
156
  type: :development
155
- prerelease: false
156
- version_requirements: *2154493100
157
- - !ruby/object:Gem::Dependency
157
+ version_requirements: *id013
158
+ - !ruby/object:Gem::Dependency
158
159
  name: aruba
159
- requirement: &2154492680 !ruby/object:Gem::Requirement
160
+ prerelease: false
161
+ requirement: &id014 !ruby/object:Gem::Requirement
160
162
  none: false
161
- requirements:
162
- - - ! '>='
163
- - !ruby/object:Gem::Version
164
- version: '0'
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: "0"
165
167
  type: :development
166
- prerelease: false
167
- version_requirements: *2154492680
168
- - !ruby/object:Gem::Dependency
168
+ version_requirements: *id014
169
+ - !ruby/object:Gem::Dependency
169
170
  name: rails
170
- requirement: &2154492180 !ruby/object:Gem::Requirement
171
+ prerelease: false
172
+ requirement: &id015 !ruby/object:Gem::Requirement
171
173
  none: false
172
- requirements:
174
+ requirements:
173
175
  - - ~>
174
- - !ruby/object:Gem::Version
176
+ - !ruby/object:Gem::Version
175
177
  version: 3.0.3
176
178
  type: :development
177
- prerelease: false
178
- version_requirements: *2154492180
179
- - !ruby/object:Gem::Dependency
179
+ version_requirements: *id015
180
+ - !ruby/object:Gem::Dependency
180
181
  name: bundler
181
- requirement: &2154491680 !ruby/object:Gem::Requirement
182
+ prerelease: false
183
+ requirement: &id016 !ruby/object:Gem::Requirement
182
184
  none: false
183
- requirements:
185
+ requirements:
184
186
  - - ~>
185
- - !ruby/object:Gem::Version
187
+ - !ruby/object:Gem::Version
186
188
  version: 1.0.0
187
189
  type: :development
188
- prerelease: false
189
- version_requirements: *2154491680
190
- - !ruby/object:Gem::Dependency
190
+ version_requirements: *id016
191
+ - !ruby/object:Gem::Dependency
191
192
  name: generator_spec
192
- requirement: &2154410060 !ruby/object:Gem::Requirement
193
+ prerelease: false
194
+ requirement: &id017 !ruby/object:Gem::Requirement
193
195
  none: false
194
- requirements:
196
+ requirements:
195
197
  - - ~>
196
- - !ruby/object:Gem::Version
198
+ - !ruby/object:Gem::Version
197
199
  version: 0.8.3
198
200
  type: :development
199
- prerelease: false
200
- version_requirements: *2154410060
201
- - !ruby/object:Gem::Dependency
201
+ version_requirements: *id017
202
+ - !ruby/object:Gem::Dependency
202
203
  name: rspec-rails
203
- requirement: &2154409680 !ruby/object:Gem::Requirement
204
+ prerelease: false
205
+ requirement: &id018 !ruby/object:Gem::Requirement
204
206
  none: false
205
- requirements:
206
- - - ! '>='
207
- - !ruby/object:Gem::Version
208
- version: '0'
207
+ requirements:
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: "0"
209
211
  type: :development
210
- prerelease: false
211
- version_requirements: *2154409680
212
- - !ruby/object:Gem::Dependency
212
+ version_requirements: *id018
213
+ - !ruby/object:Gem::Dependency
213
214
  name: cucumber
214
- requirement: &2154409220 !ruby/object:Gem::Requirement
215
+ prerelease: false
216
+ requirement: &id019 !ruby/object:Gem::Requirement
215
217
  none: false
216
- requirements:
217
- - - ! '>='
218
- - !ruby/object:Gem::Version
219
- version: '0'
218
+ requirements:
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ version: "0"
220
222
  type: :development
221
- prerelease: false
222
- version_requirements: *2154409220
223
- - !ruby/object:Gem::Dependency
223
+ version_requirements: *id019
224
+ - !ruby/object:Gem::Dependency
224
225
  name: rdoc
225
- requirement: &2154408720 !ruby/object:Gem::Requirement
226
+ prerelease: false
227
+ requirement: &id020 !ruby/object:Gem::Requirement
226
228
  none: false
227
- requirements:
229
+ requirements:
228
230
  - - ~>
229
- - !ruby/object:Gem::Version
231
+ - !ruby/object:Gem::Version
230
232
  version: 3.5.3
231
233
  type: :development
232
- prerelease: false
233
- version_requirements: *2154408720
234
- - !ruby/object:Gem::Dependency
234
+ version_requirements: *id020
235
+ - !ruby/object:Gem::Dependency
235
236
  name: vcr
236
- requirement: &2154408300 !ruby/object:Gem::Requirement
237
+ prerelease: false
238
+ requirement: &id021 !ruby/object:Gem::Requirement
237
239
  none: false
238
- requirements:
239
- - - ! '>='
240
- - !ruby/object:Gem::Version
241
- version: '0'
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: "0"
242
244
  type: :development
243
- prerelease: false
244
- version_requirements: *2154408300
245
- - !ruby/object:Gem::Dependency
245
+ version_requirements: *id021
246
+ - !ruby/object:Gem::Dependency
246
247
  name: rake
247
- requirement: &2154407840 !ruby/object:Gem::Requirement
248
+ prerelease: false
249
+ requirement: &id022 !ruby/object:Gem::Requirement
248
250
  none: false
249
- requirements:
250
- - - ! '>='
251
- - !ruby/object:Gem::Version
252
- version: '0'
251
+ requirements:
252
+ - - ">="
253
+ - !ruby/object:Gem::Version
254
+ version: "0"
253
255
  type: :development
254
- prerelease: false
255
- version_requirements: *2154407840
256
- - !ruby/object:Gem::Dependency
256
+ version_requirements: *id022
257
+ - !ruby/object:Gem::Dependency
257
258
  name: webmock
258
- requirement: &2154407420 !ruby/object:Gem::Requirement
259
+ prerelease: false
260
+ requirement: &id023 !ruby/object:Gem::Requirement
259
261
  none: false
260
- requirements:
261
- - - ! '>='
262
- - !ruby/object:Gem::Version
263
- version: '0'
262
+ requirements:
263
+ - - ">="
264
+ - !ruby/object:Gem::Version
265
+ version: "0"
264
266
  type: :development
265
- prerelease: false
266
- version_requirements: *2154407420
267
- - !ruby/object:Gem::Dependency
267
+ version_requirements: *id023
268
+ - !ruby/object:Gem::Dependency
268
269
  name: timecop
269
- requirement: &2154407000 !ruby/object:Gem::Requirement
270
+ prerelease: false
271
+ requirement: &id024 !ruby/object:Gem::Requirement
270
272
  none: false
271
- requirements:
272
- - - ! '>='
273
- - !ruby/object:Gem::Version
274
- version: '0'
273
+ requirements:
274
+ - - ">="
275
+ - !ruby/object:Gem::Version
276
+ version: "0"
275
277
  type: :development
276
- prerelease: false
277
- version_requirements: *2154407000
278
+ version_requirements: *id024
278
279
  description: A Ruby wrapper and CLI for to interact with Cloudfactory.com REST API
279
- email:
280
+ email:
280
281
  - administrator@sprout-technology.com
281
- executables:
282
+ executables:
282
283
  - cf
283
284
  extensions: []
285
+
284
286
  extra_rdoc_files: []
285
- files:
287
+
288
+ files:
286
289
  - .gitignore
287
290
  - .rspec
288
291
  - CHANGELOG.md
@@ -314,6 +317,7 @@ files:
314
317
  - fixtures/input_data/test.csv
315
318
  - lib/cf.rb
316
319
  - lib/cf/account.rb
320
+ - lib/cf/badge.rb
317
321
  - lib/cf/cli.rb
318
322
  - lib/cf/cli/config.rb
319
323
  - lib/cf/cli/form.rb
@@ -329,6 +333,8 @@ files:
329
333
  - lib/cf/custom_task_form.rb
330
334
  - lib/cf/department.rb
331
335
  - lib/cf/form_field.rb
336
+ - lib/cf/gold_standard.rb
337
+ - lib/cf/help.txt
332
338
  - lib/cf/human_worker.rb
333
339
  - lib/cf/input_format.rb
334
340
  - lib/cf/line.rb
@@ -337,6 +343,7 @@ files:
337
343
  - lib/cf/run.rb
338
344
  - lib/cf/station.rb
339
345
  - lib/cf/task_form.rb
346
+ - lib/cf/test_run.rb
340
347
  - lib/cf/version.rb
341
348
  - lib/generators/cf/form/form_generator.rb
342
349
  - lib/generators/cf/form/templates/cf_form.html.erb
@@ -344,7 +351,8 @@ files:
344
351
  - lib/generators/cf/install/templates/README
345
352
  - lib/generators/cf/install/templates/cloudfactory.rb
346
353
  - spec/account_spec.rb
347
- - spec/badge_spec.rb
354
+ - spec/badges/station_1.html
355
+ - spec/badges_spec.rb
348
356
  - spec/concept_tagging_robot_spec.rb
349
357
  - spec/config_spec.rb
350
358
  - spec/content_scraping_robot_spec.rb
@@ -354,6 +362,8 @@ files:
354
362
  - spec/form_field_spec.rb
355
363
  - spec/generators/form_generator_spec.rb
356
364
  - spec/generators/install_generator_spec.rb
365
+ - spec/gold_standard_spec.rb
366
+ - spec/gold_standards.csv
357
367
  - spec/google_translate_robot_spec.rb
358
368
  - spec/human_worker_spec.rb
359
369
  - spec/image_processing_robot_spec.rb
@@ -367,49 +377,80 @@ files:
367
377
  - spec/run_spec.rb
368
378
  - spec/sentiment_robot_spec.rb
369
379
  - spec/spec_helper.rb
380
+ - spec/stat_badge_spec.rb
370
381
  - spec/station_spec.rb
371
382
  - spec/task_form_spec.rb
372
383
  - spec/term_extraction_robot_spec.rb
384
+ - spec/test_run_spec.rb
373
385
  - spec/text_appending_robot_spec.rb
374
386
  homepage: http://cloudfactory.com
375
387
  licenses: []
376
- post_install_message: ! "--------------------------------------------------------------------------------\n\n
377
- \ Sweet. You now have the 'cf' command installed. Test drive it with:\n > cf help\n\n
378
- \ 1. Sign up for your CloudFactory account and get your API key\n http://cloudfactory.com/users/sign_up\n
379
- \ Get API key from welcome email or http://cloudfactory.com/account#settings\n\n
380
- \ 2. Login with your credentials\n > cf login\n \n 3. Generate your first assembly
381
- line...\n > cf line generate <line-title>\n \n 4. Go into generated line directory\n
382
- \ > cd <line-title>\n \n 5. Edit the generated line.yml to design your perfect
383
- assembly line\n See http://developers.cloudfactory.com/lines/yaml.html\n \n 6.
384
- Create your line in CloudFactory\n > cf line create\n\n 7. Do a test production
385
- run in the sandbox first...\n > cf production start TITLE -i=INPUT_DATA.CSV\n\n
386
- \ 8. Go live! Send your production run to real workers...\n > cf production start
387
- TITLE -i=INPUT_DATA.CSV --live\n \n ------------------------------------------------------------------------------\n
388
- \n Follow @thecloudfactory on Twitter for announcements, updates, and news.\n https://twitter.com/thecloudfactory\n\n
389
- \ Add your project or organization to the apps wiki!\n https://github.com/sprout/cloudfactory_ruby/wiki/Apps\n
390
- \ \n--------------------------------------------------------------------------------\n"
388
+
389
+ post_install_message: |
390
+ --------------------------------------------------------------------------------
391
+
392
+ Sweet. You now have the 'cf' command installed. Test drive it with:
393
+ > cf help
394
+
395
+ 1. Sign up for your CloudFactory account and get your API key
396
+ http://cloudfactory.com/users/sign_up
397
+ Get API key from welcome email or http://cloudfactory.com/account#settings
398
+
399
+ 2. Login with your credentials
400
+ > cf login
401
+
402
+ 3. Generate your first assembly line...
403
+ > cf line generate <line-title>
404
+
405
+ 4. Go into generated line directory
406
+ > cd <line-title>
407
+
408
+ 5. Edit the generated line.yml to design your perfect assembly line
409
+ See http://developers.cloudfactory.com/lines/yaml.html
410
+
411
+ 6. Create your line in CloudFactory
412
+ > cf line create
413
+
414
+ 7. Do a test production run in the sandbox first...
415
+ > cf production start TITLE -i=INPUT_DATA.CSV
416
+
417
+ 8. Go live! Send your production run to real workers...
418
+ > cf production start TITLE -i=INPUT_DATA.CSV --live
419
+
420
+ ------------------------------------------------------------------------------
421
+
422
+ Follow @thecloudfactory on Twitter for announcements, updates, and news.
423
+ https://twitter.com/thecloudfactory
424
+
425
+ Add your project or organization to the apps wiki!
426
+ https://github.com/sprout/cloudfactory_ruby/wiki/Apps
427
+
428
+ --------------------------------------------------------------------------------
429
+
391
430
  rdoc_options: []
392
- require_paths:
431
+
432
+ require_paths:
393
433
  - lib
394
- required_ruby_version: !ruby/object:Gem::Requirement
434
+ required_ruby_version: !ruby/object:Gem::Requirement
395
435
  none: false
396
- requirements:
397
- - - ! '>='
398
- - !ruby/object:Gem::Version
399
- version: '0'
400
- required_rubygems_version: !ruby/object:Gem::Requirement
436
+ requirements:
437
+ - - ">="
438
+ - !ruby/object:Gem::Version
439
+ version: "0"
440
+ required_rubygems_version: !ruby/object:Gem::Requirement
401
441
  none: false
402
- requirements:
403
- - - ! '>='
404
- - !ruby/object:Gem::Version
405
- version: '0'
442
+ requirements:
443
+ - - ">="
444
+ - !ruby/object:Gem::Version
445
+ version: "0"
406
446
  requirements: []
447
+
407
448
  rubyforge_project: cloudfactory
408
- rubygems_version: 1.8.10
449
+ rubygems_version: 1.8.7
409
450
  signing_key:
410
451
  specification_version: 3
411
452
  summary: A Ruby wrapper and CLI for Cloudfactory.com
412
- test_files:
453
+ test_files:
413
454
  - features/error_custom_task_form.feature
414
455
  - features/error_form_field.feature
415
456
  - features/error_task_form.feature
@@ -428,7 +469,8 @@ test_files:
428
469
  - features/task_form.feature
429
470
  - features/whoami.feature
430
471
  - spec/account_spec.rb
431
- - spec/badge_spec.rb
472
+ - spec/badges/station_1.html
473
+ - spec/badges_spec.rb
432
474
  - spec/concept_tagging_robot_spec.rb
433
475
  - spec/config_spec.rb
434
476
  - spec/content_scraping_robot_spec.rb
@@ -438,6 +480,8 @@ test_files:
438
480
  - spec/form_field_spec.rb
439
481
  - spec/generators/form_generator_spec.rb
440
482
  - spec/generators/install_generator_spec.rb
483
+ - spec/gold_standard_spec.rb
484
+ - spec/gold_standards.csv
441
485
  - spec/google_translate_robot_spec.rb
442
486
  - spec/human_worker_spec.rb
443
487
  - spec/image_processing_robot_spec.rb
@@ -451,8 +495,10 @@ test_files:
451
495
  - spec/run_spec.rb
452
496
  - spec/sentiment_robot_spec.rb
453
497
  - spec/spec_helper.rb
498
+ - spec/stat_badge_spec.rb
454
499
  - spec/station_spec.rb
455
500
  - spec/task_form_spec.rb
456
501
  - spec/term_extraction_robot_spec.rb
502
+ - spec/test_run_spec.rb
457
503
  - spec/text_appending_robot_spec.rb
458
504
  has_rdoc: