fgraph 0.6.0 → 0.6.1

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.
@@ -1,5 +1,5 @@
1
1
  ---
2
- :patch: 0
3
- :build:
4
2
  :major: 0
3
+ :build:
5
4
  :minor: 6
5
+ :patch: 1
@@ -62,7 +62,9 @@ module FGraph
62
62
  def url_options(url)
63
63
  return unless url
64
64
 
65
- uri = URI.parse(url)
65
+ # Note: FB pass access token with '|' character, which cause URI::InvalidURIError
66
+ uri = URI.parse(url.gsub('|', '%7C'))
67
+
66
68
  options = {}
67
69
  uri.query.split('&').each do |param_set|
68
70
  param_set = param_set.split('=')
@@ -289,8 +289,8 @@ class FGraphTest < Test::Unit::TestCase
289
289
  {"name"=>"Rosemary Schapira", "id"=>"100000237306697"}
290
290
  ],
291
291
  "paging"=> {
292
- "previous"=> "https://graph.facebook.com/756314021/friends?offset=0&limit=2&access_token=101507589896698",
293
- "next"=> "https://graph.facebook.com/756314021/friends?offset=4&limit=2&access_token=101507589896698"
292
+ "previous"=> "https://graph.facebook.com/756314021/friends?offset=0&limit=2&access_token=101507589896698|1234",
293
+ "next"=> "https://graph.facebook.com/756314021/friends?offset=4&limit=2&access_token=101507589896698|1234"
294
294
  }
295
295
  }
296
296
 
@@ -299,8 +299,8 @@ class FGraphTest < Test::Unit::TestCase
299
299
  assert_equal response['data'].first, collection.first
300
300
  assert_equal response['paging']['next'], collection.next_url
301
301
  assert_equal response['paging']['previous'], collection.previous_url
302
- assert_equal({'offset' => '0', 'limit' => '2', 'access_token' => '101507589896698'}, collection.previous_options)
303
- assert_equal({'offset' => '4', 'limit' => '2', 'access_token' => '101507589896698'}, collection.next_options)
302
+ assert_equal({'offset' => '0', 'limit' => '2', 'access_token' => '101507589896698|1234'}, collection.previous_options)
303
+ assert_equal({'offset' => '4', 'limit' => '2', 'access_token' => '101507589896698|1234'}, collection.next_options)
304
304
  end
305
305
  end
306
306
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fgraph
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 0
10
- version: 0.6.0
9
+ - 1
10
+ version: 0.6.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Herryanto Siatono
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-25 00:00:00 +08:00
18
+ date: 2011-05-06 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency