joelind-koala 0.8.3 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake'
4
4
  require 'echoe'
5
5
 
6
6
  # gem management
7
- Echoe.new('joelind-koala', '0.8.3') do |p|
7
+ Echoe.new('joelind-koala', '0.8.4') do |p|
8
8
  p.summary = "A lightweight, flexible library for Facebook with support for the Graph API, the old REST API, realtime updates, and OAuth validation."
9
9
  p.description = "Koala is a lightweight, flexible Ruby SDK for Facebook. It allows read/write access to the social graph via the Graph API and the older REST API, as well as support for realtime updates and OAuth and Facebook Connect authentication. Koala is fully tested and supports Net::HTTP and Typhoeus connections out of the box and can accept custom modules for other services. Build of 0.8.1 for testing compatibility."
10
10
  p.url = "http://github.com/joelind/koala"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{joelind-koala}
5
- s.version = "0.8.3"
5
+ s.version = "0.8.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Alex Koppel, Chris Baclig, Rafi Jacoby, Context Optional, Joe Lind"]
@@ -55,9 +55,6 @@ module Koala
55
55
  # make the request via the provided service
56
56
  result = Koala.make_request(path, args, verb, options)
57
57
 
58
- # make sure the path has a leading / for compatibility with some testing librariess
59
- path = "/#{path}" unless path =~ /^\//
60
-
61
58
  # Check for any 500 errors before parsing the body
62
59
  # since we're not guaranteed that the body is valid JSON
63
60
  # in the case of a server error
@@ -19,6 +19,9 @@ module Koala
19
19
  # We translate args to a valid query string. If post is specified,
20
20
  # we send a POST request to the given path with the given arguments.
21
21
 
22
+ # make sure the path has a leading / for compatibility with some testing librariess
23
+ path = "/#{path}" unless path =~ /^\//
24
+
22
25
  # if the verb isn't get or post, send it as a post argument
23
26
  args.merge!({:method => verb}) && verb = "post" if verb != "get" && verb != "post"
24
27
 
@@ -76,7 +76,7 @@ class NetHTTPServiceTests < Test::Unit::TestCase
76
76
 
77
77
  it "should go to the specified path" do
78
78
  path = mock('Path')
79
- @http_yield_mock.should_receive(:post).with(path, anything).and_return(@http_request_result)
79
+ @http_yield_mock.should_receive(:post).with("/#{path}", anything).and_return(@http_request_result)
80
80
 
81
81
  Bear.make_request(path, {}, 'post')
82
82
  end
@@ -105,7 +105,7 @@ class NetHTTPServiceTests < Test::Unit::TestCase
105
105
  args = {}
106
106
 
107
107
  Bear.should_receive(:encode_params).with(args).and_return(params)
108
- @http_yield_mock.should_receive(:get).with("#{path}?#{params}").and_return(@http_request_result)
108
+ @http_yield_mock.should_receive(:get).with("/#{path}?#{params}").and_return(@http_request_result)
109
109
 
110
110
  Bear.make_request(path, args, 'get')
111
111
  end
@@ -178,4 +178,4 @@ class NetHTTPServiceTests < Test::Unit::TestCase
178
178
  end
179
179
  end
180
180
  end
181
- end
181
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - 3
9
- version: 0.8.3
8
+ - 4
9
+ version: 0.8.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alex Koppel, Chris Baclig, Rafi Jacoby, Context Optional, Joe Lind