Skip to content

Commit

Permalink
(wip) test openssl version
Browse files Browse the repository at this point in the history
  • Loading branch information
iurev committed Sep 19, 2023
1 parent c580f0b commit 022d1db
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/coverage_reporter/api.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 022d1db

Please sign in to comment.