$40 GRAYBYTE WORDPRESS FILE MANAGER $36

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby30/share/rubygems/rubygems/

HOME
Current File : /opt/alt/ruby30/share/rubygems/rubygems//util.rb
# frozen_string_literal: true
require_relative 'deprecate'

##
# This module contains various utility methods as module methods.

module Gem::Util

  ##
  # Zlib::GzipReader wrapper that unzips +data+.

  def self.gunzip(data)
    require 'zlib'
    require 'stringio'
    data = StringIO.new(data, 'r')

    gzip_reader = begin
                    Zlib::GzipReader.new(data)
                  rescue Zlib::GzipFile::Error => e
                    raise e.class, e.inspect, e.backtrace
                  end

    unzipped = gzip_reader.read
    unzipped.force_encoding Encoding::BINARY
    unzipped
  end

  ##
  # Zlib::GzipWriter wrapper that zips +data+.

  def self.gzip(data)
    require 'zlib'
    require 'stringio'
    zipped = StringIO.new(String.new, 'w')
    zipped.set_encoding Encoding::BINARY

    Zlib::GzipWriter.wrap zipped do |io|
      io.write data
    end

    zipped.string
  end

  ##
  # A Zlib::Inflate#inflate wrapper

  def self.inflate(data)
    require 'zlib'
    Zlib::Inflate.inflate data
  end

  ##
  # This calls IO.popen and reads the result

  def self.popen(*command)
    IO.popen command, &:read
  end

  ##
  # Invokes system, but silences all output.

  def self.silent_system(*command)
    opt = {:out => IO::NULL, :err => [:child, :out]}
    if Hash === command.last
      opt.update(command.last)
      cmds = command[0...-1]
    else
      cmds = command.dup
    end
    system(*(cmds << opt))
  end

  class << self
    extend Gem::Deprecate

    rubygems_deprecate :silent_system
  end

  ##
  # Enumerates the parents of +directory+.

  def self.traverse_parents(directory, &block)
    return enum_for __method__, directory unless block_given?

    here = File.expand_path directory
    loop do
      Dir.chdir here, &block rescue Errno::EACCES

      new_here = File.expand_path('..', here)
      return if new_here == here # toplevel
      here = new_here
    end
  end

  ##
  # Globs for files matching +pattern+ inside of +directory+,
  # returning absolute paths to the matching files.

  def self.glob_files_in_dir(glob, base_path)
    if RUBY_VERSION >= "2.5"
      Dir.glob(glob, base: base_path).map! {|f| File.expand_path(f, base_path) }
    else
      Dir.glob(File.expand_path(glob, base_path))
    end
  end

  ##
  # Corrects +path+ (usually returned by `URI.parse().path` on Windows), that
  # comes with a leading slash.

  def self.correct_for_windows_path(path)
    if path[0].chr == '/' && path[1].chr =~ /[a-z]/i && path[2].chr == ':'
      path[1..-1]
    else
      path
    end
  end

end


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.47 PM
root / root
0755
commands
--
17 Jul 2024 8.45 AM
root / linksafe
0755
core_ext
--
17 Jul 2024 8.45 AM
root / linksafe
0755
defaults
--
17 Jul 2024 8.45 AM
root / linksafe
0755
ext
--
17 Jul 2024 8.45 AM
root / linksafe
0755
optparse
--
17 Jul 2024 8.45 AM
root / linksafe
0755
package
--
17 Jul 2024 8.45 AM
root / linksafe
0755
request
--
17 Jul 2024 8.45 AM
root / linksafe
0755
request_set
--
17 Jul 2024 8.45 AM
root / linksafe
0755
resolver
--
17 Jul 2024 8.45 AM
root / linksafe
0755
security
--
17 Jul 2024 8.45 AM
root / linksafe
0755
source
--
17 Jul 2024 8.45 AM
root / linksafe
0755
ssl_certs
--
26 Jun 2024 1.55 PM
root / linksafe
0755
tsort
--
26 Jun 2024 1.55 PM
root / linksafe
0755
util
--
17 Jul 2024 8.45 AM
root / linksafe
0755
available_set.rb
3.013 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
basic_specification.rb
7.703 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
bundler_version_finder.rb
3.041 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
command.rb
15.911 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
command_manager.rb
5.094 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
compatibility.rb
0.998 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
config_file.rb
13.282 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
defaults.rb
7.059 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
dependency.rb
8.597 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
dependency_installer.rb
10.221 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
dependency_list.rb
5.545 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
deprecate.rb
3.444 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
doctor.rb
3.178 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
errors.rb
4.65 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
exceptions.rb
6.347 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
ext.rb
0.449 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
gem_runner.rb
1.901 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
gemcutter_utilities.rb
7.627 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
indexer.rb
10.85 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
install_default_message.rb
0.34 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
install_message.rb
0.314 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
install_update_options.rb
6.305 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
installer.rb
26.401 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
installer_uninstaller_utils.rb
0.755 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
local_remote_options.rb
3.562 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
mock_gem_ui.rb
1.379 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
name_tuple.rb
2.401 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
openssl.rb
0.122 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
optparse.rb
0.07 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
package.rb
17.173 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
package_task.rb
3.793 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
path_support.rb
1.88 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
platform.rb
6.654 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
psych_additions.rb
0.293 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
psych_tree.rb
0.775 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
query_utils.rb
8.608 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
rdoc.rb
0.226 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
remote_fetcher.rb
9.258 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
request.rb
8.618 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
request_set.rb
11.252 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
requirement.rb
6.908 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
resolver.rb
9.646 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
s3_uri_signer.rb
5.907 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
safe_yaml.rb
1.503 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
security.rb
22.401 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
security_option.rb
1.058 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
server.rb
22.867 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
source.rb
5.701 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
source_list.rb
2.518 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
spec_fetcher.rb
6.54 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
specification.rb
70.074 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
specification_policy.rb
13.122 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
stub_specification.rb
4.74 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
text.rb
1.85 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
tsort.rb
0.064 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
uninstaller.rb
10.223 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
uri.rb
2.121 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
uri_formatter.rb
0.763 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
user_interaction.rb
13.114 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
util.rb
2.5 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
validator.rb
3.648 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
version.rb
12.439 KB
26 Jun 2024 1.55 PM
root / linksafe
0644
version_option.rb
2.208 KB
26 Jun 2024 1.55 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF