Last active
September 9, 2015 10:29
-
-
Save technion/b4eac8ba7b08a677a21d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/acme/client.rb b/lib/acme/client.rb | |
index 52d9add..04e1f0a 100644 | |
--- a/lib/acme/client.rb | |
+++ b/lib/acme/client.rb | |
@@ -49,18 +49,9 @@ class Acme::Client | |
end | |
def load_directory! | |
- @operation_endpoints = if @directory_uri | |
- response = connection.get(@directory_uri) | |
- body = response.body | |
- { | |
- 'new-reg' => body.fetch('new-reg'), | |
- 'recover-reg' => body.fetch('recover-reg'), | |
- 'new-authz' => body.fetch('new-authz'), | |
- 'new-cert' => body.fetch('new-cert'), | |
- 'revoke-cert' => body.fetch('revoke-cert'), | |
- } | |
- else | |
- DIRECTORY_DEFAULT | |
- end | |
+ @directory_uri = @endpoint + '/directory' unless @directory_uri | |
+ response = connection.get(@directory_uri) | |
+ @operation_endpoints = JSON.parse(response.body) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment