Skip to content

Commit

Permalink
Merged intermediate class GemInstaller to UnpackedInstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Mar 9, 2024
1 parent ced648f commit 6bfb6e6
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tool/rbinstall.rb
Expand Up @@ -862,10 +862,7 @@ def extract_files(destination_dir, pattern = "*")
end
end

class GemInstaller < Gem::Installer
end

class UnpackedInstaller < GemInstaller
class UnpackedInstaller < Gem::Installer
def write_cache_file
end

Expand All @@ -889,11 +886,6 @@ def check_executable_overwrite(filename)
super
end

def generate_bin_script(filename, bindir)
return if same_bin_script?(filename, bindir)
super
end

def same_bin_script?(filename, bindir)
path = File.join(bindir, formatted_program_filename(filename))
begin
Expand All @@ -912,9 +904,7 @@ def write_default_spec
super unless $dryrun
$installed_list.puts(without_destdir(default_spec_file)) if $installed_list
end
end

class GemInstaller
def install
spec.post_install_message = nil
RbInstall.no_write(options) {super}
Expand All @@ -925,6 +915,7 @@ def build_extensions
end

def generate_bin_script(filename, bindir)
return if same_bin_script?(filename, bindir)
name = formatted_program_filename(filename)
unless $dryrun
super
Expand Down

0 comments on commit 6bfb6e6

Please sign in to comment.