From 3d7f71801acbe90e6b484fa944b7c93fd46cc2cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 31 Dec 2020 17:40:48 +0100 Subject: [PATCH] Remove unused file --- util/remove_openssl.rb | 55 ------------------------------------------ 1 file changed, 55 deletions(-) delete mode 100644 util/remove_openssl.rb diff --git a/util/remove_openssl.rb b/util/remove_openssl.rb deleted file mode 100644 index a98f227f28..0000000000 --- a/util/remove_openssl.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -require "rbconfig" -require "fileutils" - -class OpensslSimulator - attr_reader :openssl_rb, :openssl_gemspec, :openssl_ext - - def initialize - archdir = RbConfig::CONFIG["archdir"] - rubylibdir = RbConfig::CONFIG["rubylibdir"] - default_specifications_dir = Gem.default_specifications_dir - - @openssl_rb = File.join(rubylibdir, "openssl.rb") - @openssl_gemspec = Dir.glob("#{default_specifications_dir}/openssl-*.gemspec").first - - @openssl_ext = if RUBY_PLATFORM == "java" - File.join(rubylibdir, "jopenssl.jar") - else - File.join(archdir, "openssl.so") - end - end - - def hide_openssl - hide_file openssl_rb - hide_file openssl_ext - hide_file openssl_gemspec if openssl_gemspec - end - - def unhide_openssl - unhide_file openssl_gemspec if openssl_gemspec - unhide_file openssl_ext - unhide_file openssl_rb - end - - private - - def hide_file(file) - FileUtils.mv file, file + "_" - end - - def unhide_file(file) - FileUtils.mv file + "_", file - end -end - -if $0 == __FILE__ - openssl_simulate = OpensslSimulator.new - - if ARGV[0] == "--revert" - openssl_simulate.unhide_openssl - else - openssl_simulate.hide_openssl - end -end