cloudfactory 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ describe CF::TaskForm do
8
8
  line = CF::Line.create("Digiti-ard-2", "Digitization") do
9
9
  CF::InputFormat.new({:line => self, :name => "image_url", :required => true, :valid_type => "url"})
10
10
  CF::Station.create({:line => self, :type => "work"}) do |station|
11
- CF::HumanWorker.new({:station => station, :number => 2, :reward => 20})
11
+ CF::HumanWorker.new({:station => station, :number => 1, :reward => 20})
12
12
  CF::TaskForm.create({:station => station, :title => "Enter text from a business card image", :instruction => "Describe"}) do |i|
13
13
  CF::FormField.new({:form => i, :label => "First Name", :field_type => "short_answer", :required => "true"})
14
14
  CF::FormField.new({:form => i, :label => "Middle Name", :field_type => "short_answer"})
@@ -31,7 +31,7 @@ describe CF::TaskForm do
31
31
  line = CF::Line.create("Display_task_form", "Digitization") do
32
32
  CF::InputFormat.new({:line => self, :name => "image_url", :required => true, :valid_type => "url"})
33
33
  CF::Station.create({:line => self, :type => "work"}) do |station|
34
- CF::HumanWorker.new({:station => station, :number => 2, :reward => 20})
34
+ CF::HumanWorker.new({:station => station, :number => 1, :reward => 20})
35
35
  CF::TaskForm.create({:station => station, :title => "Enter text from a business card image", :instruction => "Describe"}) do |i|
36
36
  CF::FormField.new({:form => i, :label => "First Name", :field_type => "short_answer", :required => "true"})
37
37
  CF::FormField.new({:form => i, :label => "Middle Name", :field_type => "short_answer"})
@@ -49,12 +49,12 @@ describe CF::TaskForm do
49
49
  line = CF::Line.create("Digiti-ard-2", "Digitization") do
50
50
  CF::InputFormat.new({:line => self, :name => "image_url", :required => true, :valid_type => "url"})
51
51
  CF::Station.create({:line => self, :type => "work"}) do |station|
52
- CF::HumanWorker.new({:station => station, :number => 2, :reward => 20})
52
+ CF::HumanWorker.new({:station => station, :number => 1, :reward => 20})
53
53
  CF::TaskForm.new({:station => station})
54
54
  end
55
55
  end
56
56
  form = line.stations[0].form
57
- form.errors.should eql("[\"Title can't be blank\", \"Instruction can't be blank\"]")
57
+ form.errors.should eql(["Title can't be blank", "Instruction can't be blank"])
58
58
  form.instruction.should eq(nil)
59
59
  form.form_fields.should eq([])
60
60
  end
@@ -66,12 +66,12 @@ describe CF::TaskForm do
66
66
  line = CF::Line.create("Digiti-ard-21", "Digitization") do
67
67
  CF::InputFormat.new({:line => self, :name => "image_url", :required => true, :valid_type => "url"})
68
68
  CF::Station.create({:line => self, :type => "work"}) do |station|
69
- CF::HumanWorker.new({:station => station, :number => 2, :reward => 20})
69
+ CF::HumanWorker.new({:station => station, :number => 1, :reward => 20})
70
70
  CF::TaskForm.new({:station => station, :instruction => "describe"})
71
71
  end
72
72
  end
73
73
  form = line.stations[0].form
74
- form.errors.should eql("[\"Title can't be blank\"]")
74
+ form.errors.should eql(["Title can't be blank"])
75
75
  form.instruction.should eq("describe")
76
76
  form.form_fields.should eq([])
77
77
  end
@@ -83,12 +83,12 @@ describe CF::TaskForm do
83
83
  line = CF::Line.create("Digiti-ard-22", "Digitization") do
84
84
  CF::InputFormat.new({:line => self, :name => "image_url", :required => true, :valid_type => "url"})
85
85
  CF::Station.create({:line => self, :type => "work"}) do |station|
