A Webfinger utility for Ruby
Go to file
Yamagishi Kazutoshi 29dce59043 Cast HTTP response body for JSON to string (regression from #4) (#5)
Oj uses `readpartial` instead of `to_s` if the value given for the arguments has a `readpartial` method.
Also, HTTP.rb splits the response if `Transfer-Encoding: chunked` is returned in the HTTP headers.

Will use `to_s` like `JSON.parse` which was used previously.
2017-08-04 14:05:28 +02:00
lib Cast HTTP response body for JSON to string (regression from #4) (#5) 2017-08-04 14:05:28 +02:00
spec Update dependencies, do not mask HTTP/OpenSSL exceptions, do not fallback to HTTP (#4) 2017-07-19 23:36:11 +02:00
.gitignore Add timeouts to requests, update dependencies, bump to 1.0.3 2016-09-20 01:09:05 +02:00
.rspec Add timeouts to requests, update dependencies, bump to 1.0.3 2016-09-20 01:09:05 +02:00
.rubocop.yml Update dependencies, do not mask HTTP/OpenSSL exceptions, do not fallback to HTTP (#4) 2017-07-19 23:36:11 +02:00
.ruby-version Update dependencies, do not mask HTTP/OpenSSL exceptions, do not fallback to HTTP (#4) 2017-07-19 23:36:11 +02:00
.travis.yml Update dependencies, do not mask HTTP/OpenSSL exceptions, do not fallback to HTTP (#4) 2017-07-19 23:36:11 +02:00
Gemfile Add timeouts to requests, update dependencies, bump to 1.0.3 2016-09-20 01:09:05 +02:00
Gemfile.lock Update dependencies, do not mask HTTP/OpenSSL exceptions, do not fallback to HTTP (#4) 2017-07-19 23:36:11 +02:00
LICENSE Adding gem version badge to README 2016-02-17 16:36:19 +01:00
README.md Update dependencies, do not mask HTTP/OpenSSL exceptions, do not fallback to HTTP (#4) 2017-07-19 23:36:11 +02:00
Rakefile Adding travis CI 2016-02-18 01:44:36 +01:00
goldfinger.gemspec Update dependencies, do not mask HTTP/OpenSSL exceptions, do not fallback to HTTP (#4) 2017-07-19 23:36:11 +02:00

README.md

Goldfinger, a WebFinger client for Ruby

Gem Version Build Status Dependency Status

A WebFinger client for Ruby. Supports application/xrd+xml and application/jrd+json responses. Raises Goldfinger::NotFoundError on failure to fetch the Webfinger or XRD data, can also raise HTTP:Error or OpenSSL::SSL::SSLError if something is wrong with the HTTPS connection it uses.

  • Does not fall back to HTTP if HTTPS is not available
  • Does check host-meta XRD, but only if the standard WebFinger path yielded no result

Installation

gem install goldfinger

Usage

data = Goldfinger.finger('acct:gargron@quitter.no')

data.link('http://schemas.google.com/g/2010#updates-from').href
# => "https://quitter.no/api/statuses/user_timeline/7477.atom"

data.aliases
# => ["https://quitter.no/user/7477", "https://quitter.no/gargron"]

data.subject
# => "acct:gargron@quitter.no"

RFC support

The official WebFinger RFC is 7033.