Flowdock
method

remove_old_lib_files

Importance_0
v2_2_9 - Show latest stable - 0 notes - Class: SetupCommand
remove_old_lib_files(lib_dir) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/commands/setup_command.rb, line 417
  def remove_old_lib_files lib_dir
    rubygems_dir = File.join lib_dir, 'rubygems'
    lib_files = rb_files_in 'lib/rubygems'

    old_lib_files = rb_files_in rubygems_dir

    to_remove = old_lib_files - lib_files

    to_remove.delete_if do |file|
      file.start_with? 'defaults'
    end

    Dir.chdir rubygems_dir do
      to_remove.each do |file|
        FileUtils.rm_f file

        warn "unable to remove old file #{file} please remove it by hand" if
          File.exist? file
      end
    end
  end
Register or log in to add new notes.