rturk 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rturk/adapters/assignment.rb +14 -5
- data/lib/rturk/parsers/assignment_parser.rb +4 -6
- data/rturk.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.1
|
@@ -1,9 +1,7 @@
|
|
1
1
|
require 'time'
|
2
2
|
|
3
3
|
module RTurk
|
4
|
-
|
5
4
|
class Assignment
|
6
|
-
|
7
5
|
attr_reader :id, :source
|
8
6
|
|
9
7
|
def initialize(id, source = nil)
|
@@ -21,16 +19,27 @@ module RTurk
|
|
21
19
|
def bonus!(amount, reason)
|
22
20
|
RTurk::GrantBonus(:assignment_id => self.id, :worker_id => self.worker_id, :amount => amount, :feedback => reason)
|
23
21
|
end
|
24
|
-
|
22
|
+
|
25
23
|
def worker
|
26
24
|
RTurk::Worker.new(self.worker_id)
|
27
25
|
end
|
28
|
-
|
26
|
+
|
27
|
+
def submitted?
|
28
|
+
status == 'Submitted'
|
29
|
+
end
|
30
|
+
|
31
|
+
def approved?
|
32
|
+
status == 'Approved'
|
33
|
+
end
|
34
|
+
|
35
|
+
def rejected?
|
36
|
+
status == 'Rejected'
|
37
|
+
end
|
38
|
+
|
29
39
|
def method_missing(method, *args)
|
30
40
|
if self.source.respond_to?(method)
|
31
41
|
self.source.send(method, *args)
|
32
42
|
end
|
33
43
|
end
|
34
44
|
end
|
35
|
-
|
36
45
|
end
|
@@ -20,11 +20,10 @@
|
|
20
20
|
# </Assignment>
|
21
21
|
|
22
22
|
module RTurk
|
23
|
-
|
24
23
|
class AssignmentParser < RTurk::Parser
|
25
|
-
|
26
|
-
attr_reader :assignment_id, :hit_id, :worker_id, :status, :accepted_at,
|
27
|
-
:approved_at, :auto_approval_time
|
24
|
+
|
25
|
+
attr_reader :assignment_id, :hit_id, :worker_id, :status, :accepted_at,
|
26
|
+
:submitted_at, :approved_at, :auto_approval_time
|
28
27
|
|
29
28
|
def initialize(assignment_xml)
|
30
29
|
@xml_obj = assignment_xml
|
@@ -51,6 +50,5 @@ module RTurk
|
|
51
50
|
def normalized_answers
|
52
51
|
normalize_nested_params(answers)
|
53
52
|
end
|
54
|
-
|
55
53
|
end
|
56
|
-
end
|
54
|
+
end
|
data/rturk.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rturk}
|
8
|
-
s.version = "2.2.
|
8
|
+
s.version = "2.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mark Percival"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-07-08}
|
13
13
|
s.email = %q{mark@mpercival.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 2.2.
|
8
|
+
- 1
|
9
|
+
version: 2.2.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Mark Percival
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-07-08 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|