86
- CF::HumanWorker.new({:station => station, :number => 2, :reward => 20})
86
+ CF::HumanWorker.new({:station => station, :number => 1, :reward => 20})
87
87
  CF::TaskForm.new({:station => station, :title => "title"})
88
88
  end
89
89
  end
90
90
  form = line.stations[0].form
91
- form.errors.should eql("[\"Instruction can't be blank\"]")
91
+ form.errors.should eql(["Instruction can't be blank"])
92
92
  form.title.should eq("title")
93
93
  form.form_fields.should eq([])
94
94
  end
@@ -102,7 +102,7 @@ describe CF::TaskForm do
102
102
  line = CF::Line.create("Digitizerdd", "Digitization") do
103
103
  CF::InputFormat.new({:line => self, :name => "image_url", :required => true, :valid_type => "url"})
104
104
  CF::Station.create({:line => self, :type => "work"}) do |station|
105
- CF::HumanWorker.new({:station => station, :number => 2, :reward => 20})
105
+ CF::HumanWorker.new({:station => station, :number => 1, :reward => 20})
106
106
  CF::TaskForm.create({:station => station, :title => "Enter text from a business card image", :instruction => "Describe"}) do |i|
107
107
  CF::FormField.new({:form => i, :label => "First Name", :field_type => "short_answer", :required => "true"})
108
108
  CF::FormField.new({:form => i, :label => "Middle Name", :field_type => "short_answer"})
@@ -14,9 +14,10 @@ module CF
14
14
  end
15
15
  end
16
16
  run = CF::Run.create(line, "term_extraction_run", [{"url"=> "http://www.sprout-technology.com"}])
17
+ # sleep 20
17
18
  output = run.final_output
18
- output.first['keyword_relevance_of_url'].should eql([99.7991, 95.6566, 83.2383, 79.39450000000001, 76.0281])
19
- output.first['keywords_of_url'].should eql(["Web App", "web application", "Web App Development", "Web App Management", "world-class web development"])
19
+ output.first['keyword_relevance_of_url'].should eql([96.7417, 57.3763, 56.8721, 54.6844, 17.7066])
20
+ output.first['keywords_of_url'].should eql(["tech startup thing", "nights", "Nepal", "Canada", "U.S."])
20
21
  line.stations.first.worker.class.should eql(CF::RobotWorker)
21
22
  line.stations.first.worker.reward.should eql(0.5)
22
23
  line.stations.first.worker.number.should eql(1)
@@ -39,9 +40,10 @@ module CF
39
40
  line.stations.first.worker = worker
40
41
 
41
42
  run = CF::Run.create(line, "term_extraction_run_1", [{"url"=> "http://www.sprout-technology.com"}])
43
+ # sleep 20
42
44
  output = run.final_output
43
- output.first['keyword_relevance_of_url'].should eql([99.7991, 95.6566, 83.2383, 79.39450000000001, 76.0281])
44
- output.first['keywords_of_url'].should eql(["Web App", "web application", "Web App Development", "Web App Management", "world-class web development"])
45
+ output.first['keyword_relevance_of_url'].should eql([96.7417, 57.3763, 56.8721, 54.6844, 17.7066])
46
+ output.first['keywords_of_url'].should eql(["tech startup thing", "nights", "Nepal", "Canada", "U.S."])
45
47
  line.stations.first.worker.class.should eql(CF::RobotWorker)
46
48
  line.stations.first.worker.reward.should eql(0.5)
47
49
  line.stations.first.worker.number.should eql(1)
@@ -14,7 +14,7 @@ module CF
14
14
  <input type="submit" /></form>'
15
15
 
16
16
  line = CF::Line.create("text_appending_robot", "Digitization") do
17
- CF::InputFormat.new({:line => self,:name => "Company", :required => true, :valid_type => "general"})
17
+ CF::InputFormat.new({:line => self,:name => "Company", :required => true})
18
18
  CF::InputFormat.new({:line => self,:name => "Website", :required => true, :valid_type => "url"})
