Skip to content

Commit

Permalink
Simplify handling of version constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Oct 31, 2019
1 parent 45fdf02 commit 93804ee
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 22 deletions.
5 changes: 0 additions & 5 deletions ext/openssl/ossl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1156,11 +1156,6 @@ Init_openssl(void)
rb_global_variable(&mOSSL);
rb_define_singleton_method(mOSSL, "fixed_length_secure_compare", ossl_crypto_fixed_length_secure_compare, 2);

/*
* OpenSSL ruby extension version
*/
rb_define_const(mOSSL, "VERSION", rb_str_new2(OSSL_VERSION));

/*
* Version of OpenSSL the ruby OpenSSL extension was built with
*/
Expand Down
1 change: 0 additions & 1 deletion ext/openssl/ossl.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ void ossl_debug(const char *, ...);
#ifndef OPENSSL_NO_TS
#include "ossl_ts.h"
#endif
#include "ossl_version.h"
#include "ossl_x509.h"
#include "ossl_engine.h"
#include "ossl_kdf.h"
Expand Down
15 changes: 0 additions & 15 deletions ext/openssl/ossl_version.h

This file was deleted.

5 changes: 5 additions & 0 deletions lib/openssl/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

module OpenSSL
VERSION = "2.2.0" unless defined?(VERSION)
end
5 changes: 4 additions & 1 deletion openssl.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

require_relative 'lib/openssl/version'

Gem::Specification.new do |spec|
spec.name = "openssl"
spec.version = "2.1.2"
spec.version = OpenSSL::VERSION
spec.authors = ["Martin Bosslet", "SHIBATA Hiroshi", "Zachary Scott", "Kazuki Yamaguchi"]
spec.email = ["[email protected]"]
spec.summary = %q{OpenSSL provides SSL, TLS and general purpose cryptography.}
Expand Down

0 comments on commit 93804ee

Please sign in to comment.