Skip to content

Commit 93804ee

Browse files
committed
Simplify handling of version constant.
1 parent 45fdf02 commit 93804ee

File tree

5 files changed

+9
-22
lines changed

5 files changed

+9
-22
lines changed

ext/openssl/ossl.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,11 +1156,6 @@ Init_openssl(void)
11561156
rb_global_variable(&mOSSL);
11571157
rb_define_singleton_method(mOSSL, "fixed_length_secure_compare", ossl_crypto_fixed_length_secure_compare, 2);
11581158

1159-
/*
1160-
* OpenSSL ruby extension version
1161-
*/
1162-
rb_define_const(mOSSL, "VERSION", rb_str_new2(OSSL_VERSION));
1163-
11641159
/*
11651160
* Version of OpenSSL the ruby OpenSSL extension was built with
11661161
*/

ext/openssl/ossl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ void ossl_debug(const char *, ...);
174174
#ifndef OPENSSL_NO_TS
175175
#include "ossl_ts.h"
176176
#endif
177-
#include "ossl_version.h"
178177
#include "ossl_x509.h"
179178
#include "ossl_engine.h"
180179
#include "ossl_kdf.h"

ext/openssl/ossl_version.h

Lines changed: 0 additions & 15 deletions
This file was deleted.

lib/openssl/version.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
module OpenSSL
4+
VERSION = "2.2.0" unless defined?(VERSION)
5+
end

openssl.gemspec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
2+
require_relative 'lib/openssl/version'
3+
14
Gem::Specification.new do |spec|
25
spec.name = "openssl"
3-
spec.version = "2.1.2"
6+
spec.version = OpenSSL::VERSION
47
spec.authors = ["Martin Bosslet", "SHIBATA Hiroshi", "Zachary Scott", "Kazuki Yamaguchi"]
58
spec.email = ["ruby-core@ruby-lang.org"]
69
spec.summary = %q{OpenSSL provides SSL, TLS and general purpose cryptography.}

0 commit comments

Comments
 (0)