From 022d1dbbae516f5ae373acc406ce28299822192c Mon Sep 17 00:00:00 2001 From: Vitalii Yulieff Date: Tue, 19 Sep 2023 15:16:04 +0400 Subject: [PATCH] (wip) test openssl version --- src/coverage_reporter/api.cr | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/coverage_reporter/api.cr b/src/coverage_reporter/api.cr index b62e0dcb..ab9582f3 100644 --- a/src/coverage_reporter/api.cr +++ b/src/coverage_reporter/api.cr @@ -2,10 +2,25 @@ require "./config" require "./api/*" require "http" + module CoverageReporter module Api extend self + OPENSSL_VERSION = `openssl version -v` + + WORKS = SemanticVersion.new(1, 1, 0) + matches = /.*(\d+)\.(\d+)\.(\d+).*/.match(OPENSSL_VERSION) + unless matches.nil? + major = matches[1].to_i + minor = matches[2].to_i + patch = matches[3].to_i + + current = SemanticVersion.new(major, minor, patch) + puts current + puts current < WORKS + end + DEFAULT_HEADERS = HTTP::Headers{ "X-Coveralls-Reporter" => "coverage-reporter", "X-Coveralls-Reporter-Version" => VERSION,