rturk 2.5.2 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,8 @@
1
+ 2.6.0
2
+ -----
3
+ * Adding IntegerValue attribute to AssignQualification from Ross
4
+ Hale [rosshale]
5
+
1
6
  2.5.2
2
7
  -----
3
8
  * Update to 2.5.2 with correct publish date. Sorry about the mixup here.
@@ -2,13 +2,14 @@
2
2
 
3
3
  module RTurk
4
4
  class AssignQualification < Operation
5
- attr_accessor :qualification_type_id, :worker_id, :send_notification
5
+ attr_accessor :qualification_type_id, :worker_id, :send_notification, :integer_value
6
6
  require_params :qualification_type_id, :worker_id
7
7
 
8
8
  def to_params
9
9
  {'QualificationTypeId' => qualification_type_id,
10
10
  'WorkerId' => worker_id,
11
- 'SendNotification' => (!!send_notification).to_s}
11
+ 'SendNotification' => (!!send_notification).to_s,
12
+ 'IntegerValue' => integer_value}
12
13
  end
13
14
  end
14
15
 
data/lib/rturk/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RTurk
2
- VERSION = "2.5.2"
2
+ VERSION = "2.6.0"
3
3
  end
@@ -13,14 +13,16 @@ describe RTurk::AssignQualification do
13
13
 
14
14
  it "should successfully request the operation" do
15
15
  RTurk::Requester.should_receive(:request).once.with(
16
- hash_including('Operation' => 'AssignQualification'))
16
+ hash_including('Operation' => 'AssignQualification', 'IntegerValue' => 80))
17
17
  RTurk::AssignQualification(:qualification_type_id => "123456789",
18
- :worker_id => "ABCDEF1234") rescue RTurk::InvalidRequest
18
+ :worker_id => "ABCDEF1234",
19
+ :integer_value => 80) rescue RTurk::InvalidRequest
19
20
  end
20
21
 
21
22
  it "should parse and return the result" do
22
23
  RTurk::AssignQualification(:qualification_type_id => "123456789",
23
- :worker_id => "ABCDEF1234").elements.should eql(
24
+ :worker_id => "ABCDEF1234",
25
+ :integer_value => 80).elements.should eql(
24
26
  {"AssignQualificationResult"=>{"Request"=>{"IsValid"=>"True"}}}
25
27
  )
26
28
  end
metadata CHANGED
@@ -1,15 +1,10 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rturk
3
- version: !ruby/object:Gem::Version
4
- hash: 31
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.6.0
5
5
  prerelease:
6
- segments:
7
- - 2
8
- - 5
9
- - 2
10
- version: 2.5.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Mark Percival
14
9
  - Zach Hale
15
10
  - David Balatero
@@ -17,82 +12,60 @@ authors:
17
12
  autorequire:
18
13
  bindir: bin
19
14
  cert_chain: []
20
-
21
- date: 2011-11-20 00:00:00 -08:00
22
- default_executable:
23
- dependencies:
24
- - !ruby/object:Gem::Dependency
15
+ date: 2011-11-20 00:00:00.000000000Z
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
25
18
  name: rest-client
26
- prerelease: false
27
- requirement: &id001 !ruby/object:Gem::Requirement
19
+ requirement: &17133880 !ruby/object:Gem::Requirement
28
20
  none: false
29
- requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- hash: 7
33
- segments:
34
- - 1
35
- - 4
36
- - 0
21
+ requirements:
22
+ - - ! '>='
23
+ - !ruby/object:Gem::Version
37
24
  version: 1.4.0
38
25
  type: :runtime
39
- version_requirements: *id001
40
- - !ruby/object:Gem::Dependency
41
- name: nokogiri
42
26
  prerelease: false
43
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ version_requirements: *17133880
28
+ - !ruby/object:Gem::Dependency
29
+ name: nokogiri
30
+ requirement: &17133340 !ruby/object:Gem::Requirement
44
31
  none: false
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- hash: 5
49
- segments:
50
- - 1
51
- - 4
52
- - 1
32
+ requirements:
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
53
35
  version: 1.4.1
54
36
  type: :runtime
55
- version_requirements: *id002
56
- - !ruby/object:Gem::Dependency
57
- name: rspec
58
37
  prerelease: false
59
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ version_requirements: *17133340
39
+ - !ruby/object:Gem::Dependency
40
+ name: rspec
41
+ requirement: &17132800 !ruby/object:Gem::Requirement
60
42
  none: false
61
- requirements:
43
+ requirements:
62
44
  - - ~>
63
- - !ruby/object:Gem::Version
64
- hash: 25
65
- segments:
66
- - 1
67
- - 3
68
- - 1
45
+ - !ruby/object:Gem::Version
69
46
  version: 1.3.1
70
47
  type: :development
71
- version_requirements: *id003
72
- - !ruby/object:Gem::Dependency
73
- name: webmock
74
48
  prerelease: false
75
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ version_requirements: *17132800
50
+ - !ruby/object:Gem::Dependency
51
+ name: webmock
52
+ requirement: &17132280 !ruby/object:Gem::Requirement
76
53
  none: false
77
- requirements:
78
- - - ">="
79
- - !ruby/object:Gem::Version
80
- hash: 3
81
- segments:
82
- - 0
83
- version: "0"
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
84
58
  type: :development
85
- version_requirements: *id004
59
+ prerelease: false
60
+ version_requirements: *17132280
86
61
  description:
87
62
  email: mark@mpercival.com
88
63
  executables: []
89
-
90
64
  extensions: []
91
-
92
- extra_rdoc_files:
65
+ extra_rdoc_files:
93
66
  - LICENSE
94
67
  - README.markdown
95
- files:
68
+ files:
96
69
  - .gitignore
97
70
  - .gitmodules
98
71
  - .yardoc
@@ -339,114 +312,31 @@ files:
339
312
  - spec/spec_helper.rb
340
313
  - spec/tmp
341
314
  - spec/xml_parse_spec.rb
342
- has_rdoc: true
343
315
  homepage: http://github.com/mdp/rturk
344
316
  licenses: []
345
-
346
317
  post_install_message:
347
318
  rdoc_options: []
348
-
349
- require_paths:
319
+ require_paths:
350
320
  - lib
351
- required_ruby_version: !ruby/object:Gem::Requirement
321
+ required_ruby_version: !ruby/object:Gem::Requirement
352
322
  none: false
353
- requirements:
354
- - - ">="
355
- - !ruby/object:Gem::Version
356
- hash: 3
357
- segments:
323
+ requirements:
324
+ - - ! '>='
325
+ - !ruby/object:Gem::Version
326
+ version: '0'
327
+ segments:
358
328
  - 0
359
- version: "0"
360
- required_rubygems_version: !ruby/object:Gem::Requirement
329
+ hash: 4063312092586136422
330
+ required_rubygems_version: !ruby/object:Gem::Requirement
361
331
  none: false
362
- requirements:
363
- - - ">="
364
- - !ruby/object:Gem::Version
365
- hash: 3
366
- segments:
367
- - 0
368
- version: "0"
332
+ requirements:
333
+ - - ! '>='
334
+ - !ruby/object:Gem::Version
335
+ version: '0'
369
336
  requirements: []
370
-
371
337
  rubyforge_project: pulley
372
- rubygems_version: 1.6.2
338
+ rubygems_version: 1.8.10
373
339
  signing_key:
374
340
  specification_version: 3
375
341
  summary: Mechanical Turk API Wrapper
376
- test_files:
377
- - spec/adapters/assignment_spec.rb
378
- - spec/adapters/hit_spec.rb
379
- - spec/builders/notification_builder_spec.rb
380
- - spec/builders/qualification_spec.rb
381
- - spec/builders/qualifications_spec.rb
382
- - spec/builders/question_spec.rb
383
- - spec/fake_responses/approve_assignment.xml
384
- - spec/fake_responses/assign_qualification.xml
385
- - spec/fake_responses/block_worker.xml
386
- - spec/fake_responses/create_hit.xml
387
- - spec/fake_responses/create_qualification_type.xml
388
- - spec/fake_responses/disable_hit.xml
389
- - spec/fake_responses/dispose_hit.xml
390
- - spec/fake_responses/dispose_qualification_type.xml
391
- - spec/fake_responses/extend_hit.xml
392
- - spec/fake_responses/force_expire_hit.xml
393
- - spec/fake_responses/get_account_balance.xml
394
- - spec/fake_responses/get_assignments.xml
395
- - spec/fake_responses/get_assignments_multiple.xml
396
- - spec/fake_responses/get_bonus_payments.xml
397
- - spec/fake_responses/get_hit.xml
398
- - spec/fake_responses/get_qualification_requests.xml
399
- - spec/fake_responses/get_qualification_type.xml
400
- - spec/fake_responses/get_qualifications_for_qualification_type.xml
401
- - spec/fake_responses/get_reviewable_hits.xml
402
- - spec/fake_responses/grant_bonus.xml
403
- - spec/fake_responses/grant_qualification.xml
404
- - spec/fake_responses/invalid_credentials.xml
405
- - spec/fake_responses/notify_workers.xml
406
- - spec/fake_responses/register_hit_type.xml
407
- - spec/fake_responses/reject_assignment.xml
408
- - spec/fake_responses/reject_qualification_request.xml
409
- - spec/fake_responses/revoke_qualification.xml
410
- - spec/fake_responses/search_hits.xml
411
- - spec/fake_responses/set_hit_as_reviewing.xml
412
- - spec/fake_responses/unblock_worker.xml
413
- - spec/fake_responses/update_qualification_type.xml
414
- - spec/mturk.sample.yml
415
- - spec/operations/approve_assignment_spec.rb
416
- - spec/operations/assign_qualification_spec.rb
417
- - spec/operations/block_worker_spec.rb
418
- - spec/operations/create_hit_spec.rb
419
- - spec/operations/create_qualification_type_spec.rb
420
- - spec/operations/disable_hit_spec.rb
421
- - spec/operations/dispose_hit_spec.rb
422
- - spec/operations/dispose_qualification_type_spec.rb
423
- - spec/operations/extend_hit_spec.rb
424
- - spec/operations/force_expire_hit_spec.rb
425
- - spec/operations/get_account_balance_spec.rb
426
- - spec/operations/get_assignments_spec.rb
427
- - spec/operations/get_bonus_payments_spec.rb
428
- - spec/operations/get_hit_spec.rb
429
- - spec/operations/get_qualification_requests_spec.rb
430
- - spec/operations/get_qualification_type_spec.rb
431
- - spec/operations/get_qualifications_for_qualification_type_spec.rb
432
- - spec/operations/get_reviewable_hits_spec.rb
433
- - spec/operations/grant_bonus_spec.rb
434
- - spec/operations/grant_qualification_spec.rb
435
- - spec/operations/notify_workers_spec.rb
436
- - spec/operations/register_hit_type_spec.rb
437
- - spec/operations/reject_assignment_spec.rb
438
- - spec/operations/reject_qualification_request_spec.rb
439
- - spec/operations/revoke_qualification_spec.rb
440
- - spec/operations/send_test_event_notification_spec.rb
441
- - spec/operations/set_hit_as_reviewing_spec.rb
442
- - spec/operations/set_hit_type_notification_spec.rb
443
- - spec/operations/unblock_worker_spec.rb
444
- - spec/operations/update_qualification_type_spec.rb
445
- - spec/parsers/answer_parser_spec.rb
446
- - spec/parsers/hit_parser_spec.rb
447
- - spec/requester_spec.rb
448
- - spec/response_spec.rb
449
- - spec/rturk_spec.rb
450
- - spec/spec_helper.rb
451
- - spec/tmp
452
- - spec/xml_parse_spec.rb
342
+ test_files: []