crowdflower 0.5.6 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/crowdflower.gemspec +4 -3
- data/lib/crowdflower/base.rb +1 -1
- data/lib/crowdflower/judgment.rb +4 -14
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.7
|
data/crowdflower.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{crowdflower}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brian P O'Rourke", "Chris Van Pelt"]
|
12
|
-
s.date = %q{2011-02-
|
12
|
+
s.date = %q{2011-02-22}
|
13
13
|
s.description = %q{A toolkit for interacting with CrowdFlower via the REST API.
|
14
14
|
|
15
15
|
This is alpha software. Have fun!
|
@@ -43,13 +43,14 @@ This is alpha software. Have fun!
|
|
43
43
|
]
|
44
44
|
s.homepage = %q{http://github.com/dolores/ruby-crowdflower}
|
45
45
|
s.require_paths = ["lib"]
|
46
|
-
s.rubygems_version = %q{1.
|
46
|
+
s.rubygems_version = %q{1.3.7}
|
47
47
|
s.summary = %q{a toolkit for the CrowdFlower API}
|
48
48
|
s.test_files = [
|
49
49
|
"test/integration_tests.rb"
|
50
50
|
]
|
51
51
|
|
52
52
|
if s.respond_to? :specification_version then
|
53
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
53
54
|
s.specification_version = 3
|
54
55
|
|
55
56
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
data/lib/crowdflower/base.rb
CHANGED
data/lib/crowdflower/judgment.rb
CHANGED
@@ -14,12 +14,12 @@ module CrowdFlower
|
|
14
14
|
|
15
15
|
#Pull every judgment
|
16
16
|
def all(page = 1, limit = 100, latest = true)
|
17
|
-
opts =
|
18
|
-
get(resource_uri, {:query => {:limit => limit, :page => page}.merge(opts)})
|
17
|
+
opts = connection.version == 2 ? {:unseen => latest} : {:latest => latest}
|
18
|
+
connection.get(resource_uri, {:query => {:limit => limit, :page => page}.merge(opts)})
|
19
19
|
end
|
20
20
|
|
21
21
|
def get(id)
|
22
|
-
get("#{resource_uri}/#{id}")
|
22
|
+
connection.get("#{resource_uri}/#{id}")
|
23
23
|
end
|
24
24
|
|
25
25
|
# Reject an individual Judgment.
|
@@ -28,17 +28,7 @@ module CrowdFlower
|
|
28
28
|
#
|
29
29
|
# @param [String,Integer] id The CrowdFlower id for the judgment to reject.
|
30
30
|
def reject( id )
|
31
|
-
put( "#{resource_uri}/#{id}/reject", :headers => { "Content-Length" => "0" } )
|
32
|
-
end
|
33
|
-
|
34
|
-
protected
|
35
|
-
|
36
|
-
def put( *args )
|
37
|
-
connection.put *args
|
38
|
-
end
|
39
|
-
|
40
|
-
def get( *args )
|
41
|
-
connection.get *args
|
31
|
+
connection.put( "#{resource_uri}/#{id}/reject", :headers => { "Content-Length" => "0" } )
|
42
32
|
end
|
43
33
|
end
|
44
34
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crowdflower
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 8
|
10
|
+
version: 0.5.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian P O'Rourke
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-02-
|
19
|
+
date: 2011-02-22 00:00:00 -08:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|