crowdflower 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
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.3"
8
+ s.version = "0.5.4"
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-10}
12
+ s.date = %q{2011-02-13}
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!
@@ -54,10 +54,8 @@ module CrowdFlower
54
54
  if [:get, :post, :put, :delete].include?(method_id)
55
55
  path, options = *args
56
56
  options ||= {}
57
- options[:body] = default_params.merge(options[:body] || {})
58
57
  options[:query] = (default_params.merge(options[:query] || {}))
59
58
  options[:headers] = (self.class.default_options[:headers].merge(options[:headers] || {}))
60
-
61
59
  self.class.send(method_id, url(path), options)
62
60
  else
63
61
  super
@@ -28,7 +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" )
31
+ put( "#{resource_uri}/#{id}/reject", :headers => { "Content-Length" => 0 } )
32
32
  end
33
33
 
34
34
  protected
@@ -15,23 +15,23 @@ module CrowdFlower
15
15
  def bonus( worker_id, amount, reason=nil )
16
16
  params = { :amount => amount }
17
17
  params.merge!( :reason => reason ) if reason
18
- connection.put( "#{resource_uri}/#{worker_id}/bonus", :body => params )
18
+ connection.post( "#{resource_uri}/#{worker_id}/bonus", :query => params )
19
19
  end
20
20
 
21
21
  def approve( worker_id )
22
- connection.put( "#{resource_uri}/#{worker_id}/approve" )
22
+ connection.put( "#{resource_uri}/#{worker_id}/approve", :headers => { "Content-Length" => "0" } )
23
23
  end
24
24
 
25
25
  def reject( worker_id )
26
- connection.put( "#{resource_uri}/#{worker_id}/reject" )
26
+ connection.put( "#{resource_uri}/#{worker_id}/reject", :headers => { "Content-Length" => "0" } )
27
27
  end
28
28
 
29
29
  def ban( worker_id )
30
- connection.put( "#{resource_uri}/#{worker_id}/ban" )
30
+ connection.put( "#{resource_uri}/#{worker_id}/ban", :headers => { "Content-Length" => "0" } )
31
31
  end
32
32
 
33
33
  def deban( worker_id )
34
- connection.put( "#{resource_uri}/#{worker_id}/deban" )
34
+ connection.put( "#{resource_uri}/#{worker_id}/deban", :headers => { "Content-Length" => "0" } )
35
35
  end
36
36
 
37
37
  def notify( worker_id, subject, message )
@@ -39,16 +39,16 @@ module CrowdFlower
39
39
  :subject => subject,
40
40
  :message => message
41
41
  }
42
- connection.put( "#{resource_uri}/#{worker_id}/notify", :body => params )
42
+ connection.post( "#{resource_uri}/#{worker_id}/notify", :query => params, :headers => { "Content-Length" => "0" } )
43
43
  end
44
44
 
45
45
  def flag( worker_id, reason )
46
46
  params = reason ? { :reason => reason } : nil
47
- connection.put( "#{resource_uri}/#{worker_id}/flag", :body => params )
47
+ connection.put( "#{resource_uri}/#{worker_id}/flag", :query => params, :headers => { "Content-Length" => "0" } )
48
48
  end
49
49
 
50
50
  def deflag( worker_id )
51
- connection.put( "#{resource_uri}/#{worker_id}/deflag" )
51
+ connection.put( "#{resource_uri}/#{worker_id}/deflag", :headers => { "Content-Length" => "0" } )
52
52
  end
53
53
  end
54
54
  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: 13
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 3
10
- version: 0.5.3
9
+ - 4
10
+ version: 0.5.4
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-10 00:00:00 -08:00
19
+ date: 2011-02-13 00:00:00 -08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency