{"action":"published","release":{"url":"https://api.github.com/repos/altmetric/embiggen/releases/2165286","assets_url":"https://api.github.com/repos/altmetric/embiggen/releases/2165286/assets","upload_url":"https://uploads.github.com/repos/altmetric/embiggen/releases/2165286/assets{?name,label}","html_url":"https://github.com/altmetric/embiggen/releases/tag/v1.0.0","id":2165286,"tag_name":"v1.0.0","target_commitish":"master","name":"1.0.0","draft":false,"author":{"login":"mudge","id":287,"avatar_url":"https://avatars.githubusercontent.com/u/287?v=3","gravatar_id":"","url":"https://api.github.com/users/mudge","html_url":"https://github.com/mudge","followers_url":"https://api.github.com/users/mudge/followers","following_url":"https://api.github.com/users/mudge/following{/other_user}","gists_url":"https://api.github.com/users/mudge/gists{/gist_id}","starred_url":"https://api.github.com/users/mudge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mudge/subscriptions","organizations_url":"https://api.github.com/users/mudge/orgs","repos_url":"https://api.github.com/users/mudge/repos","events_url":"https://api.github.com/users/mudge/events{/privacy}","received_events_url":"https://api.github.com/users/mudge/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2015-11-21T14:36:02Z","published_at":"2015-11-21T15:17:54Z","assets":[],"tarball_url":"https://api.github.com/repos/altmetric/embiggen/tarball/v1.0.0","zipball_url":"https://api.github.com/repos/altmetric/embiggen/zipball/v1.0.0","body":"Simplify Embiggen's API by exposing a single `expand` method (rather than two separate `expand` and `expand!` methods).\r\n\r\nThis means that Embiggen will no longer return sum types on `expand` (encapsulating errors and exceptions) but raise exceptions if any of the following situations occur:\r\n\r\n* `Embiggen::TooManyRedirects`: when a URI redirects more than the configured number of times;\r\n* `Embiggen::BadShortenedURI`: when a URI appears to be shortened but following it does not result in a valid redirect;\r\n* `Embiggen::NetworkError`: when an error occurs during expansion (e.g. a network timeout, connection reset, unreachable host, etc.).\r\n\r\nAll of the above inherit from `Embiggen::Error` and have a `uri` method for determining the problematic URI.\r\n\r\nIf you're upgrading from the 0.x line of Embiggen, this means you will now need to catch the above errors to preserve the same behaviour.\r\n\r\nThe other API change is in the list of shorteners used by Embiggen to determine whether to follow a link or not: `Embiggen::Configuration.shorteners` is now an object which has an `include?` method that takes a single URI and returns `true` if it is shortened.\r\n\r\nBy default, this object is an instance of `Embiggen::ShortenerList` and contains a set of domains and returns true on `include?` if a URI's host matches one of the set.\r\n\r\n```ruby\r\nshorteners = Embiggen::ShortenerList.new(%w(bit.ly example.com))\r\nshorteners.include?(URI('http://bit.ly/foo')) #=> true\r\nshorteners.include?(URI('http://example.com/bar')) #=> true\r\nshorteners.include?(URI('http://notashortener.com/baz')) #=> false\r\n```\r\n\r\nThis means you can plug in your own implementations, e.g. to query Bitly's API or to expand *all* URIs regardless of domain.\r\n\r\nInstall the latest version from RubyGems like so:\r\n\r\n```console\r\n$ gem install embiggen -v '~> 1.0'\r\n```\r\n\r\nOr, add to your Gemfile like so:\r\n\r\n```ruby\r\ngem 'embiggen', '~> 1.0'\r\n```"}}