mirror of https://github.com/mastodon/goldfinger
Adding gem version badge to README
This commit is contained in:
parent
d045107c18
commit
8b0d7af683
20
LICENSE
20
LICENSE
|
@ -0,0 +1,20 @@
|
|||
Copyright (c) 2016 Eugen Rochko
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,6 +1,10 @@
|
|||
Goldfinger, a Webfinger client for Ruby
|
||||
=======================================
|
||||
|
||||
[![Gem Version](http://img.shields.io/gem/v/goldfinger.svg)][gem]
|
||||
|
||||
[gem]: https://rubygems.org/gems/goldfinger
|
||||
|
||||
A Webfinger client for Ruby. Supports `application/xrd+xml` and `application/jrd+json` responses. Raises `Goldfinger::Error::NotFound` on failure to fetch the Webfinger or XRD data.
|
||||
|
||||
## Installation
|
||||
|
@ -12,3 +16,7 @@ A Webfinger client for Ruby. Supports `application/xrd+xml` and `application/jrd
|
|||
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"
|
||||
|
||||
## RFC support
|
||||
|
||||
The gem only parses link data. It does not currently parse aliases, properties, or more complex structures.
|
||||
|
|
|
@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|||
s.email = 'eugen@zeonfederated.com'
|
||||
s.files = `git ls-files lib LICENSE README.md`.split($RS)
|
||||
s.homepage = 'https://github.com/Gargron/goldfinger'
|
||||
s.license = 'MIT'
|
||||
s.licenses = ['MIT']
|
||||
|
||||
s.add_dependency('http', '~> 1.0')
|
||||
s.add_dependency('addressable', '~> 2.4')
|
||||
|
|
|
@ -21,6 +21,7 @@ module Goldfinger
|
|||
def parse
|
||||
case @mime_type
|
||||
when 'application/jrd+json'
|
||||
when 'application/json'
|
||||
parse_json
|
||||
when 'application/xrd+xml'
|
||||
parse_xml
|
||||
|
|
Loading…
Reference in New Issue