19
19
  CF::Station.create({:line => self, :type => "work"}) do |s|
20
20
  CF::HumanWorker.new({:station => s, :number => 1, :reward => 20})
@@ -48,7 +48,7 @@ module CF
48
48
  <input type="submit" /></form>'
49
49
 
50
50
  line = CF::Line.new("text_appending_robot_1","Digitization")
51
- input_format = CF::InputFormat.new({:name => "Company", :required => true, :valid_type => "general"})
51
+ input_format = CF::InputFormat.new({:name => "Company", :required => true})
52
52
  input_format_1 = CF::InputFormat.new({:name => "Website", :required => true, :valid_type => "url"})
53
53
  line.input_formats input_format
54
54
  line.input_formats input_format_1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudfactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-01 00:00:00.000000000Z
12
+ date: 2011-09-09 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
16
- requirement: &2156893460 !ruby/object:Gem::Requirement
16
+ requirement: &2156899480 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2156893460
24
+ version_requirements: *2156899480
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &2156892900 !ruby/object:Gem::Requirement
27
+ requirement: &2156884260 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2156892900
35
+ version_requirements: *2156884260
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: hashie
38
- requirement: &2156892380 !ruby/object:Gem::Requirement
38
+ requirement: &2156883680 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2156892380
46
+ version_requirements: *2156883680
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rest-client
49
- requirement: &2156892000 !ruby/object:Gem::Requirement
49
+ requirement: &2156883200 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2156892000
57
+ version_requirements: *2156883200
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: json
60
- requirement: &2156891480 !ruby/object:Gem::Requirement
60
+ requirement: &2156882600 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *2156891480
68
+ version_requirements: *2156882600
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: thor
71
- requirement: &2156890960 !ruby/object:Gem::Requirement
71
+ requirement: &2156882020 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0.14'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *2156890960
79
+ version_requirements: *2156882020
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: highline
82
- requirement: &2156890540 !ruby/object:Gem::Requirement
82
+ requirement: &2156881480 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *2156890540
90
+ version_requirements: *2156881480
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: httparty
93
- requirement: &2156889920 !ruby/object:Gem::Requirement
93
+ requirement: &2156880820 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0.7'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *2156889920
101
+ version_requirements: *2156880820
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: terminal-table
104
- requirement: &2156889420 !ruby/object:Gem::Requirement
104
+ requirement: &2156880200 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '1.4'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *2156889420
112
+ version_requirements: *2156880200
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: millisami-csv-hash
115
- requirement: &2156889020 !ruby/object:Gem::Requirement
115
+ requirement: &2156879740 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *2156889020
123
+ version_requirements: *2156879740
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: awesome_print
126
- requirement: &2156888560 !ruby/object:Gem::Requirement
126
+ requirement: &2156879160 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *2156888560
134
+ version_requirements: *2156879160
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: ruby-debug19
137
- requirement: &2156888060 !ruby/object:Gem::Requirement
137
+ requirement: &2156878660 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *2156888060
145
+ version_requirements: *2156878660
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: aruba
148
- requirement: &2156887620 !ruby/object:Gem::Requirement
148
+ requirement: &2156878120 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: '0'
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *2156887620
156
+ version_requirements: *2156878120
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: rails
159
- requirement: &2156887080 !ruby/object:Gem::Requirement
159
+ requirement: &2156877500 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ~>
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: 3.0.3
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *2156887080
167
+ version_requirements: *2156877500
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: bundler
170
- requirement: &2156886580 !ruby/object:Gem::Requirement
170
+ requirement: &2156876900 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ~>
@@ -175,10 +175,10 @@ dependencies:
175
175
  version: 1.0.0
176
176
  type: :development
177
177
  prerelease: false
178
- version_requirements: *2156886580
178
+ version_requirements: *2156876900
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: generator_spec
181
- requirement: &2156886100 !ruby/object:Gem::Requirement
181
+ requirement: &2156859160 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ~>
@@ -186,10 +186,10 @@ dependencies:
186
186
  version: 0.8.3
187
187
  type: :development
188
188
  prerelease: false
189
- version_requirements: *2156886100
189
+ version_requirements: *2156859160
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: rspec-rails
192
- requirement: &2156885620 !ruby/object:Gem::Requirement
192
+ requirement: &2156858700 !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
195
195
  - - ! '>='
@@ -197,10 +197,10 @@ dependencies:
197
197
  version: '0'
198
198
  type: :development
199
199
  prerelease: false
200
- version_requirements: *2156885620
200
+ version_requirements: *2156858700
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: cucumber
203
- requirement: &2156885160 !ruby/object:Gem::Requirement
203
+ requirement: &2156858160 !ruby/object:Gem::Requirement
204
204
  none: false
205
205
  requirements:
206
206
  - - ! '>='
@@ -208,10 +208,10 @@ dependencies:
208
208
  version: '0'
209
209
  type: :development
210
210
  prerelease: false
211
- version_requirements: *2156885160
211
+ version_requirements: *2156858160
212
212
  - !ruby/object:Gem::Dependency
213
213
  name: rdoc
214
- requirement: &2156884640 !ruby/object:Gem::Requirement
214
+ requirement: &2156857540 !ruby/object:Gem::Requirement
215
215
  none: false
216
216
  requirements:
217
217
  - - ~>
@@ -219,10 +219,10 @@ dependencies:
219
219
  version: 3.5.3
220
220
  type: :development
221
221
  prerelease: false
222
- version_requirements: *2156884640
222
+ version_requirements: *2156857540
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: vcr
225
- requirement: &2156884160 !ruby/object:Gem::Requirement
225
+ requirement: &2156857000 !ruby/object:Gem::Requirement
226
226
  none: false
227
227
  requirements:
228
228
  - - ! '>='
@@ -230,10 +230,10 @@ dependencies:
230
230
  version: '0'
231
231
  type: :development
232
232
  prerelease: false
233
- version_requirements: *2156884160
233
+ version_requirements: *2156857000
234
234
  - !ruby/object:Gem::Dependency
235
235
  name: rake
236
- requirement: &2156883680 !ruby/object:Gem::Requirement
236
+ requirement: &2156856460 !ruby/object:Gem::Requirement
237
237
  none: false
238
238
  requirements:
239
239
  - - ! '>='
@@ -241,10 +241,10 @@ dependencies:
241
241
  version: '0'
242
242
  type: :development
243
243
  prerelease: false
244
- version_requirements: *2156883680
244
+ version_requirements: *2156856460
245
245
  - !ruby/object:Gem::Dependency
246
246
  name: webmock
247
- requirement: &2156883240 !ruby/object:Gem::Requirement
247
+ requirement: &2156855920 !ruby/object:Gem::Requirement
248
248
  none: false
249
249
  requirements:
250
250
  - - ! '>='
@@ -252,10 +252,10 @@ dependencies:
252
252
  version: '0'
253
253
  type: :development
254
254
  prerelease: false
255
- version_requirements: *2156883240
255
+ version_requirements: *2156855920
256
256
  - !ruby/object:Gem::Dependency
257
257
  name: timecop
258
- requirement: &2156882780 !ruby/object:Gem::Requirement
258
+ requirement: &2156855380 !ruby/object:Gem::Requirement
259
259
  none: false
260
260
  requirements:
261
261
  - - ! '>='
@@ -263,7 +263,7 @@ dependencies:
263
263
  version: '0'
264
264
  type: :development
265
265
  prerelease: false
266
- version_requirements: *2156882780
266
+ version_requirements: *2156855380
267
267
  description: A Ruby wrapper and CLI for to interact with Cloudfactory.com REST API
268
268
  email:
269
269
  - info@cloudfactory.com