@Override
    @SuppressWarnings("unchecked")
    public CompletableFuture<String> latestVersion() {
        return Rest.connectHttps("service.speedment.com")
            .get(format("version/%s/latest", info.getRepository()))
            .thenApplyAsync(res -> {
                if (res.success()) {
                    return res.decodeJson()
                        .map(m -> (Map<String, String>) m)
                        .map(m -> m.get("tag"))
                        .orElseThrow(() -> new SpeedmentToolException(
                            "Could not establish the latest version."
                        ));
                } else {
                    throw new SpeedmentToolException(
                        "Received an error '" + res.getText() + 
                        "' from the GitHub API."
                    );
                }
            });
    }
The default implementation of the {@link VersionComponent} interface that 
uses the public GitHub API to establish the latest released version.

@author  Emil Forslund
@since   3.0.0
tool-parent/tool-core/src/main/java/com/speedment/tool/core/internal/component/VersionComponentImpl.java