$17 GRAYBYTE WORDPRESS FILE MANAGER $46

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/ruby22/lib64/ruby/2.2.0/rubygems/

HOME
Current File : /opt/alt/ruby22/lib64/ruby/2.2.0/rubygems//command_manager.rb
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require 'rubygems/command'
require 'rubygems/user_interaction'

##
# The command manager registers and installs all the individual sub-commands
# supported by the gem command.
#
# Extra commands can be provided by writing a rubygems_plugin.rb
# file in an installed gem.  You should register your command against the
# Gem::CommandManager instance, like this:
#
#   # file rubygems_plugin.rb
#   require 'rubygems/command_manager'
#
#   Gem::CommandManager.instance.register_command :edit
#
# You should put the implementation of your command in rubygems/commands.
#
#   # file rubygems/commands/edit_command.rb
#   class Gem::Commands::EditCommand < Gem::Command
#     # ...
#   end
#
# See Gem::Command for instructions on writing gem commands.

class Gem::CommandManager

  include Gem::UserInteraction

  BUILTIN_COMMANDS = [ # :nodoc:
    :build,
    :cert,
    :check,
    :cleanup,
    :contents,
    :dependency,
    :environment,
    :fetch,
    :generate_index,
    :help,
    :install,
    :list,
    :lock,
    :mirror,
    :open,
    :outdated,
    :owner,
    :pristine,
    :push,
    :query,
    :rdoc,
    :search,
    :server,
    :sources,
    :specification,
    :stale,
    :uninstall,
    :unpack,
    :update,
    :which,
    :yank,
  ]

  ##
  # Return the authoritative instance of the command manager.

  def self.instance
    @command_manager ||= new
  end

  ##
  # Returns self. Allows a CommandManager instance to stand
  # in for the class itself.

  def instance
    self
  end

  ##
  # Reset the authoritative instance of the command manager.

  def self.reset
    @command_manager = nil
  end

  ##
  # Register all the subcommands supported by the gem command.

  def initialize
    require 'timeout'
    @commands = {}

    BUILTIN_COMMANDS.each do |name|
      register_command name
    end
  end

  ##
  # Register the Symbol +command+ as a gem command.

  def register_command(command, obj=false)
    @commands[command] = obj
  end

  ##
  # Unregister the Symbol +command+ as a gem command.

  def unregister_command(command)
    @commands.delete command
  end

  ##
  # Returns a Command instance for +command_name+

  def [](command_name)
    command_name = command_name.intern
    return nil if @commands[command_name].nil?
    @commands[command_name] ||= load_and_instantiate(command_name)
  end

  ##
  # Return a sorted list of all command names as strings.

  def command_names
    @commands.keys.collect {|key| key.to_s}.sort
  end

  ##
  # Run the command specified by +args+.

  def run(args, build_args=nil)
    process_args(args, build_args)
  rescue StandardError, Timeout::Error => ex
    alert_error "While executing gem ... (#{ex.class})\n    #{ex}"
    ui.backtrace ex

    terminate_interaction(1)
  rescue Interrupt
    alert_error "Interrupted"
    terminate_interaction(1)
  end

  def process_args(args, build_args=nil)
    if args.empty? then
      say Gem::Command::HELP
      terminate_interaction 1
    end

    case args.first
    when '-h', '--help' then
      say Gem::Command::HELP
      terminate_interaction 0
    when '-v', '--version' then
      say Gem::VERSION
      terminate_interaction 0
    when /^-/ then
      alert_error "Invalid option: #{args.first}.  See 'gem --help'."
      terminate_interaction 1
    else
      cmd_name = args.shift.downcase
      cmd = find_command cmd_name
      cmd.invoke_with_build_args args, build_args
    end
  end

  def find_command(cmd_name)
    possibilities = find_command_possibilities cmd_name

    if possibilities.size > 1 then
      raise Gem::CommandLineError,
            "Ambiguous command #{cmd_name} matches [#{possibilities.join(', ')}]"
    elsif possibilities.empty? then
      raise Gem::CommandLineError, "Unknown command #{cmd_name}"
    end

    self[possibilities.first]
  end

  def find_command_possibilities(cmd_name)
    len = cmd_name.length

    found = command_names.select { |name| cmd_name == name[0, len] }

    exact = found.find { |name| name == cmd_name }

    exact ? [exact] : found
  end

  private

  def load_and_instantiate(command_name)
    command_name = command_name.to_s
    const_name = command_name.capitalize.gsub(/_(.)/) { $1.upcase } << "Command"
    load_error = nil

    begin
      begin
        require "rubygems/commands/#{command_name}_command"
      rescue LoadError => e
        load_error = e
      end
      Gem::Commands.const_get(const_name).new
    rescue Exception => e
      e = load_error if load_error

      alert_error "Loading command: #{command_name} (#{e.class})\n\t#{e}"
      ui.backtrace e
    end
  end

end



Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.53 PM
root / root
0755
commands
--
3 Mar 2024 10.43 PM
root / linksafe
0755
core_ext
--
3 Mar 2024 10.43 PM
root / linksafe
0755
ext
--
3 Mar 2024 10.43 PM
root / linksafe
0755
package
--
3 Mar 2024 10.43 PM
root / linksafe
0755
request
--
3 Mar 2024 10.43 PM
root / linksafe
0755
request_set
--
3 Mar 2024 10.43 PM
root / linksafe
0755
resolver
--
3 Mar 2024 10.43 PM
root / linksafe
0755
security
--
3 Mar 2024 10.43 PM
root / linksafe
0755
source
--
3 Mar 2024 10.43 PM
root / linksafe
0755
ssl_certs
--
3 Mar 2024 10.43 PM
root / linksafe
0755
util
--
3 Mar 2024 10.43 PM
root / linksafe
0755
available_set.rb
2.99 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
basic_specification.rb
6.659 KB
7 Dec 2014 12.53 AM
root / linksafe
0644
command.rb
13.552 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
command_manager.rb
4.629 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
compatibility.rb
1.626 KB
25 Dec 2014 3.37 AM
root / linksafe
0644
config_file.rb
12.573 KB
14 Dec 2017 1.50 PM
root / linksafe
0644
defaults.rb
4.014 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
dependency.rb
8.483 KB
17 Nov 2014 3.55 AM
root / linksafe
0644
dependency_installer.rb
13.812 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
dependency_list.rb
5.44 KB
7 Dec 2014 12.53 AM
root / linksafe
0644
deprecate.rb
1.701 KB
7 Jan 2014 1.19 AM
root / linksafe
0644
doctor.rb
3.035 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
errors.rb
3.121 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
exceptions.rb
6.199 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
ext.rb
0.421 KB
16 Oct 2013 6.00 AM
root / linksafe
0644
gem_runner.rb
1.957 KB
14 Sep 2013 8.59 AM
root / linksafe
0644
gemcutter_utilities.rb
3.943 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
indexer.rb
13.025 KB
17 Nov 2014 3.55 AM
root / linksafe
0644
install_default_message.rb
0.3 KB
9 Jul 2013 11.21 PM
root / linksafe
0644
install_message.rb
0.274 KB
29 Nov 2012 6.52 AM
root / linksafe
0644
install_update_options.rb
5.854 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
installer.rb
22.482 KB
10 Sep 2017 1.10 AM
root / linksafe
0644
installer_test_case.rb
4.233 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
local_remote_options.rb
3.369 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
mock_gem_ui.rb
1.347 KB
29 Nov 2012 6.52 AM
root / linksafe
0644
name_tuple.rb
2.373 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
package.rb
14.874 KB
16 Feb 2018 4.27 PM
root / linksafe
0644
package_task.rb
3.769 KB
26 Aug 2013 8.24 PM
root / linksafe
0644
path_support.rb
1.82 KB
14 Sep 2013 8.59 AM
root / linksafe
0644
platform.rb
6.131 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
psych_additions.rb
0.263 KB
20 Oct 2013 1.33 AM
root / linksafe
0644
psych_tree.rb
0.745 KB
9 Jul 2013 10.34 PM
root / linksafe
0644
rdoc.rb
7.705 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
remote_fetcher.rb
11.091 KB
10 Sep 2017 1.10 AM
root / linksafe
0644
request.rb
6.729 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
request_set.rb
9.397 KB
7 Dec 2014 12.53 AM
root / linksafe
0644
requirement.rb
6.198 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
resolver.rb
13.348 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
safe_yaml.rb
1.108 KB
14 Dec 2017 1.50 PM
root / linksafe
0644
security.rb
20.957 KB
20 Jan 2014 4.57 AM
root / linksafe
0644
server.rb
22.927 KB
16 Feb 2018 4.27 PM
root / linksafe
0644
source.rb
5.206 KB
7 Dec 2014 12.53 AM
root / linksafe
0644
source_list.rb
2.47 KB
19 Nov 2013 12.34 AM
root / linksafe
0644
source_local.rb
0.108 KB
14 Sep 2013 8.59 AM
root / linksafe
0644
source_specific_file.rb
0.091 KB
14 Sep 2013 8.59 AM
root / linksafe
0644
spec_fetcher.rb
6.314 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
specification.rb
72.877 KB
16 Feb 2018 4.27 PM
root / linksafe
0644
stub_specification.rb
3.556 KB
7 Dec 2014 12.53 AM
root / linksafe
0644
syck_hack.rb
2.088 KB
19 Dec 2013 10.09 PM
root / linksafe
0644
test_case.rb
37.488 KB
22 Apr 2016 9.15 AM
root / linksafe
0644
test_utilities.rb
8.438 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
text.rb
1.896 KB
10 Sep 2017 1.10 AM
root / linksafe
0644
uninstaller.rb
8.717 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
uri_formatter.rb
0.744 KB
20 Oct 2013 1.33 AM
root / linksafe
0644
user_interaction.rb
14.644 KB
17 Nov 2014 3.55 AM
root / linksafe
0644
util.rb
2.594 KB
3 Aug 2014 1.33 PM
root / linksafe
0644
validator.rb
4.185 KB
30 Nov 2013 11.27 PM
root / linksafe
0644
version.rb
10.916 KB
14 Sep 2014 3.30 AM
root / linksafe
0644
version_option.rb
1.827 KB
14 Sep 2013 8.59 AM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF