rturk 2.6.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rturk/errors.rb +1 -0
- data/lib/rturk/operations/search_qualification_types.rb +46 -0
- data/lib/rturk/parsers/qualification_type_parser.rb +28 -0
- data/lib/rturk/parsers/responses/search_qualification_types_response.rb +85 -0
- data/lib/rturk/requester.rb +6 -1
- data/lib/rturk/utilities.rb +11 -0
- data/lib/rturk/version.rb +1 -1
- data/spec/fake_responses/search_qualification_types.xml +58 -0
- data/spec/operations/search_qualification_types_spec.rb +29 -0
- data/spec/parsers/qualification_parser.rb +23 -0
- data/spec/parsers/qualification_type_parser_spec.rb +69 -0
- data/spec/requester_spec.rb +38 -0
- metadata +38 -14
data/lib/rturk/errors.rb
CHANGED
@@ -0,0 +1,46 @@
|
|
1
|
+
module RTurk
|
2
|
+
class SearchQualificationTypes < Operation
|
3
|
+
# You can call this operation without only required parameters and get an unsorted
|
4
|
+
# list or you can pass in a :sort_by => {:name => :ascending}
|
5
|
+
#
|
6
|
+
# You can sort by
|
7
|
+
# :name
|
8
|
+
|
9
|
+
attr_accessor :query, :sort_property, :sort_order, :page_size, :page_number, :sort_by, :must_be_requestable, :must_be_owned_by_caller
|
10
|
+
require_params :must_be_requestable
|
11
|
+
|
12
|
+
SORT_BY = { :name => 'Name' }
|
13
|
+
SORT_ORDER = {:ascending => 'Ascending', :descending => 'Descending', :asc => 'Ascending', :desc => 'Descending'}
|
14
|
+
|
15
|
+
def parse(xml)
|
16
|
+
RTurk::SearchQualificationTypesResponse.new(xml)
|
17
|
+
end
|
18
|
+
|
19
|
+
def to_params
|
20
|
+
self.set_sort_by
|
21
|
+
params = {
|
22
|
+
'Query' => self.query,
|
23
|
+
'SortProperty' => self.sort_property,
|
24
|
+
'SortDirection' => self.sort_order,
|
25
|
+
'PageSize' => (self.page_size || 100),
|
26
|
+
'PageNumber' => (self.page_number || 1)
|
27
|
+
}
|
28
|
+
params['MustBeRequestable'] = self.must_be_requestable unless self.must_be_requestable.nil?
|
29
|
+
params['MustBeOwnedByCaller'] = self.must_be_owned_by_caller unless self.must_be_owned_by_caller.nil?
|
30
|
+
params
|
31
|
+
end
|
32
|
+
|
33
|
+
def set_sort_by
|
34
|
+
if @sort_by
|
35
|
+
@sort_property = SORT_BY[@sort_by.keys.first]
|
36
|
+
@sort_order = SORT_ORDER[@sort_by.values.first]
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.SearchQualificationTypes(*args)
|
43
|
+
RTurk::SearchQualificationTypes.create(*args)
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Parses a QualificationType object
|
2
|
+
|
3
|
+
module RTurk
|
4
|
+
class QualificationTypeParser < RTurk::Parser
|
5
|
+
attr_reader :qualification_type_id, :creation_time, :name, :description,
|
6
|
+
:keywords, :status, :retry_delay_in_seconds, :is_requestable,
|
7
|
+
:test, :test_duration_in_seconds, :answer_key, :auto_granted,
|
8
|
+
:auto_granted_value
|
9
|
+
|
10
|
+
def initialize(qualifications_xml)
|
11
|
+
@xml_obj = qualifications_xml
|
12
|
+
map_content(@xml_obj,
|
13
|
+
:qualification_type_id => 'QualificationTypeId',
|
14
|
+
:creation_time => 'CreationTime',
|
15
|
+
:name => 'Name',
|
16
|
+
:description => 'Description',
|
17
|
+
:keywords => 'Keywords',
|
18
|
+
:status => 'QualificationTypeStatus',
|
19
|
+
:retry_delay_in_seconds => 'RetryDelayInSeconds',
|
20
|
+
:is_requestable => 'IsRequestable',
|
21
|
+
:test => 'Test',
|
22
|
+
:test_duration_in_seconds => 'TestDurationInSeconds',
|
23
|
+
:answer_key => 'AnswerKey',
|
24
|
+
:auto_granted => 'AutoGranted',
|
25
|
+
:auto_granted_value => 'AutoGrantedValue')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
module RTurk
|
2
|
+
# <SearchQualificationTypesResult>
|
3
|
+
# <Request>
|
4
|
+
# <IsValid>True</IsValid>
|
5
|
+
# </Request>
|
6
|
+
# <NumResults>10</NumResults>
|
7
|
+
# <TotalNumResults>5813</TotalNumResults>
|
8
|
+
# <QualificationType>
|
9
|
+
# <QualificationTypeId>WKAZMYZDCYCZP412TZEZ</QualificationTypeId>
|
10
|
+
# <CreationTime>2009-05-17T10:05:15Z</CreationTime>
|
11
|
+
# <Name> WebReviews Qualification Master Test</Name>
|
12
|
+
# <Description>
|
13
|
+
# This qualification will allow you to earn more on the WebReviews HITs.
|
14
|
+
# </Description>
|
15
|
+
# <Keywords>WebReviews, webreviews, web reviews</Keywords>
|
16
|
+
# <QualificationTypeStatus>Active</QualificationTypeStatus>
|
17
|
+
# <Test>
|
18
|
+
# <QuestionForm xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionForm.xsd">
|
19
|
+
# <Overview>
|
20
|
+
# <Title>WebReviews Survey</Title>
|
21
|
+
# <Text>
|
22
|
+
# After you have filled out this survey you will be assigned one or more qualifications...
|
23
|
+
# </Text>
|
24
|
+
# </Overview>
|
25
|
+
# <Question>
|
26
|
+
# <QuestionIdentifier>age</QuestionIdentifier>
|
27
|
+
# <DisplayName>What is your age?</DisplayName>
|
28
|
+
# <IsRequired>true</IsRequired>
|
29
|
+
# <QuestionContent>
|
30
|
+
# <Text>
|
31
|
+
# Please choose the age group you belong to.
|
32
|
+
# </Text>
|
33
|
+
# </QuestionContent>
|
34
|
+
# <AnswerSpecification>
|
35
|
+
# <SelectionAnswer>
|
36
|
+
# <StyleSuggestion>radiobutton</StyleSuggestion>
|
37
|
+
# <Selections>
|
38
|
+
# <Selection>
|
39
|
+
# <SelectionIdentifier>0018</SelectionIdentifier>
|
40
|
+
# <Text>-18</Text>
|
41
|
+
# </Selection>
|
42
|
+
# <Selection>
|
43
|
+
# <SelectionIdentifier>5160</SelectionIdentifier>
|
44
|
+
# <Text>51-60</Text>
|
45
|
+
# </Selection>
|
46
|
+
# <Selection>
|
47
|
+
# <SelectionIdentifier>6000</SelectionIdentifier>
|
48
|
+
# <Text>60+</Text>
|
49
|
+
# </Selection>
|
50
|
+
# </Selections>
|
51
|
+
# </SelectionAnswer>
|
52
|
+
# </AnswerSpecification>
|
53
|
+
# </Question>
|
54
|
+
# </QuestionForm>
|
55
|
+
# </Test>
|
56
|
+
# <TestDurationInSeconds>1200</TestDurationInSeconds>
|
57
|
+
# </QualificationType>
|
58
|
+
#</SearchQualificationTypesResult>
|
59
|
+
|
60
|
+
class SearchQualificationTypesResponse < Response
|
61
|
+
|
62
|
+
attr_reader :num_results, :total_num_results, :page_number
|
63
|
+
|
64
|
+
def initialize(response)
|
65
|
+
@raw_xml = response.body
|
66
|
+
@xml = Nokogiri::XML(@raw_xml)
|
67
|
+
raise_errors
|
68
|
+
map_content(@xml.xpath('//SearchQualificationTypesResult'),
|
69
|
+
:num_results => 'NumResults',
|
70
|
+
:total_num_results => 'TotalNumResults',
|
71
|
+
:page_number => 'PageNumber'
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
75
|
+
def qualification_types
|
76
|
+
@qualification_types ||= []
|
77
|
+
@xml.xpath('//QualificationType').each do |qualification_type_xml|
|
78
|
+
@qualification_types << QualificationTypeParser.new(qualification_type_xml)
|
79
|
+
end
|
80
|
+
@qualification_types
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
data/lib/rturk/requester.rb
CHANGED
@@ -45,7 +45,12 @@ module RTurk
|
|
45
45
|
end.join('&') # order doesn't matter for the actual request
|
46
46
|
|
47
47
|
RTurk.logger.debug "Sending request:\n\t #{credentials.host}?#{querystring}"
|
48
|
-
|
48
|
+
begin
|
49
|
+
RestClient.post(credentials.host, querystring)
|
50
|
+
rescue RestClient::Exception => e
|
51
|
+
raise ServiceUnavailable if e.http_code == 503
|
52
|
+
raise
|
53
|
+
end
|
49
54
|
end
|
50
55
|
|
51
56
|
private
|
data/lib/rturk/utilities.rb
CHANGED
@@ -29,6 +29,17 @@ module RTurk::Utilities
|
|
29
29
|
tr("-", "_").
|
30
30
|
downcase
|
31
31
|
end
|
32
|
+
|
33
|
+
# Executes the passed in block, retrying in cases of HTTP 503 Status Unvailable Errors
|
34
|
+
def self.retry_on_unavailable(delay=1)
|
35
|
+
begin
|
36
|
+
yield
|
37
|
+
rescue RTurk::ServiceUnavailable => e
|
38
|
+
RTurk.logger.debug "HTTP Error 503: Service Unavailable. Retrying in #{delay} seconds."
|
39
|
+
sleep delay
|
40
|
+
retry
|
41
|
+
end
|
42
|
+
end
|
32
43
|
|
33
44
|
end
|
34
45
|
|
data/lib/rturk/version.rb
CHANGED
@@ -0,0 +1,58 @@
|
|
1
|
+
<SearchQualificationTypesResult>
|
2
|
+
<Request>
|
3
|
+
<IsValid>True</IsValid>
|
4
|
+
</Request>
|
5
|
+
<NumResults>1</NumResults>
|
6
|
+
<TotalNumResults>1</TotalNumResults>
|
7
|
+
<PageNumber>1</PageNumber>
|
8
|
+
<QualificationType>
|
9
|
+
<QualificationTypeId>WKAZMYZDCYCZP412TZEZ</QualificationTypeId>
|
10
|
+
<CreationTime>2009-05-17T10:05:15Z</CreationTime>
|
11
|
+
<Name> WebReviews Qualification Master Test</Name>
|
12
|
+
<Description>
|
13
|
+
This qualification will allow you to earn more on the WebReviews HITs.
|
14
|
+
</Description>
|
15
|
+
<Keywords>WebReviews, webreviews, web reviews</Keywords>
|
16
|
+
<QualificationTypeStatus>Active</QualificationTypeStatus>
|
17
|
+
<Test>
|
18
|
+
<QuestionForm xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionForm.xsd">
|
19
|
+
<Overview>
|
20
|
+
<Title>WebReviews Survey</Title>
|
21
|
+
<Text>
|
22
|
+
After you have filled out this survey you will be assigned one or more qualifications...
|
23
|
+
</Text>
|
24
|
+
</Overview>
|
25
|
+
<Question>
|
26
|
+
<QuestionIdentifier>age</QuestionIdentifier>
|
27
|
+
<DisplayName>What is your age?</DisplayName>
|
28
|
+
<IsRequired>true</IsRequired>
|
29
|
+
<QuestionContent>
|
30
|
+
<Text>
|
31
|
+
Please choose the age group you belong to.
|
32
|
+
</Text>
|
33
|
+
</QuestionContent>
|
34
|
+
<AnswerSpecification>
|
35
|
+
<SelectionAnswer>
|
36
|
+
<StyleSuggestion>radiobutton</StyleSuggestion>
|
37
|
+
<Selections>
|
38
|
+
<Selection>
|
39
|
+
<SelectionIdentifier>0018</SelectionIdentifier>
|
40
|
+
<Text>-18</Text>
|
41
|
+
</Selection>
|
42
|
+
<Selection>
|
43
|
+
<SelectionIdentifier>5160</SelectionIdentifier>
|
44
|
+
<Text>51-60</Text>
|
45
|
+
</Selection>
|
46
|
+
<Selection>
|
47
|
+
<SelectionIdentifier>6000</SelectionIdentifier>
|
48
|
+
<Text>60+</Text>
|
49
|
+
</Selection>
|
50
|
+
</Selections>
|
51
|
+
</SelectionAnswer>
|
52
|
+
</AnswerSpecification>
|
53
|
+
</Question>
|
54
|
+
</QuestionForm>
|
55
|
+
</Test>
|
56
|
+
<TestDurationInSeconds>1200</TestDurationInSeconds>
|
57
|
+
</QualificationType>
|
58
|
+
</SearchQualificationTypesResult>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
2
|
+
|
3
|
+
describe RTurk::SearchQualificationTypes do
|
4
|
+
before(:all) do
|
5
|
+
aws = YAML.load(File.open(File.join(SPEC_ROOT, 'mturk.yml')))
|
6
|
+
RTurk.setup(aws['AWSAccessKeyId'], aws['AWSAccessKey'], :sandbox => true)
|
7
|
+
faker('search_qualification_types', :operation => 'SearchQualificationTypes')
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should ensure required params" do
|
11
|
+
lambda{RTurk::SearchQualificationTypes()}.should raise_error RTurk::MissingParameters
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should successfully request the operation" do
|
15
|
+
RTurk::Requester.should_receive(:request).once.with(
|
16
|
+
hash_including('Operation' => 'SearchQualificationTypes'))
|
17
|
+
RTurk::SearchQualificationTypes({ :must_be_requestable => true }) rescue RTurk::InvalidRequest
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should parse and return the result" do
|
21
|
+
response = RTurk::SearchQualificationTypes({ :must_be_requestable => true })
|
22
|
+
response.num_results.should eql(1)
|
23
|
+
qualification_types = response.qualification_types
|
24
|
+
qualification_types.size.should eql(1)
|
25
|
+
qualification_types.first.qualification_type_id.should eql('WKAZMYZDCYCZP412TZEZ')
|
26
|
+
qualification_types.first.name.should eql('WebReviews Qualification Master Test')
|
27
|
+
qualification_types.first.keywords.should eql('WebReviews, webreviews, web reviews')
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
2
|
+
|
3
|
+
|
4
|
+
describe RTurk::QualificationParser do
|
5
|
+
|
6
|
+
before(:all) do
|
7
|
+
@qualification_xml = <<-XML
|
8
|
+
<Qualification>
|
9
|
+
<QualificationTypeId>789RVWYBAZW00EXAMPLE</QualificationTypeId>
|
10
|
+
<SubjectId>AZ3456EXAMPLE</SubjectId>
|
11
|
+
<GrantTime>2005-01-31T23:59:59Z</GrantTime>
|
12
|
+
<IntegerValue>95</IntegerValue>
|
13
|
+
</Qualification>
|
14
|
+
XML
|
15
|
+
@qualification_xml = Nokogiri::XML(@qualification_xml)
|
16
|
+
@qualification = RTurk::QualificationParser.new(@qualification_xml.children)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should parse an answer" do
|
20
|
+
@qualification.qualification_type_id.should eql('789RVWYBAZW00EXAMPLE')
|
21
|
+
@qualification.subject_id.should eql('AZ3456EXAMPLE')
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
2
|
+
|
3
|
+
|
4
|
+
describe RTurk::QualificationTypeParser do
|
5
|
+
|
6
|
+
before(:all) do
|
7
|
+
@qualification_type_xml = <<-XML
|
8
|
+
<QualificationType>
|
9
|
+
<QualificationTypeId>WKAZMYZDCYCZP412TZEZ</QualificationTypeId>
|
10
|
+
<CreationTime>2009-05-17T10:05:15Z</CreationTime>
|
11
|
+
<Name> WebReviews Qualification Master Test</Name>
|
12
|
+
<Description>
|
13
|
+
This qualification will allow you to earn more on the WebReviews HITs.
|
14
|
+
</Description>
|
15
|
+
<Keywords>WebReviews, webreviews, web reviews</Keywords>
|
16
|
+
<QualificationTypeStatus>Active</QualificationTypeStatus>
|
17
|
+
<Test>
|
18
|
+
<QuestionForm xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionForm.xsd">
|
19
|
+
<Overview>
|
20
|
+
<Title>WebReviews Survey</Title>
|
21
|
+
<Text>
|
22
|
+
After you have filled out this survey you will be assigned one or more qualifications...
|
23
|
+
</Text>
|
24
|
+
</Overview>
|
25
|
+
<Question>
|
26
|
+
<QuestionIdentifier>age</QuestionIdentifier>
|
27
|
+
<DisplayName>What is your age?</DisplayName>
|
28
|
+
<IsRequired>true</IsRequired>
|
29
|
+
<QuestionContent>
|
30
|
+
<Text>
|
31
|
+
Please choose the age group you belong to.
|
32
|
+
</Text>
|
33
|
+
</QuestionContent>
|
34
|
+
<AnswerSpecification>
|
35
|
+
<SelectionAnswer>
|
36
|
+
<StyleSuggestion>radiobutton</StyleSuggestion>
|
37
|
+
<Selections>
|
38
|
+
<Selection>
|
39
|
+
<SelectionIdentifier>0018</SelectionIdentifier>
|
40
|
+
<Text>-18</Text>
|
41
|
+
</Selection>
|
42
|
+
<Selection>
|
43
|
+
<SelectionIdentifier>5160</SelectionIdentifier>
|
44
|
+
<Text>51-60</Text>
|
45
|
+
</Selection>
|
46
|
+
<Selection>
|
47
|
+
<SelectionIdentifier>6000</SelectionIdentifier>
|
48
|
+
<Text>60+</Text>
|
49
|
+
</Selection>
|
50
|
+
</Selections>
|
51
|
+
</SelectionAnswer>
|
52
|
+
</AnswerSpecification>
|
53
|
+
</Question>
|
54
|
+
</QuestionForm>
|
55
|
+
</Test>
|
56
|
+
<TestDurationInSeconds>1200</TestDurationInSeconds>
|
57
|
+
</QualificationType>
|
58
|
+
XML
|
59
|
+
@qualification_type_xml = Nokogiri::XML(@qualification_type_xml)
|
60
|
+
@qualification_type = RTurk::QualificationTypeParser.new(@qualification_type_xml.children)
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should parse an answer" do
|
64
|
+
@qualification_type.qualification_type_id.should eql('WKAZMYZDCYCZP412TZEZ')
|
65
|
+
@qualification_type.status.should eql('Active')
|
66
|
+
@qualification_type.name.should eql('WebReviews Qualification Master Test')
|
67
|
+
@qualification_type.keywords.should eql('WebReviews, webreviews, web reviews')
|
68
|
+
end
|
69
|
+
end
|
data/spec/requester_spec.rb
CHANGED
@@ -48,4 +48,42 @@ describe RTurk::Requester do
|
|
48
48
|
/(?=.*Operation=GetHIT)(?=.*Param1=test1)(?=.*Param2.0=test2a)(?=.*Param2.1=test2b)/)
|
49
49
|
RTurk::Requester.request(params)
|
50
50
|
end
|
51
|
+
|
52
|
+
it "should raise RTurk::ServiceUnavaile on HTTP 503 Errors" do
|
53
|
+
error_503 = RestClient::Exception.new(nil, 503)
|
54
|
+
params = {
|
55
|
+
:Operation => 'GetHIT',
|
56
|
+
'Param1' => 'test1',
|
57
|
+
'Param2' => {0 => 'test2a', 1 => 'test2b'}
|
58
|
+
}
|
59
|
+
RestClient.stub(:post).and_raise(error_503)
|
60
|
+
lambda {
|
61
|
+
RTurk::Requester.request(params)
|
62
|
+
}.should raise_error RTurk::ServiceUnavailable
|
63
|
+
end
|
64
|
+
|
65
|
+
it "should be able to leverage retry_on_unavailable to simplify AWS ServiceUnavailable Errors " do
|
66
|
+
error_503 = RestClient::Exception.new(nil, 503) #ServiceUnavailable
|
67
|
+
error_408 = RestClient::Exception.new(nil, 408) #Timeout
|
68
|
+
params = {
|
69
|
+
:Operation => 'GetHIT',
|
70
|
+
'Param1' => 'test1',
|
71
|
+
'Param2' => {0 => 'test2a', 1 => 'test2b'}
|
72
|
+
}
|
73
|
+
attempts = 0
|
74
|
+
lambda {
|
75
|
+
# Wrap in retry block with delay of 0 seconds
|
76
|
+
RTurk::Utilities.retry_on_unavailable(0) do
|
77
|
+
# Ensure the first request triggers a retry with 503, subsequently raise 408 Timeout
|
78
|
+
if attempts == 0
|
79
|
+
RestClient.stub(:post).and_raise(error_503)
|
80
|
+
else
|
81
|
+
RestClient.stub(:post).and_raise(error_408)
|
82
|
+
end
|
83
|
+
attempts = attempts + 1
|
84
|
+
RTurk::Requester.request(params)
|
85
|
+
end
|
86
|
+
}.should raise_error RestClient::Exception
|
87
|
+
attempts.should eql(2)
|
88
|
+
end
|
51
89
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rturk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,11 +12,11 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2011-11-20 00:00:00.
|
15
|
+
date: 2011-11-20 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rest-client
|
19
|
-
requirement:
|
19
|
+
requirement: !ruby/object:Gem::Requirement
|
20
20
|
none: false
|
21
21
|
requirements:
|
22
22
|
- - ! '>='
|
@@ -24,10 +24,15 @@ dependencies:
|
|
24
24
|
version: 1.4.0
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
|
-
version_requirements:
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.4.0
|
28
33
|
- !ruby/object:Gem::Dependency
|
29
34
|
name: nokogiri
|
30
|
-
requirement:
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
31
36
|
none: false
|
32
37
|
requirements:
|
33
38
|
- - ! '>='
|
@@ -35,10 +40,15 @@ dependencies:
|
|
35
40
|
version: 1.4.1
|
36
41
|
type: :runtime
|
37
42
|
prerelease: false
|
38
|
-
version_requirements:
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ! '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 1.4.1
|
39
49
|
- !ruby/object:Gem::Dependency
|
40
50
|
name: rspec
|
41
|
-
requirement:
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
42
52
|
none: false
|
43
53
|
requirements:
|
44
54
|
- - ~>
|
@@ -46,10 +56,15 @@ dependencies:
|
|
46
56
|
version: 1.3.1
|
47
57
|
type: :development
|
48
58
|
prerelease: false
|
49
|
-
version_requirements:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
61
|
+
requirements:
|
62
|
+
- - ~>
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 1.3.1
|
50
65
|
- !ruby/object:Gem::Dependency
|
51
66
|
name: webmock
|
52
|
-
requirement:
|
67
|
+
requirement: !ruby/object:Gem::Requirement
|
53
68
|
none: false
|
54
69
|
requirements:
|
55
70
|
- - ! '>='
|
@@ -57,7 +72,12 @@ dependencies:
|
|
57
72
|
version: '0'
|
58
73
|
type: :development
|
59
74
|
prerelease: false
|
60
|
-
version_requirements:
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ! '>='
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
61
81
|
description:
|
62
82
|
email: mark@mpercival.com
|
63
83
|
executables: []
|
@@ -207,6 +227,7 @@ files:
|
|
207
227
|
- lib/rturk/operations/reject_qualification_request.rb
|
208
228
|
- lib/rturk/operations/revoke_qualification.rb
|
209
229
|
- lib/rturk/operations/search_hits.rb
|
230
|
+
- lib/rturk/operations/search_qualification_types.rb
|
210
231
|
- lib/rturk/operations/send_test_event_notification.rb
|
211
232
|
- lib/rturk/operations/set_hit_as_reviewing.rb
|
212
233
|
- lib/rturk/operations/set_hit_type_notification.rb
|
@@ -219,6 +240,7 @@ files:
|
|
219
240
|
- lib/rturk/parsers/hit_parser.rb
|
220
241
|
- lib/rturk/parsers/qualification_parser.rb
|
221
242
|
- lib/rturk/parsers/qualification_request_parser.rb
|
243
|
+
- lib/rturk/parsers/qualification_type_parser.rb
|
222
244
|
- lib/rturk/parsers/response.rb
|
223
245
|
- lib/rturk/parsers/responses/create_hit_response.rb
|
224
246
|
- lib/rturk/parsers/responses/get_account_balance_response.rb
|
@@ -231,6 +253,7 @@ files:
|
|
231
253
|
- lib/rturk/parsers/responses/get_reviewable_hits_response.rb
|
232
254
|
- lib/rturk/parsers/responses/register_hit_type_response.rb
|
233
255
|
- lib/rturk/parsers/responses/search_hits_response.rb
|
256
|
+
- lib/rturk/parsers/responses/search_qualification_types_response.rb
|
234
257
|
- lib/rturk/requester.rb
|
235
258
|
- lib/rturk/utilities.rb
|
236
259
|
- lib/rturk/version.rb
|
@@ -270,6 +293,7 @@ files:
|
|
270
293
|
- spec/fake_responses/reject_qualification_request.xml
|
271
294
|
- spec/fake_responses/revoke_qualification.xml
|
272
295
|
- spec/fake_responses/search_hits.xml
|
296
|
+
- spec/fake_responses/search_qualification_types.xml
|
273
297
|
- spec/fake_responses/set_hit_as_reviewing.xml
|
274
298
|
- spec/fake_responses/unblock_worker.xml
|
275
299
|
- spec/fake_responses/update_qualification_type.xml
|
@@ -299,6 +323,7 @@ files:
|
|
299
323
|
- spec/operations/reject_assignment_spec.rb
|
300
324
|
- spec/operations/reject_qualification_request_spec.rb
|
301
325
|
- spec/operations/revoke_qualification_spec.rb
|
326
|
+
- spec/operations/search_qualification_types_spec.rb
|
302
327
|
- spec/operations/send_test_event_notification_spec.rb
|
303
328
|
- spec/operations/set_hit_as_reviewing_spec.rb
|
304
329
|
- spec/operations/set_hit_type_notification_spec.rb
|
@@ -306,6 +331,8 @@ files:
|
|
306
331
|
- spec/operations/update_qualification_type_spec.rb
|
307
332
|
- spec/parsers/answer_parser_spec.rb
|
308
333
|
- spec/parsers/hit_parser_spec.rb
|
334
|
+
- spec/parsers/qualification_parser.rb
|
335
|
+
- spec/parsers/qualification_type_parser_spec.rb
|
309
336
|
- spec/requester_spec.rb
|
310
337
|
- spec/response_spec.rb
|
311
338
|
- spec/rturk_spec.rb
|
@@ -324,9 +351,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
324
351
|
- - ! '>='
|
325
352
|
- !ruby/object:Gem::Version
|
326
353
|
version: '0'
|
327
|
-
segments:
|
328
|
-
- 0
|
329
|
-
hash: 4063312092586136422
|
330
354
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
331
355
|
none: false
|
332
356
|
requirements:
|
@@ -335,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
335
359
|
version: '0'
|
336
360
|
requirements: []
|
337
361
|
rubyforge_project: pulley
|
338
|
-
rubygems_version: 1.8.
|
362
|
+
rubygems_version: 1.8.21
|
339
363
|
signing_key:
|
340
364
|
specification_version: 3
|
341
365
|
summary: Mechanical Turk API Wrapper
|