redfinger 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -28,7 +28,12 @@ module Redfinger
28
28
 
29
29
  def retrieve_template_from_xrd(ssl = true)
30
30
  doc = Nokogiri::XML::Document.parse(RestClient.get(xrd_url(ssl)).body)
31
-
31
+ if doc.namespaces["xmlns:hm"] != "http://host-meta.net/xrd/1.0"
32
+ # it's probably not finger, let's try without ssl
33
+ # http://code.google.com/p/webfinger/wiki/WebFingerProtocol
34
+ # says first ssl should be tried then without ssl, should fix issue #2
35
+ doc = Nokogiri::XML::Document.parse(RestClient.get(xrd_url(false)).body)
36
+ end
32
37
  unless doc.at_xpath('.//hm:Host').content == self.domain
33
38
  raise Redfinger::SecurityException, "The XRD document's host did not match the account's host."
34
39
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{redfinger}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Bleigh"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Bleigh