arsduo/koala — pull request #405 by deviousdodo (2014-09-18 23:08:41+00:00)
Title: Do not insert an api version if the path already includes one

Currently `GraphCollection` pagination is broken if an API version is specified globally, because Facebook provides the `next`/`prev` URLs with the version already present while Koala always inserts a version if one is specified.

How to reproduce:
```ruby
> Koala.config.api_version = 'v2.1'
> api = Koala::Facebook::API.new('token')
> collection = api.get_connections('276790282344380', 'feed', limit: 10)
D, [2014-09-18T14:47:29.203382 #12851] DEBUG -- : GET: /v2.1/276790282344380/feed params: {"limit"=>10, "access_token"=>"token"}
> collection.next_page
D, [2014-09-18T14:52:06.898021 #13354] DEBUG -- : GET: /v2.1/v2.1/276790282344380/feed params: {"limit"=>"10", "access_token"=>"token", "until"=>"1410506382"}
Koala::Facebook::AuthenticationError: type: OAuthException, code: 2500, message: Unknown path components: /276790282344380/feed [HTTP 400]
```

The fix ensures that an API version is inserted into the path only if it doesn't already include one.