typingpool 0.8.13 → 0.8.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,416 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://mechanicalturk.sandbox.amazonaws.com/
6
+ body:
7
+ encoding: UTF-8
8
+ string: HITId=32TZXEA1OL0WBNGWPNNWO5YC5P9147&PageSize=100&Operation=GetAssignmentsForHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A34%3A50Z&Version=2012-03-25&Signature=6OXZPshRTRsFSoOmWYjxSRgNGiI%3D
9
+ headers:
10
+ Accept:
11
+ - "*/*"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
16
+ Content-Length:
17
+ - '246'
18
+ Host:
19
+ - mechanicalturk.sandbox.amazonaws.com
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Content-Type:
26
+ - text/xml
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Date:
30
+ - Fri, 14 Apr 2017 20:34:50 GMT
31
+ Server:
32
+ - MTurk
33
+ body:
34
+ encoding: UTF-8
35
+ string: |-
36
+ <?xml version="1.0"?>
37
+ <GetAssignmentsForHITResponse><OperationRequest><RequestId>9d41eac5-8efd-408d-b037-6c70cce4e694</RequestId></OperationRequest><GetAssignmentsForHITResult><Request><IsValid>True</IsValid></Request><NumResults>1</NumResults><TotalNumResults>1</TotalNumResults><PageNumber>1</PageNumber><Assignment><AssignmentId>3WOKGM4L72W3UB3Q2Q36DIHNU9JO02</AssignmentId><WorkerId>A108A5T4U9V27P</WorkerId><HITId>32TZXEA1OL0WBNGWPNNWO5YC5P9147</HITId><AssignmentStatus>Submitted</AssignmentStatus><AutoApprovalTime>2017-04-15T06:34:39Z</AutoApprovalTime><AcceptTime>2017-04-14T20:34:30Z</AcceptTime><SubmitTime>2017-04-14T20:34:39Z</SubmitTime><Answer>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
38
+ &lt;QuestionFormAnswers xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionFormAnswers.xsd"&gt;
39
+ &lt;Answer&gt;
40
+ &lt;QuestionIdentifier&gt;typingpool_url&lt;/QuestionIdentifier&gt;
41
+ &lt;FreeText&gt;https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.00.00.7e36c4fdb505ff41a447489414245ec2.IYUACW.mp3&lt;/FreeText&gt;
42
+ &lt;/Answer&gt;
43
+ &lt;Answer&gt;
44
+ &lt;QuestionIdentifier&gt;typingpool_project_id&lt;/QuestionIdentifier&gt;
45
+ &lt;FreeText&gt;7e36c4fdb505ff41a447489414245ec2&lt;/FreeText&gt;
46
+ &lt;/Answer&gt;
47
+ &lt;Answer&gt;
48
+ &lt;QuestionIdentifier&gt;transcription&lt;/QuestionIdentifier&gt;
49
+ &lt;FreeText&gt;Ryan: This is probably a dumb question but in Grand Rapids -- are you guys connected to the auto industry or are you too far from Detroit to be...&amp;#13;
50
+ &amp;#13;
51
+ Havi: We are. We're connected to the buyers for the auto industry in Detroit and Flint. It's kind of a - it's a statewide business here but We definitely get our&amp;#13;
52
+ &lt;/FreeText&gt;
53
+ &lt;/Answer&gt;
54
+ &lt;/QuestionFormAnswers&gt;
55
+ </Answer></Assignment></GetAssignmentsForHITResult></GetAssignmentsForHITResponse>
56
+ http_version:
57
+ recorded_at: Fri, 14 Apr 2017 20:34:50 GMT
58
+ - request:
59
+ method: post
60
+ uri: https://mechanicalturk.sandbox.amazonaws.com/
61
+ body:
62
+ encoding: UTF-8
63
+ string: HITId=3ULIZ0H1VALE76KW3S66TX4Q5L415C&PageSize=100&Operation=GetAssignmentsForHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A34%3A50Z&Version=2012-03-25&Signature=6OXZPshRTRsFSoOmWYjxSRgNGiI%3D
64
+ headers:
65
+ Accept:
66
+ - "*/*"
67
+ Accept-Encoding:
68
+ - gzip, deflate
69
+ User-Agent:
70
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
71
+ Content-Length:
72
+ - '246'
73
+ Host:
74
+ - mechanicalturk.sandbox.amazonaws.com
75
+ response:
76
+ status:
77
+ code: 200
78
+ message: OK
79
+ headers:
80
+ Content-Type:
81
+ - text/xml
82
+ Transfer-Encoding:
83
+ - chunked
84
+ Date:
85
+ - Fri, 14 Apr 2017 20:34:50 GMT
86
+ Server:
87
+ - MTurk
88
+ body:
89
+ encoding: UTF-8
90
+ string: |-
91
+ <?xml version="1.0"?>
92
+ <GetAssignmentsForHITResponse><OperationRequest><RequestId>f562fa4c-ae4e-469d-9699-4179d39cad9b</RequestId></OperationRequest><GetAssignmentsForHITResult><Request><IsValid>True</IsValid></Request><NumResults>0</NumResults><TotalNumResults>0</TotalNumResults><PageNumber>1</PageNumber></GetAssignmentsForHITResult></GetAssignmentsForHITResponse>
93
+ http_version:
94
+ recorded_at: Fri, 14 Apr 2017 20:34:51 GMT
95
+ - request:
96
+ method: post
97
+ uri: https://mechanicalturk.sandbox.amazonaws.com/
98
+ body:
99
+ encoding: UTF-8
100
+ string: HITId=306W7JMRYYEY7MLQ3N6YBTRQTNW8B4&PageSize=100&Operation=GetAssignmentsForHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A34%3A51Z&Version=2012-03-25&Signature=eyh3W58i%2FLnWeBdRGGIBwi75a3E%3D
101
+ headers:
102
+ Accept:
103
+ - "*/*"
104
+ Accept-Encoding:
105
+ - gzip, deflate
106
+ User-Agent:
107
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
108
+ Content-Length:
109
+ - '248'
110
+ Host:
111
+ - mechanicalturk.sandbox.amazonaws.com
112
+ response:
113
+ status:
114
+ code: 200
115
+ message: OK
116
+ headers:
117
+ Content-Type:
118
+ - text/xml
119
+ Transfer-Encoding:
120
+ - chunked
121
+ Date:
122
+ - Fri, 14 Apr 2017 20:34:50 GMT
123
+ Server:
124
+ - MTurk
125
+ body:
126
+ encoding: UTF-8
127
+ string: |-
128
+ <?xml version="1.0"?>
129
+ <GetAssignmentsForHITResponse><OperationRequest><RequestId>89e9e061-7863-4f3f-9a4b-4ec4d79bb9d1</RequestId></OperationRequest><GetAssignmentsForHITResult><Request><IsValid>True</IsValid></Request><NumResults>1</NumResults><TotalNumResults>1</TotalNumResults><PageNumber>1</PageNumber><Assignment><AssignmentId>3MD9PLUKKJUIEB9455GL4SK4M6XNZE</AssignmentId><WorkerId>A108A5T4U9V27P</WorkerId><HITId>306W7JMRYYEY7MLQ3N6YBTRQTNW8B4</HITId><AssignmentStatus>Submitted</AssignmentStatus><AutoApprovalTime>2017-04-15T06:34:10Z</AutoApprovalTime><AcceptTime>2017-04-14T20:34:02Z</AcceptTime><SubmitTime>2017-04-14T20:34:10Z</SubmitTime><Answer>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
130
+ &lt;QuestionFormAnswers xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionFormAnswers.xsd"&gt;
131
+ &lt;Answer&gt;
132
+ &lt;QuestionIdentifier&gt;typingpool_url&lt;/QuestionIdentifier&gt;
133
+ &lt;FreeText&gt;https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.00.44.7e36c4fdb505ff41a447489414245ec2.JBJUVA.mp3&lt;/FreeText&gt;
134
+ &lt;/Answer&gt;
135
+ &lt;Answer&gt;
136
+ &lt;QuestionIdentifier&gt;typingpool_project_id&lt;/QuestionIdentifier&gt;
137
+ &lt;FreeText&gt;7e36c4fdb505ff41a447489414245ec2&lt;/FreeText&gt;
138
+ &lt;/Answer&gt;
139
+ &lt;Answer&gt;
140
+ &lt;QuestionIdentifier&gt;transcription&lt;/QuestionIdentifier&gt;
141
+ &lt;FreeText&gt;Ryan: No fault of the company, they were kind of starved of resources. I mean they actually did really well for several years and then it kind of -- it changed from what it was originally. And it was too bad because that particular division -- other parts of GM did reasonably innovative things subsequently, &amp;#13;
142
+ &amp;#13;
143
+ Havi: Right.&amp;#13;
144
+ &amp;#13;
145
+ Ryan: ...but Saturn itself just kind of didn't get the support. &amp;#13;
146
+ &amp;#13;
147
+ Havi: Ya.&amp;#13;
148
+ &lt;/FreeText&gt;
149
+ &lt;/Answer&gt;
150
+ &lt;/QuestionFormAnswers&gt;
151
+ </Answer></Assignment></GetAssignmentsForHITResult></GetAssignmentsForHITResponse>
152
+ http_version:
153
+ recorded_at: Fri, 14 Apr 2017 20:34:51 GMT
154
+ - request:
155
+ method: post
156
+ uri: https://mechanicalturk.sandbox.amazonaws.com/
157
+ body:
158
+ encoding: UTF-8
159
+ string: HITId=3V7ICJJAZAWXOLYORKGLUHBLR10B40&PageSize=100&Operation=GetAssignmentsForHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A34%3A51Z&Version=2012-03-25&Signature=eyh3W58i%2FLnWeBdRGGIBwi75a3E%3D
160
+ headers:
161
+ Accept:
162
+ - "*/*"
163
+ Accept-Encoding:
164
+ - gzip, deflate
165
+ User-Agent:
166
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
167
+ Content-Length:
168
+ - '248'
169
+ Host:
170
+ - mechanicalturk.sandbox.amazonaws.com
171
+ response:
172
+ status:
173
+ code: 200
174
+ message: OK
175
+ headers:
176
+ Content-Type:
177
+ - text/xml
178
+ Transfer-Encoding:
179
+ - chunked
180
+ Date:
181
+ - Fri, 14 Apr 2017 20:34:51 GMT
182
+ Server:
183
+ - MTurk
184
+ body:
185
+ encoding: UTF-8
186
+ string: |-
187
+ <?xml version="1.0"?>
188
+ <GetAssignmentsForHITResponse><OperationRequest><RequestId>df19fa8f-61b7-4251-9bc0-32163cac54e1</RequestId></OperationRequest><GetAssignmentsForHITResult><Request><IsValid>True</IsValid></Request><NumResults>1</NumResults><TotalNumResults>1</TotalNumResults><PageNumber>1</PageNumber><Assignment><AssignmentId>3PMBY0YE28JKHGU0CHD8BTOZ8ZUC95</AssignmentId><WorkerId>A108A5T4U9V27P</WorkerId><HITId>3V7ICJJAZAWXOLYORKGLUHBLR10B40</HITId><AssignmentStatus>Submitted</AssignmentStatus><AutoApprovalTime>2017-04-15T06:34:26Z</AutoApprovalTime><AcceptTime>2017-04-14T20:34:16Z</AcceptTime><SubmitTime>2017-04-14T20:34:26Z</SubmitTime><Answer>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
189
+ &lt;QuestionFormAnswers xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionFormAnswers.xsd"&gt;
190
+ &lt;Answer&gt;
191
+ &lt;QuestionIdentifier&gt;typingpool_url&lt;/QuestionIdentifier&gt;
192
+ &lt;FreeText&gt;https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.01.06.7e36c4fdb505ff41a447489414245ec2.VRYRQT.mp3&lt;/FreeText&gt;
193
+ &lt;/Answer&gt;
194
+ &lt;Answer&gt;
195
+ &lt;QuestionIdentifier&gt;typingpool_project_id&lt;/QuestionIdentifier&gt;
196
+ &lt;FreeText&gt;7e36c4fdb505ff41a447489414245ec2&lt;/FreeText&gt;
197
+ &lt;/Answer&gt;
198
+ &lt;Answer&gt;
199
+ &lt;QuestionIdentifier&gt;transcription&lt;/QuestionIdentifier&gt;
200
+ &lt;FreeText&gt;Ryan: It just -- when you mentioned the manufacturing issues it kind of reminded me of that. Like people have this weird fatalism about American manufacturing --&amp;#13;
201
+ &amp;#13;
202
+ Havi: Ya.&amp;#13;
203
+ &amp;#13;
204
+ Ryan: ....we can't do this, we can't do that. And it's like, well, no, there's all these examples. My car comes from NUMMI which is like this amazing gm plant that turned out these incredible quality small cars and people just don't know&amp;#13;
205
+ &lt;/FreeText&gt;
206
+ &lt;/Answer&gt;
207
+ &lt;/QuestionFormAnswers&gt;
208
+ </Answer></Assignment></GetAssignmentsForHITResult></GetAssignmentsForHITResponse>
209
+ http_version:
210
+ recorded_at: Fri, 14 Apr 2017 20:34:51 GMT
211
+ - request:
212
+ method: post
213
+ uri: https://mechanicalturk.sandbox.amazonaws.com/
214
+ body:
215
+ encoding: UTF-8
216
+ string: HITId=37VHPF5VYCJHHRDWHN2TMDX8B8W8CB&PageSize=100&Operation=GetAssignmentsForHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A34%3A51Z&Version=2012-03-25&Signature=eyh3W58i%2FLnWeBdRGGIBwi75a3E%3D
217
+ headers:
218
+ Accept:
219
+ - "*/*"
220
+ Accept-Encoding:
221
+ - gzip, deflate
222
+ User-Agent:
223
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
224
+ Content-Length:
225
+ - '248'
226
+ Host:
227
+ - mechanicalturk.sandbox.amazonaws.com
228
+ response:
229
+ status:
230
+ code: 200
231
+ message: OK
232
+ headers:
233
+ Content-Type:
234
+ - text/xml
235
+ Transfer-Encoding:
236
+ - chunked
237
+ Date:
238
+ - Fri, 14 Apr 2017 20:34:50 GMT
239
+ Server:
240
+ - MTurk
241
+ body:
242
+ encoding: UTF-8
243
+ string: |-
244
+ <?xml version="1.0"?>
245
+ <GetAssignmentsForHITResponse><OperationRequest><RequestId>f3216c92-62b5-4202-9219-abf7a3b3abeb</RequestId></OperationRequest><GetAssignmentsForHITResult><Request><IsValid>True</IsValid></Request><NumResults>0</NumResults><TotalNumResults>0</TotalNumResults><PageNumber>1</PageNumber></GetAssignmentsForHITResult></GetAssignmentsForHITResponse>
246
+ http_version:
247
+ recorded_at: Fri, 14 Apr 2017 20:34:51 GMT
248
+ - request:
249
+ method: post
250
+ uri: https://mechanicalturk.sandbox.amazonaws.com/
251
+ body:
252
+ encoding: UTF-8
253
+ string: HITId=3566S7OX5DZTUAYFRLL3RHIMWRZ17R&PageSize=100&Operation=GetAssignmentsForHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A34%3A51Z&Version=2012-03-25&Signature=eyh3W58i%2FLnWeBdRGGIBwi75a3E%3D
254
+ headers:
255
+ Accept:
256
+ - "*/*"
257
+ Accept-Encoding:
258
+ - gzip, deflate
259
+ User-Agent:
260
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
261
+ Content-Length:
262
+ - '248'
263
+ Host:
264
+ - mechanicalturk.sandbox.amazonaws.com
265
+ response:
266
+ status:
267
+ code: 200
268
+ message: OK
269
+ headers:
270
+ Content-Type:
271
+ - text/xml
272
+ Transfer-Encoding:
273
+ - chunked
274
+ Date:
275
+ - Fri, 14 Apr 2017 20:34:51 GMT
276
+ Server:
277
+ - MTurk
278
+ body:
279
+ encoding: UTF-8
280
+ string: |-
281
+ <?xml version="1.0"?>
282
+ <GetAssignmentsForHITResponse><OperationRequest><RequestId>0c9d65b2-1663-4ad3-9656-9ec9fe1abd86</RequestId></OperationRequest><GetAssignmentsForHITResult><Request><IsValid>True</IsValid></Request><NumResults>1</NumResults><TotalNumResults>1</TotalNumResults><PageNumber>1</PageNumber><Assignment><AssignmentId>3JZQSN0I3RQ6Z21IHP9JBGVP9PHGFB</AssignmentId><WorkerId>A108A5T4U9V27P</WorkerId><HITId>3566S7OX5DZTUAYFRLL3RHIMWRZ17R</HITId><AssignmentStatus>Submitted</AssignmentStatus><AutoApprovalTime>2017-04-15T06:33:51Z</AutoApprovalTime><AcceptTime>2017-04-14T20:33:37Z</AcceptTime><SubmitTime>2017-04-14T20:33:51Z</SubmitTime><Answer>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
283
+ &lt;QuestionFormAnswers xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionFormAnswers.xsd"&gt;
284
+ &lt;Answer&gt;
285
+ &lt;QuestionIdentifier&gt;typingpool_url&lt;/QuestionIdentifier&gt;
286
+ &lt;FreeText&gt;https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.01.50.7e36c4fdb505ff41a447489414245ec2.VXDFAS.mp3&lt;/FreeText&gt;
287
+ &lt;/Answer&gt;
288
+ &lt;Answer&gt;
289
+ &lt;QuestionIdentifier&gt;typingpool_project_id&lt;/QuestionIdentifier&gt;
290
+ &lt;FreeText&gt;7e36c4fdb505ff41a447489414245ec2&lt;/FreeText&gt;
291
+ &lt;/Answer&gt;
292
+ &lt;Answer&gt;
293
+ &lt;QuestionIdentifier&gt;transcription&lt;/QuestionIdentifier&gt;
294
+ &lt;FreeText&gt;Havi: ....disillusionment and kind of abandonment and that a lot of people in the Midwest &amp;#13;
295
+ &amp;#13;
296
+ Ryan: Right.&amp;#13;
297
+ &amp;#13;
298
+ Havi: Felt that they were playing the pawn in this particular election.&amp;#13;
299
+ &lt;/FreeText&gt;
300
+ &lt;/Answer&gt;
301
+ &lt;/QuestionFormAnswers&gt;
302
+ </Answer></Assignment></GetAssignmentsForHITResult></GetAssignmentsForHITResponse>
303
+ http_version:
304
+ recorded_at: Fri, 14 Apr 2017 20:34:51 GMT
305
+ - request:
306
+ method: post
307
+ uri: https://mechanicalturk.sandbox.amazonaws.com/
308
+ body:
309
+ encoding: UTF-8
310
+ string: AssignmentId=3WOKGM4L72W3UB3Q2Q36DIHNU9JO02&Operation=ApproveAssignment&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A34%3A51Z&Version=2012-03-25&Signature=9yhDAnN3oi5HGZELn3bj%2BrwBkgw%3D
311
+ headers:
312
+ Accept:
313
+ - "*/*"
314
+ Accept-Encoding:
315
+ - gzip, deflate
316
+ User-Agent:
317
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
318
+ Content-Length:
319
+ - '239'
320
+ Host:
321
+ - mechanicalturk.sandbox.amazonaws.com
322
+ response:
323
+ status:
324
+ code: 200
325
+ message: OK
326
+ headers:
327
+ Content-Type:
328
+ - text/xml
329
+ Transfer-Encoding:
330
+ - chunked
331
+ Date:
332
+ - Fri, 14 Apr 2017 20:34:51 GMT
333
+ Server:
334
+ - MTurk
335
+ body:
336
+ encoding: UTF-8
337
+ string: |-
338
+ <?xml version="1.0"?>
339
+ <ApproveAssignmentResponse><OperationRequest><RequestId>14974344-9e1f-48d8-a77d-02d5e6e21908</RequestId></OperationRequest><ApproveAssignmentResult><Request><IsValid>True</IsValid></Request></ApproveAssignmentResult></ApproveAssignmentResponse>
340
+ http_version:
341
+ recorded_at: Fri, 14 Apr 2017 20:34:51 GMT
342
+ - request:
343
+ method: post
344
+ uri: https://mechanicalturk.sandbox.amazonaws.com/
345
+ body:
346
+ encoding: UTF-8
347
+ string: AssignmentId=3MD9PLUKKJUIEB9455GL4SK4M6XNZE&RequesterFeedback=No+reason+-+this+is+a+test&Operation=RejectAssignment&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A34%3A51Z&Version=2012-03-25&Signature=FE%2FEePWrpUQaTKS42QldKTdrvgU%3D
348
+ headers:
349
+ Accept:
350
+ - "*/*"
351
+ Accept-Encoding:
352
+ - gzip, deflate
353
+ User-Agent:
354
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
355
+ Content-Length:
356
+ - '283'
357
+ Host:
358
+ - mechanicalturk.sandbox.amazonaws.com
359
+ response:
360
+ status:
361
+ code: 200
362
+ message: OK
363
+ headers:
364
+ Content-Type:
365
+ - text/xml
366
+ Transfer-Encoding:
367
+ - chunked
368
+ Date:
369
+ - Fri, 14 Apr 2017 20:34:51 GMT
370
+ Server:
371
+ - MTurk
372
+ body:
373
+ encoding: UTF-8
374
+ string: |-
375
+ <?xml version="1.0"?>
376
+ <RejectAssignmentResponse><OperationRequest><RequestId>04560e6e-cb61-46f9-848d-6e75965a6e7d</RequestId></OperationRequest><RejectAssignmentResult><Request><IsValid>True</IsValid></Request></RejectAssignmentResult></RejectAssignmentResponse>
377
+ http_version:
378
+ recorded_at: Fri, 14 Apr 2017 20:34:51 GMT
379
+ - request:
380
+ method: post
381
+ uri: https://mechanicalturk.sandbox.amazonaws.com/
382
+ body:
383
+ encoding: UTF-8
384
+ string: HITId=306W7JMRYYEY7MLQ3N6YBTRQTNW8B4&Operation=DisposeHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A34%3A51Z&Version=2012-03-25&Signature=GiRU2lDlAdBMQymF1SY8dro3TZ4%3D
385
+ headers:
386
+ Accept:
387
+ - "*/*"
388
+ Accept-Encoding:
389
+ - gzip, deflate
390
+ User-Agent:
391
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
392
+ Content-Length:
393
+ - '223'
394
+ Host:
395
+ - mechanicalturk.sandbox.amazonaws.com
396
+ response:
397
+ status:
398
+ code: 200
399
+ message: OK
400
+ headers:
401
+ Content-Type:
402
+ - text/xml
403
+ Transfer-Encoding:
404
+ - chunked
405
+ Date:
406
+ - Fri, 14 Apr 2017 20:34:50 GMT
407
+ Server:
408
+ - MTurk
409
+ body:
410
+ encoding: UTF-8
411
+ string: |-
412
+ <?xml version="1.0"?>
413
+ <DisposeHITResponse><OperationRequest><RequestId>ce57eb53-85d1-4231-ba86-3dbeac4636b3</RequestId></OperationRequest><DisposeHITResult><Request><IsValid>True</IsValid></Request></DisposeHITResult></DisposeHITResponse>
414
+ http_version:
415
+ recorded_at: Fri, 14 Apr 2017 20:34:51 GMT
416
+ recorded_with: VCR 3.0.3
@@ -139,31 +139,69 @@ module Typingpool
139
139
  tp_make(dir, config_path, 'mp3', false, *vcr_args(fixture_name))
140
140
  end
141
141
 
142
- def vcr_args(fixture_name)
142
+ def vcr_args(fixture_name, can_ever_run_live=true, are_recording=Typingpool::Test.record)
143
143
  args = []
144
- if fixture = cleared_vcr_fixture_path_for(fixture_name)
144
+ if fixture = cleared_vcr_fixture_path_for(fixture_name, can_ever_run_live, are_recording)
145
145
  args.push('--testfixture', fixture)
146
- if Typingpool::Test.record
147
- args.push('--testfixturerecord')
148
- end
146
+ args.push('--testfixturerecord') if are_recording
149
147
  end #if fixture = ...
150
148
  args
151
149
  end
152
150
 
153
- def tp_finish(dir, config_path=config_path(dir), project_title=project_default[:title], *args)
154
- tp_finish_inside_sandbox(dir, config_path, project_title, *args)
155
- tp_finish_outside_sandbox(dir, config_path, project_title, *args)
151
+ def tp_finish(dir, config_path=config_path(dir), project_title=project_default[:title], choices=nil, *args)
152
+ tp_finish_inside_sandbox(dir, config_path, project_title, choices, *args)
153
+ tp_finish_outside_sandbox(dir, config_path, project_title, choices, *args)
154
+ end
155
+
156
+
157
+ def tp_finish_inside_sandbox(dir, config_path=config_path(dir), project_title=project_default[:title], choices=nil, *args)
158
+ tp_finish_outside_sandbox(dir, config_path, project_title, choices, '--sandbox', *args)
159
+ end
160
+
161
+ def tp_finish_outside_sandbox(dir, config_path=config_path(dir), project_title=project_default[:title], choices=nil, *args)
162
+ output = {}
163
+ args = [
164
+ File.join(Utility.app_dir, 'bin', 'tp-finish'),
165
+ project_title,
166
+ '--config',
167
+ config_path,
168
+ *args
169
+ ]
170
+ Open3.popen3(*args) do |stdin, stdout, stderr, wait_thr|
171
+ choices.each{|choice| stdin.puts(choice) } if choices
172
+ output[:out] = stdout.gets(nil)
173
+ output[:err] = stderr.gets(nil)
174
+ [stdin, stdout, stderr].each{|stream| stream.close }
175
+ output[:status] = wait_thr.value
176
+ end
177
+ if output[:status] == 0
178
+ return [output[:out].to_s.chomp, output[:err].to_s.chomp]
179
+ else
180
+ if output[:err]
181
+ raise Error::Shell, output[:err].chomp
182
+ else
183
+ raise Error::Shell
184
+ end
185
+ end #if output[:status] != 0
186
+ end
187
+
188
+ def script_with_vcr(dir, fixture_name, config_path=config_path(dir), can_ever_run_live=true, are_recording=Typingpool::Test.record, choices=nil)
189
+ yield([dir, config_path, project_default[:title], choices, *vcr_args(fixture_name, can_ever_run_live, are_recording)])
156
190
  end
157
191
 
192
+ def tp_finish_with_vcr(*args)
193
+ script_with_vcr(*args){|new_args| tp_finish(*new_args) }
194
+ end
158
195
 
159
- def tp_finish_inside_sandbox(dir, config_path=config_path(dir), project_title=project_default[:title], *args)
160
- tp_finish_outside_sandbox(dir, config_path, project_title, '--sandbox', *args)
196
+ def tp_finish_outside_sandbox_with_vcr(*args)
197
+ script_with_vcr(*args){|new_args| tp_finish_outside_sandbox(*new_args) }
161
198
  end
162
199
 
163
- def tp_finish_outside_sandbox(dir, config_path=config_path(dir), project_title=project_default[:title], *args)
164
- call_script('tp-finish', project_title, '--config', config_path, *args)
200
+ def tp_finish_inside_sandbox_with_vcr(*args)
201
+ script_with_vcr(*args){|new_args| tp_finish_inside_sandbox(*new_args) }
165
202
  end
166
203
 
204
+
167
205
  def audio_files(subdir='mp3')
168
206
  dir = File.join(audio_dir, subdir)
169
207
  Dir.entries(dir).reject{|entry| entry.match(/^\./) }.map{|entry| File.join(dir, entry)}.select{|path| File.file?(path) }
@@ -319,7 +357,7 @@ module Typingpool
319
357
 
320
358
  def restore_project_dir_from_fixtures(fixture_prefix, project_path)
321
359
  with_fixtures_in_project_dir(fixture_prefix, project_path) do |source_fixture_path, project_fixture_path|
322
- FileUtils.rm(project_fixture_path)
360
+ FileUtils.rm(project_fixture_path) if File.exists? project_fixture_path
323
361
  path_to_orig = File.join(File.dirname(project_fixture_path), "orig_#{File.basename(project_fixture_path)}")
324
362
  if File.exist?(path_to_orig)
325
363
  FileUtils.mv(path_to_orig, project_fixture_path)
@@ -335,6 +373,7 @@ module Typingpool
335
373
  output.split(/Transcript for\b/)
336
374
  end
337
375
 
376
+
338
377
 
339
378
  end #Script
340
379
  end #Test
@@ -21,11 +21,11 @@ module Typingpool
21
21
  File.delete(fixture_path) if File.exist? fixture_path
22
22
  end
23
23
 
24
- def cleared_vcr_fixture_path_for(fixture_name)
25
- if Typingpool::Test.record
24
+ def cleared_vcr_fixture_path_for(fixture_name, can_ever_run_live=true, are_recording=Typingpool::Test.record)
25
+ if are_recording
26
26
  delete_vcr_fixture(fixture_name)
27
27
  end
28
- if (Typingpool::Test.record || not(Typingpool::Test.live))
28
+ if (are_recording || not(Typingpool::Test.live) || not(can_ever_run_live))
29
29
  File.join(vcr_dir, fixture_name)
30
30
  end
31
31
  end
@@ -1,3 +1,3 @@
1
1
  module Typingpool
2
- VERSION = '0.8.13'
2
+ VERSION = '0.8.14'
3
3
  end #Typingpool
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $:.unshift File.join(File.dirname(File.dirname($0)), 'lib')
4
+
5
+ require 'typingpool'
6
+ require 'typingpool/utility/test/script'
7
+ require 'fileutils'
8
+
9
+ include Typingpool::Utility::Test::Script
10
+
11
+ transcripts_dir = make_fixture_transcripts_dir('tp_finish_project_temp')
12
+ write_testing_config_for_transcripts_dir(transcripts_dir, reconfigure_for_s3(self.config))
13
+
14
+ begin
15
+ tp_make(transcripts_dir)
16
+ tp_assign(transcripts_dir, config_path(transcripts_dir), project_default[:title])
17
+ rescue
18
+ FileUtils.remove_entry_secure(transcripts_dir)
19
+ raise
20
+ end
21
+
22
+ #copy key files over to permanent locations within fixture dir
23
+ with_fixtures_in_project_dir('tp_finish_4_', File.join(transcripts_dir, project_default[:title])) do |source_fixture_path, project_fixture_path|
24
+ FileUtils.cp(project_fixture_path, source_fixture_path)
25
+ end
26
+ STDERR.puts "Temp project assigned in Mechanical Turk sandbox. Complete FOUR assignments and run make_tp_finish_fixture_2.rb. Check for assignments at"
27
+ STDOUT.puts "https://workersandbox.mturk.com/mturk/searchbar?minReward=0.00&searchWords=typingpooltest&selectedSearchType=hitgroups\n"
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $:.unshift File.join(File.dirname(File.dirname($0)), 'lib')
4
+
5
+ require 'typingpool'
6
+ require 'typingpool/utility/test/script'
7
+ require 'fileutils'
8
+
9
+ include Typingpool::Utility::Test::Script
10
+
11
+ transcripts_dir = File.join(fixtures_dir, 'tp_finish_project_temp')
12
+
13
+ fixture_name = 'tp_finish_9'
14
+ fixture_path = File.join(vcr_dir, fixture_name + '.yml')
15
+ output = tp_review_with_fixture(transcripts_dir, fixture_name, %w(a r q), true, project_default[:title])
16
+ output[:status].to_i == 0 or abort "Bad exit code: #{output[:status]} err: #{output[:err]}"
17
+ File.exists? fixture_path or abort "Can't find fixture as expected at #{fixture_path}"
18
+ (Time.now - File.ctime(fixture_path)) < 60 or abort "Fixture file does not appear newly created at #{fixture_path}"
19
+ project = Typingpool::Project.new(project_default[:title], Typingpool::Config.file(config_path(transcripts_dir)))
20
+ transcript_count = project_transcript_count(project, 'sandbox-assignment.csv')
21
+ transcript_count == 1 or abort "Unexpected number of transcripts in project after first run: #{transcript_count}"
22
+
23
+ STDERR.puts "Initial step recorded. Please manually approve ONE assignment at"
24
+ STDOUT.puts "https://requestersandbox.mturk.com/mturk/manageHITs?hitSortType=CREATION_DESCENDING&%2Fsort.x=11&%2Fsort.y=7"
25
+ STDERR.puts "...and run make_tp_finish_fixture_3.rb"
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $:.unshift File.join(File.dirname(File.dirname($0)), 'lib')
4
+
5
+ require 'typingpool'
6
+ require 'typingpool/utility/test/script'
7
+ require 'fileutils'
8
+
9
+ include Typingpool::Utility::Test::Script
10
+
11
+ transcripts_dir = File.join(fixtures_dir, 'tp_finish_project_temp')
12
+
13
+ fixture_name = 'tp_finish_10'
14
+ fixture_path = File.join(vcr_dir, fixture_name + '.yml')
15
+ out, err = tp_finish_inside_sandbox_with_vcr(transcripts_dir, fixture_name, config_path(transcripts_dir), false, true, %w(s a))
16
+ File.exists? fixture_path or abort "Can't find fixture as expected at #{fixture_path}"
17
+ (Time.now - File.ctime(fixture_path)) < 60 or abort "Fixture file does not appear newly created at #{fixture_path}"
18
+ project = Typingpool::Project.new(project_default[:title], Typingpool::Config.file(config_path(transcripts_dir)))
19
+ transcript_count = project_transcript_count(project, 'old-sandbox-assignment.csv')
20
+ transcript_count == 2 or abort "Unexpected number of transcripts in project: #{transcript_count}. Did you remember to manually approve one HIT?"
21
+ err.match(/not been added/) or abort "tp-finish did not seem to notice the approved, unadded HIT"
22
+ err.match(/unreviewed submission/) or abort "tp-finish did not seem to notice the submitted, unreviewed HIT"
23
+ tp_finish(transcripts_dir, config_path(transcripts_dir), project_default[:title], nil, '--force')
24
+ FileUtils.remove_entry_secure(transcripts_dir, :secure => true)
25
+ STDERR.puts "All done!"
26
+