Skip to content
This repository
Browse code

Parse paging urls with Addressable::URI. Issue: Non-encoded urls that…

… Facebook passes back were failing to parse.
  • Loading branch information...
commit 41956ffd962dbc8f64e958200a93cb800e0b5568 1 parent e504f67
Brian Norton bnorton authored
2  Gemfile
@@ -15,7 +15,7 @@ group :development, :test do
15 15 if RUBY_PLATFORM =~ /darwin/
16 16 # OS X integration
17 17 gem "ruby_gntp"
18   - gem "rb-fsevent", :git => 'git://github.com/ttilley/rb-fsevent.git', :branch => 'pre-compiled-gem-one-off'
  18 + gem "rb-fsevent"
19 19 end
20 20 end
21 21
1  koala.gemspec
@@ -22,6 +22,7 @@ Gem::Specification.new do |gem|
22 22
23 23 gem.add_runtime_dependency(%q<multi_json>, ["~> 1.3"])
24 24 gem.add_runtime_dependency(%q<faraday>, ["~> 0.8"])
  25 + gem.add_runtime_dependency(%q<addressable>, ["~> 2.2"])
25 26 gem.add_development_dependency(%q<rspec>, ["~> 2.8"])
26 27 gem.add_development_dependency(%q<rake>, ["~> 0.8"])
27 28 end
4 lib/koala/api/graph_collection.rb
... ... @@ -1,3 +1,5 @@
  1 +require 'addressable/uri'
  2 +
1 3 module Koala
2 4 module Facebook
3 5 class API
@@ -87,7 +89,7 @@ def parse_page_url(url)
87 89 #
88 90 # @return an array of parameters that can be provided via graph_call(*parsed_params)
89 91 def self.parse_page_url(url)
90   - uri = URI.parse(url)
  92 + uri = Addressable::URI.parse(url)
91 93
92 94 base = uri.path.sub(/^\//, '')
93 95 params = CGI.parse(uri.query)

0 comments on commit 41956ff

Please sign in to comment.
Something went wrong with that request. Please try again.