GRAYBYTE WORDPRESS FILE MANAGER2693

Server IP : 198.54.121.189 / Your IP : 216.73.216.224
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/ruby26/lib64/ruby/2.6.0/rubygems/commands/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/ruby26/lib64/ruby/2.6.0/rubygems/commands//specification_command.rb
# frozen_string_literal: true
require 'rubygems/command'
require 'rubygems/local_remote_options'
require 'rubygems/version_option'
require 'rubygems/package'

class Gem::Commands::SpecificationCommand < Gem::Command

  include Gem::LocalRemoteOptions
  include Gem::VersionOption

  def initialize
    Gem.load_yaml

    super 'specification', 'Display gem specification (in yaml)',
          :domain => :local, :version => Gem::Requirement.default,
          :format => :yaml

    add_version_option('examine')
    add_platform_option
    add_prerelease_option

    add_option('--all', 'Output specifications for all versions of',
               'the gem') do |value, options|
      options[:all] = true
    end

    add_option('--ruby', 'Output ruby format') do |value, options|
      options[:format] = :ruby
    end

    add_option('--yaml', 'Output YAML format') do |value, options|
      options[:format] = :yaml
    end

    add_option('--marshal', 'Output Marshal format') do |value, options|
      options[:format] = :marshal
    end

    add_local_remote_options
  end

  def arguments # :nodoc:
    <<-ARGS
GEMFILE       name of gem to show the gemspec for
FIELD         name of gemspec field to show
    ARGS
  end

  def defaults_str # :nodoc:
    "--local --version '#{Gem::Requirement.default}' --yaml"
  end

  def description # :nodoc:
    <<-EOF
The specification command allows you to extract the specification from
a gem for examination.

The specification can be output in YAML, ruby or Marshal formats.

Specific fields in the specification can be extracted in YAML format:

  $ gem spec rake summary
  --- Ruby based make-like utility.
  ...

    EOF
  end

  def usage # :nodoc:
    "#{program_name} [GEMFILE] [FIELD]"
  end

  def execute
    specs = []
    gem = options[:args].shift

    unless gem
      raise Gem::CommandLineError,
            "Please specify a gem name or file on the command line"
    end

    case v = options[:version]
    when String
      req = Gem::Requirement.create v
    when Gem::Requirement
      req = v
    else
      raise Gem::CommandLineError, "Unsupported version type: '#{v}'"
    end

    if !req.none? and options[:all]
      alert_error "Specify --all or -v, not both"
      terminate_interaction 1
    end

    if options[:all]
      dep = Gem::Dependency.new gem
    else
      dep = Gem::Dependency.new gem, req
    end

    field = get_one_optional_argument

    raise Gem::CommandLineError, "--ruby and FIELD are mutually exclusive" if
      field and options[:format] == :ruby

    if local?
      if File.exist? gem
        specs << Gem::Package.new(gem).spec rescue nil
      end

      if specs.empty?
        specs.push(*dep.matching_specs)
      end
    end

    if remote?
      dep.prerelease = options[:prerelease]
      found, _ = Gem::SpecFetcher.fetcher.spec_for_dependency dep

      specs.push(*found.map { |spec,| spec })
    end

    if specs.empty?
      alert_error "No gem matching '#{dep}' found"
      terminate_interaction 1
    end

    unless options[:all]
      specs = [specs.max_by { |s| s.version }]
    end

    specs.each do |s|
      s = s.send field if field

      say case options[:format]
          when :ruby then s.to_ruby
          when :marshal then Marshal.dump s
          else s.to_yaml
          end

      say "\n"
    end
  end
end

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 03 2024 22:47:39
root / linksafe
0755
build_command.rb
2.028 KB
April 12 2022 11:50:11
root / linksafe
0644
cert_command.rb
9.021 KB
April 12 2022 11:50:11
root / linksafe
0644
check_command.rb
2.229 KB
April 12 2022 11:50:11
root / linksafe
0644
cleanup_command.rb
4.482 KB
April 12 2022 11:50:11
root / linksafe
0644
contents_command.rb
4.072 KB
April 12 2022 11:50:11
root / linksafe
0644
dependency_command.rb
5.14 KB
April 12 2022 11:50:11
root / linksafe
0644
environment_command.rb
5.163 KB
April 12 2022 11:50:11
root / linksafe
0644
fetch_command.rb
1.77 KB
April 12 2022 11:50:11
root / linksafe
0644
generate_index_command.rb
2.551 KB
April 12 2022 11:50:11
root / linksafe
0644
help_command.rb
10.145 KB
April 12 2022 11:50:11
root / linksafe
0644
info_command.rb
0.696 KB
April 12 2022 11:50:11
root / linksafe
0644
install_command.rb
8.396 KB
April 12 2022 11:50:11
root / linksafe
0644
list_command.rb
0.917 KB
April 12 2022 11:50:11
root / linksafe
0644
lock_command.rb
2.688 KB
April 12 2022 11:50:11
root / linksafe
0644
mirror_command.rb
0.609 KB
April 12 2022 11:50:11
root / linksafe
0644
open_command.rb
1.955 KB
April 12 2022 11:50:11
root / linksafe
0644
outdated_command.rb
0.832 KB
April 12 2022 11:50:11
root / linksafe
0644
owner_command.rb
2.824 KB
April 12 2022 11:50:11
root / linksafe
0644
pristine_command.rb
5.387 KB
April 12 2022 11:50:11
root / linksafe
0644
push_command.rb
3.526 KB
April 12 2022 11:50:11
root / linksafe
0644
query_command.rb
9.282 KB
April 12 2022 11:50:11
root / linksafe
0644
rdoc_command.rb
2.472 KB
April 12 2022 11:50:11
root / linksafe
0644
search_command.rb
0.863 KB
April 12 2022 11:50:11
root / linksafe
0644
server_command.rb
2.377 KB
April 12 2022 11:50:11
root / linksafe
0644
setup_command.rb
17.812 KB
April 12 2022 11:50:11
root / linksafe
0644
signin_command.rb
0.869 KB
April 12 2022 11:50:11
root / linksafe
0644
signout_command.rb
0.875 KB
April 12 2022 11:50:11
root / linksafe
0644
sources_command.rb
5.18 KB
April 12 2022 11:50:11
root / linksafe
0644
specification_command.rb
3.271 KB
April 12 2022 11:50:11
root / linksafe
0644
stale_command.rb
0.939 KB
April 12 2022 11:50:11
root / linksafe
0644
uninstall_command.rb
5.414 KB
April 12 2022 11:50:11
root / linksafe
0644
unpack_command.rb
5.071 KB
April 12 2022 11:50:11
root / linksafe
0644
update_command.rb
6.987 KB
April 12 2022 11:50:11
root / linksafe
0644
which_command.rb
2.146 KB
April 12 2022 11:50:11
root / linksafe
0644
yank_command.rb
2.294 KB
April 12 2022 11:50:11
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF