typingpool 0.8.13 → 0.8.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/tp-finish +68 -4
- data/bin/tp-review +2 -16
- data/lib/typingpool/amazon/hit.rb +15 -24
- data/lib/typingpool/app/cli/formatter.rb +25 -0
- data/lib/typingpool/app.rb +17 -17
- data/lib/typingpool/test/fixtures/test_amazon_hit_full_time.txt +1 -1
- data/lib/typingpool/test/fixtures/tp_finish_4_id.txt +1 -0
- data/lib/typingpool/test/fixtures/tp_finish_4_sandbox-assignment.csv +7 -0
- data/lib/typingpool/test/fixtures/vcr/test_amazon_hit_base.yml +59 -22
- data/lib/typingpool/test/fixtures/vcr/test_amazon_hit_create.yml +28 -28
- data/lib/typingpool/test/fixtures/vcr/test_amazon_hit_full.yml +21 -21
- data/lib/typingpool/test/fixtures/vcr/test_amazon_hit_full_fromsearchhits.yml +40 -40
- data/lib/typingpool/test/fixtures/vcr/test_amazon_hit_retrievers.yml +61 -61
- data/lib/typingpool/test/fixtures/vcr/test_handles_hits_with_broken_external_question.yml +31 -31
- data/lib/typingpool/test/fixtures/vcr/tp_finish_10.yml +3316 -0
- data/lib/typingpool/test/fixtures/vcr/tp_finish_9.yml +416 -0
- data/lib/typingpool/utility/test/script.rb +52 -13
- data/lib/typingpool/utility/test.rb +3 -3
- data/lib/typingpool/version.rb +1 -1
- data/test/make_tp_finish_fixture_1.rb +27 -0
- data/test/make_tp_finish_fixture_2.rb +25 -0
- data/test/make_tp_finish_fixture_3.rb +26 -0
- data/test/test_integration_script_6_tp_finish.rb +50 -15
- data/test/test_unit_amazon.rb +1 -1
- metadata +9 -2
@@ -5,14 +5,14 @@ http_interactions:
|
|
5
5
|
uri: https://mechanicalturk.sandbox.amazonaws.com/
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: Title=Transcribe+MP3+of+1-minute+phone+calll&Description=I+split+up+a+telephone+conversation+into+1-minute+parts%2C+you+transcribe+the+audio+for+one+1-minute+part.&AssignmentDurationInSeconds=600&Reward.Amount=0.01&Reward.CurrencyCode=USD&Keywords=transcription%2C+audio%2C+mp3&AutoApprovalDelayInSeconds=86400&QualificationRequirement.1.QualificationTypeId=000000000000000000L0&QualificationRequirement.1.Comparator=GreaterThanOrEqualTo&QualificationRequirement.1.IntegerValue=95&QualificationRequirement.1.RequiredToPreview=true&QualificationRequirement.2.QualificationTypeId=00000000000000000040&QualificationRequirement.2.Comparator=GreaterThanOrEqualTo&QualificationRequirement.2.IntegerValue=100&QualificationRequirement.2.RequiredToPreview=true&MaxAssignments=1&Question=%3CExternalQuestion+xmlns%3D%22http%3A%2F%2Fmechanicalturk.amazonaws.com%2FAWSMechanicalTurkDataSchemas%2F2006-07-14%2FExternalQuestion.xsd%22%3E%0A++%3CExternalURL%3Ehttps%3A%2F%2Fwebmasher.com%2Fmturk%2Fdummy-missing-file-
|
8
|
+
string: Title=Transcribe+MP3+of+1-minute+phone+calll&Description=I+split+up+a+telephone+conversation+into+1-minute+parts%2C+you+transcribe+the+audio+for+one+1-minute+part.&AssignmentDurationInSeconds=600&Reward.Amount=0.01&Reward.CurrencyCode=USD&Keywords=transcription%2C+audio%2C+mp3&AutoApprovalDelayInSeconds=86400&QualificationRequirement.1.QualificationTypeId=000000000000000000L0&QualificationRequirement.1.Comparator=GreaterThanOrEqualTo&QualificationRequirement.1.IntegerValue=95&QualificationRequirement.1.RequiredToPreview=true&QualificationRequirement.2.QualificationTypeId=00000000000000000040&QualificationRequirement.2.Comparator=GreaterThanOrEqualTo&QualificationRequirement.2.IntegerValue=100&QualificationRequirement.2.RequiredToPreview=true&MaxAssignments=1&Question=%3CExternalQuestion+xmlns%3D%22http%3A%2F%2Fmechanicalturk.amazonaws.com%2FAWSMechanicalTurkDataSchemas%2F2006-07-14%2FExternalQuestion.xsd%22%3E%0A++%3CExternalURL%3Ehttps%3A%2F%2Fwebmasher.com%2Fmturk%2Fdummy-missing-file-b8imzephc48jf6h7%3C%2FExternalURL%3E%0A++%3CFrameHeight%3E400%3C%2FFrameHeight%3E%0A%3C%2FExternalQuestion%3E%0A&LifetimeInSeconds=1200&RequesterAnnotation=typingpool_url%3Dhttp%253A%252F%252Fwebmasher.com%252Fmturk%252FTestTpInterview.00.00.77421e0a6302f4c8c34e24004a4ad828.YSOQJU.mp3%26amp%3Btypingpool_project_id%3D77421e0a6302f4c8c34e24004a4ad828&Operation=CreateHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A48%3A12Z&Version=2012-03-25&Signature=lnfUxklA0GM6qoaDyBFDfYrHgrI%3D
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
|
-
-
|
11
|
+
- "*/*"
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
14
|
User-Agent:
|
15
|
-
- rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.
|
15
|
+
- rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
|
16
16
|
Content-Length:
|
17
17
|
- '1538'
|
18
18
|
Host:
|
@@ -27,29 +27,29 @@ http_interactions:
|
|
27
27
|
Transfer-Encoding:
|
28
28
|
- chunked
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Fri, 14 Apr 2017 20:48:12 GMT
|
31
31
|
Server:
|
32
32
|
- MTurk
|
33
33
|
body:
|
34
34
|
encoding: UTF-8
|
35
35
|
string: |-
|
36
36
|
<?xml version="1.0"?>
|
37
|
-
<CreateHITResponse><OperationRequest><RequestId>
|
37
|
+
<CreateHITResponse><OperationRequest><RequestId>ff9f405d-9024-42fa-81e5-b9f92e39feb8</RequestId></OperationRequest><HIT><Request><IsValid>True</IsValid></Request><HITId>36GJS3V78V6JIKPKADV31UR1PBIGJD</HITId><HITTypeId>3FJMTJX97O5QAQ6TYMEKGK4K51PA6J</HITTypeId></HIT></CreateHITResponse>
|
38
38
|
http_version:
|
39
|
-
recorded_at:
|
39
|
+
recorded_at: Fri, 14 Apr 2017 20:48:12 GMT
|
40
40
|
- request:
|
41
41
|
method: post
|
42
42
|
uri: https://mechanicalturk.sandbox.amazonaws.com/
|
43
43
|
body:
|
44
44
|
encoding: UTF-8
|
45
|
-
string: HITId=
|
45
|
+
string: HITId=36GJS3V78V6JIKPKADV31UR1PBIGJD&ResponseGroup.0=HITDetail&ResponseGroup.1=HITQuestion&ResponseGroup.2=Minimal&ResponseGroup.3=HITAssignmentSummary&Operation=GetHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A48%3A12Z&Version=2012-03-25&Signature=mmTVNHGI6ngR175yXry3P9Ncgaw%3D
|
46
46
|
headers:
|
47
47
|
Accept:
|
48
|
-
-
|
48
|
+
- "*/*"
|
49
49
|
Accept-Encoding:
|
50
50
|
- gzip, deflate
|
51
51
|
User-Agent:
|
52
|
-
- rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.
|
52
|
+
- rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
|
53
53
|
Content-Length:
|
54
54
|
- '334'
|
55
55
|
Host:
|
@@ -64,23 +64,23 @@ http_interactions:
|
|
64
64
|
Transfer-Encoding:
|
65
65
|
- chunked
|
66
66
|
Date:
|
67
|
-
-
|
67
|
+
- Fri, 14 Apr 2017 20:48:12 GMT
|
68
68
|
Server:
|
69
69
|
- MTurk
|
70
70
|
body:
|
71
71
|
encoding: UTF-8
|
72
72
|
string: |-
|
73
73
|
<?xml version="1.0"?>
|
74
|
-
<GetHITResponse><OperationRequest><RequestId>
|
75
|
-
<ExternalURL>https://webmasher.com/mturk/dummy-missing-file-
|
74
|
+
<GetHITResponse><OperationRequest><RequestId>38525286-dc9d-44dd-a51b-33c4f2bee36e</RequestId></OperationRequest><HIT><Request><IsValid>True</IsValid></Request><HITId>36GJS3V78V6JIKPKADV31UR1PBIGJD</HITId><HITTypeId>3FJMTJX97O5QAQ6TYMEKGK4K51PA6J</HITTypeId><HITGroupId>346AHROM60PF93NK7E74UE17XHEHQ0</HITGroupId><CreationTime>2017-04-14T20:48:12Z</CreationTime><Title>Transcribe MP3 of 1-minute phone calll</Title><Description>I split up a telephone conversation into 1-minute parts, you transcribe the audio for one 1-minute part.</Description><Question><ExternalQuestion xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/ExternalQuestion.xsd">
|
75
|
+
<ExternalURL>https://webmasher.com/mturk/dummy-missing-file-b8imzephc48jf6h7</ExternalURL>
|
76
76
|
<FrameHeight>400</FrameHeight>
|
77
77
|
</ExternalQuestion>
|
78
|
-
</Question><Keywords>transcription, audio, mp3</Keywords><HITStatus>Assignable</HITStatus><MaxAssignments>1</MaxAssignments><Reward><Amount>0.01</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$0.01</FormattedPrice></Reward><AutoApprovalDelayInSeconds>86400</AutoApprovalDelayInSeconds><Expiration>
|
78
|
+
</Question><Keywords>transcription, audio, mp3</Keywords><HITStatus>Assignable</HITStatus><MaxAssignments>1</MaxAssignments><Reward><Amount>0.01</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$0.01</FormattedPrice></Reward><AutoApprovalDelayInSeconds>86400</AutoApprovalDelayInSeconds><Expiration>2017-04-14T21:08:12Z</Expiration><AssignmentDurationInSeconds>600</AssignmentDurationInSeconds><RequesterAnnotation>typingpool_url=http%3A%2F%2Fwebmasher.com%2Fmturk%2FTestTpInterview.00.00.77421e0a6302f4c8c34e24004a4ad828.YSOQJU.mp3&amp;typingpool_project_id=77421e0a6302f4c8c34e24004a4ad828</RequesterAnnotation><QualificationRequirement><QualificationTypeId>000000000000000000L0</QualificationTypeId><Comparator>GreaterThanOrEqualTo</Comparator><IntegerValue>95</IntegerValue><RequiredToPreview>1</RequiredToPreview></QualificationRequirement><QualificationRequirement><QualificationTypeId>00000000000000000040</QualificationTypeId><Comparator>GreaterThanOrEqualTo</Comparator><IntegerValue>100</IntegerValue><RequiredToPreview>1</RequiredToPreview></QualificationRequirement><HITReviewStatus>NotReviewed</HITReviewStatus><NumberOfAssignmentsPending>0</NumberOfAssignmentsPending><NumberOfAssignmentsAvailable>1</NumberOfAssignmentsAvailable><NumberOfAssignmentsCompleted>0</NumberOfAssignmentsCompleted></HIT></GetHITResponse>
|
79
79
|
http_version:
|
80
|
-
recorded_at:
|
80
|
+
recorded_at: Fri, 14 Apr 2017 20:48:12 GMT
|
81
81
|
- request:
|
82
82
|
method: get
|
83
|
-
uri: https://webmasher.com/mturk/dummy-missing-file-
|
83
|
+
uri: https://webmasher.com/mturk/dummy-missing-file-b8imzephc48jf6h7
|
84
84
|
body:
|
85
85
|
encoding: US-ASCII
|
86
86
|
string: ''
|
@@ -88,7 +88,7 @@ http_interactions:
|
|
88
88
|
Accept-Encoding:
|
89
89
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
90
90
|
Accept:
|
91
|
-
-
|
91
|
+
- "*/*"
|
92
92
|
User-Agent:
|
93
93
|
- Ruby
|
94
94
|
response:
|
@@ -97,7 +97,7 @@ http_interactions:
|
|
97
97
|
message: Not Found
|
98
98
|
headers:
|
99
99
|
Date:
|
100
|
-
-
|
100
|
+
- Fri, 14 Apr 2017 20:48:13 GMT
|
101
101
|
Server:
|
102
102
|
- Apache/2.4.7 (Ubuntu)
|
103
103
|
Content-Length:
|
@@ -112,15 +112,15 @@ http_interactions:
|
|
112
112
|
<title>404 Not Found</title>
|
113
113
|
</head><body>
|
114
114
|
<h1>Not Found</h1>
|
115
|
-
<p>The requested URL /mturk/dummy-missing-file-
|
115
|
+
<p>The requested URL /mturk/dummy-missing-file-b8imzephc48jf6h7 was not found on this server.</p>
|
116
116
|
<hr>
|
117
117
|
<address>Apache/2.4.7 (Ubuntu) Server at webmasher.com Port 443</address>
|
118
118
|
</body></html>
|
119
119
|
http_version:
|
120
|
-
recorded_at:
|
120
|
+
recorded_at: Fri, 14 Apr 2017 20:48:13 GMT
|
121
121
|
- request:
|
122
122
|
method: get
|
123
|
-
uri: https://webmasher.com/mturk/dummy-missing-file-
|
123
|
+
uri: https://webmasher.com/mturk/dummy-missing-file-b8imzephc48jf6h7
|
124
124
|
body:
|
125
125
|
encoding: US-ASCII
|
126
126
|
string: ''
|
@@ -128,7 +128,7 @@ http_interactions:
|
|
128
128
|
Accept-Encoding:
|
129
129
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
130
130
|
Accept:
|
131
|
-
-
|
131
|
+
- "*/*"
|
132
132
|
User-Agent:
|
133
133
|
- Ruby
|
134
134
|
response:
|
@@ -137,7 +137,7 @@ http_interactions:
|
|
137
137
|
message: Not Found
|
138
138
|
headers:
|
139
139
|
Date:
|
140
|
-
-
|
140
|
+
- Fri, 14 Apr 2017 20:48:13 GMT
|
141
141
|
Server:
|
142
142
|
- Apache/2.4.7 (Ubuntu)
|
143
143
|
Content-Length:
|
@@ -152,27 +152,27 @@ http_interactions:
|
|
152
152
|
<title>404 Not Found</title>
|
153
153
|
</head><body>
|
154
154
|
<h1>Not Found</h1>
|
155
|
-
<p>The requested URL /mturk/dummy-missing-file-
|
155
|
+
<p>The requested URL /mturk/dummy-missing-file-b8imzephc48jf6h7 was not found on this server.</p>
|
156
156
|
<hr>
|
157
157
|
<address>Apache/2.4.7 (Ubuntu) Server at webmasher.com Port 443</address>
|
158
158
|
</body></html>
|
159
159
|
http_version:
|
160
|
-
recorded_at:
|
160
|
+
recorded_at: Fri, 14 Apr 2017 20:48:13 GMT
|
161
161
|
- request:
|
162
162
|
method: post
|
163
163
|
uri: https://mechanicalturk.sandbox.amazonaws.com/
|
164
164
|
body:
|
165
165
|
encoding: UTF-8
|
166
|
-
string: HITId=
|
166
|
+
string: HITId=36GJS3V78V6JIKPKADV31UR1PBIGJD&Operation=DisableHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A48%3A13Z&Version=2012-03-25&Signature=r7aAJgeNdsOK7J9zEOLdN4EgCEA%3D
|
167
167
|
headers:
|
168
168
|
Accept:
|
169
|
-
-
|
169
|
+
- "*/*"
|
170
170
|
Accept-Encoding:
|
171
171
|
- gzip, deflate
|
172
172
|
User-Agent:
|
173
|
-
- rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.
|
173
|
+
- rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
|
174
174
|
Content-Length:
|
175
|
-
- '
|
175
|
+
- '223'
|
176
176
|
Host:
|
177
177
|
- mechanicalturk.sandbox.amazonaws.com
|
178
178
|
response:
|
@@ -185,14 +185,14 @@ http_interactions:
|
|
185
185
|
Transfer-Encoding:
|
186
186
|
- chunked
|
187
187
|
Date:
|
188
|
-
-
|
188
|
+
- Fri, 14 Apr 2017 20:48:13 GMT
|
189
189
|
Server:
|
190
190
|
- MTurk
|
191
191
|
body:
|
192
192
|
encoding: UTF-8
|
193
193
|
string: |-
|
194
194
|
<?xml version="1.0"?>
|
195
|
-
<DisableHITResponse><OperationRequest><RequestId>
|
195
|
+
<DisableHITResponse><OperationRequest><RequestId>da045eb0-b101-46b3-a838-1d4e3aa4c381</RequestId></OperationRequest><DisableHITResult><Request><IsValid>True</IsValid></Request></DisableHITResult></DisableHITResponse>
|
196
196
|
http_version:
|
197
|
-
recorded_at:
|
197
|
+
recorded_at: Fri, 14 Apr 2017 20:48:13 GMT
|
198
198
|
recorded_with: VCR 3.0.3
|