Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
Showing with 5 additions and 2 deletions.
  1. +1 −1  Gemfile
  2. +1 −0  koala.gemspec
  3. +3 −1 lib/koala/api/graph_collection.rb
2  Gemfile
View
@@ -15,7 +15,7 @@ group :development, :test do
if RUBY_PLATFORM =~ /darwin/
# OS X integration
gem "ruby_gntp"
- gem "rb-fsevent", :git => 'git://github.com/ttilley/rb-fsevent.git', :branch => 'pre-compiled-gem-one-off'
+ gem "rb-fsevent"
end
end
1  koala.gemspec
View
@@ -22,6 +22,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency(%q<multi_json>, ["~> 1.3"])
gem.add_runtime_dependency(%q<faraday>, ["~> 0.8"])
+ gem.add_runtime_dependency(%q<addressable>, ["~> 2.2"])
gem.add_development_dependency(%q<rspec>, ["~> 2.8"])
gem.add_development_dependency(%q<rake>, ["~> 0.8"])
end
4 lib/koala/api/graph_collection.rb
View
@@ -1,3 +1,5 @@
+require 'addressable/uri'
+
module Koala
module Facebook
class API
@@ -87,7 +89,7 @@ def parse_page_url(url)
#
# @return an array of parameters that can be provided via graph_call(*parsed_params)
def self.parse_page_url(url)
- uri = URI.parse(url)
+ uri = Addressable::URI.parse(url)
base = uri.path.sub(/^\//, '')
params = CGI.parse(uri.query)
Please sign in to comment.
Something went wrong with that request. Please try again.