From 8b0d7af683b9bcfa28887d1ef5a79bff4498d704 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 17 Feb 2016 16:36:19 +0100 Subject: [PATCH] Adding gem version badge to README --- LICENSE | 20 ++++++++++++++++++++ README.md | 8 ++++++++ goldfinger.gemspec | 2 +- lib/goldfinger/result.rb | 1 + 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index e69de29..1a152d4 100644 --- a/LICENSE +++ b/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. diff --git a/README.md b/README.md index 8dd6911..425ba38 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/goldfinger.gemspec b/goldfinger.gemspec index 249530e..c734e17 100644 --- a/goldfinger.gemspec +++ b/goldfinger.gemspec @@ -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') diff --git a/lib/goldfinger/result.rb b/lib/goldfinger/result.rb index c4065ef..b3b3ba4 100644 --- a/lib/goldfinger/result.rb +++ b/lib/goldfinger/result.rb @@ -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