openname 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openname.rb +8 -1
- data/lib/openname/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f37acaebb9cabcb29fc2f7e86be6e170a147bc2
|
4
|
+
data.tar.gz: d6ce2d8f644845e332a4b1f2d5547c5ee5b8cc98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 857bba05fe8b8cdb20bd080bbfd806637421becae9f8e15baf118bba9d035b498c9e729f1c566fa0560914545d75b52d8b18d93be17798e30a670c50a071fd66
|
7
|
+
data.tar.gz: 03628b4315805687e352ad81e6f95ebec144f203b15ea696b4cab2be643807b73398fbe0f3dcbd3da1f6a9de50e2c5e876606344a7e64dc474ddb488651f7412
|
data/lib/openname.rb
CHANGED
@@ -77,7 +77,14 @@ module Openname
|
|
77
77
|
if(json_body["status"] && json_body["status"] == "reserved")
|
78
78
|
NameError.new("Openname \"#{openname}\" does not exist. It is reserved.")
|
79
79
|
else
|
80
|
-
|
80
|
+
|
81
|
+
# Current ONS resolver always returns 200
|
82
|
+
# so we need to manually detect names that don't exist
|
83
|
+
if (json_body["error"])
|
84
|
+
raise NameError.new("Openname \"#{openname}\" does not exist")
|
85
|
+
end
|
86
|
+
|
87
|
+
# Current ONS resolver wraps profile
|
81
88
|
# so as to also return proof verification
|
82
89
|
# results. openname-ruby ignores verifications
|
83
90
|
if (json_body["profile"])
|
data/lib/openname/version.rb
CHANGED