GRAYBYTE WORDPRESS FILE MANAGER3909

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
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/ruby24/lib64/ruby/2.4.0/rdoc/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/ruby24/lib64/ruby/2.4.0/rdoc//rubygems_hook.rb
# frozen_string_literal: false
require 'rubygems/user_interaction'
require 'fileutils'
require 'rdoc'

##
# Gem::RDoc provides methods to generate RDoc and ri data for installed gems
# upon gem installation.
#
# This file is automatically required by RubyGems 1.9 and newer.

class RDoc::RubygemsHook

  include Gem::UserInteraction
  extend  Gem::UserInteraction

  @rdoc_version = nil
  @specs = []

  ##
  # Force installation of documentation?

  attr_accessor :force

  ##
  # Generate rdoc?

  attr_accessor :generate_rdoc

  ##
  # Generate ri data?

  attr_accessor :generate_ri

  class << self

    ##
    # Loaded version of RDoc.  Set by ::load_rdoc

    attr_reader :rdoc_version

  end

  ##
  # Post installs hook that generates documentation for each specification in
  # +specs+

  def self.generation_hook installer, specs
    start = Time.now
    types = installer.document

    generate_rdoc = types.include? 'rdoc'
    generate_ri   = types.include? 'ri'

    specs.each do |spec|
      new(spec, generate_rdoc, generate_ri).generate
    end

    return unless generate_rdoc or generate_ri

    duration = (Time.now - start).to_i
    names    = specs.map(&:name).join ', '

    say "Done installing documentation for #{names} after #{duration} seconds"
  end

  ##
  # Loads the RDoc generator

  def self.load_rdoc
    return if @rdoc_version

    require 'rdoc/rdoc'

    @rdoc_version = Gem::Version.new ::RDoc::VERSION
  end

  ##
  # Creates a new documentation generator for +spec+.  RDoc and ri data
  # generation can be enabled or disabled through +generate_rdoc+ and
  # +generate_ri+ respectively.
  #
  # Only +generate_ri+ is enabled by default.

  def initialize spec, generate_rdoc = false, generate_ri = true
    @doc_dir   = spec.doc_dir
    @force     = false
    @rdoc      = nil
    @spec      = spec

    @generate_rdoc = generate_rdoc
    @generate_ri   = generate_ri

    @rdoc_dir = spec.doc_dir 'rdoc'
    @ri_dir   = spec.doc_dir 'ri'
  end

  ##
  # Removes legacy rdoc arguments from +args+
  #--
  # TODO move to RDoc::Options

  def delete_legacy_args args
    args.delete '--inline-source'
    args.delete '--promiscuous'
    args.delete '-p'
    args.delete '--one-file'
  end

  ##
  # Generates documentation using the named +generator+ ("darkfish" or "ri")
  # and following the given +options+.
  #
  # Documentation will be generated into +destination+

  def document generator, options, destination
    generator_name = generator

    options = options.dup
    options.exclude ||= [] # TODO maybe move to RDoc::Options#finish
    options.setup_generator generator
    options.op_dir = destination
    options.finish

    generator = options.generator.new @rdoc.store, options

    @rdoc.options = options
    @rdoc.generator = generator

    say "Installing #{generator_name} documentation for #{@spec.full_name}"

    FileUtils.mkdir_p options.op_dir

    Dir.chdir options.op_dir do
      begin
        @rdoc.class.current = @rdoc
        @rdoc.generator.generate
      ensure
        @rdoc.class.current = nil
      end
    end
  end

  ##
  # Generates RDoc and ri data

  def generate
    return if @spec.default_gem?
    return unless @generate_ri or @generate_rdoc

    setup

    options = nil

    args = @spec.rdoc_options
    args.concat @spec.source_paths
    args.concat @spec.extra_rdoc_files

    case config_args = Gem.configuration[:rdoc]
    when String then
      args = args.concat config_args.split
    when Array then
      args = args.concat config_args
    end

    delete_legacy_args args

    Dir.chdir @spec.full_gem_path do
      options = ::RDoc::Options.new
      options.default_title = "#{@spec.full_name} Documentation"
      options.parse args
    end

    options.quiet = !Gem.configuration.really_verbose

    @rdoc = new_rdoc
    @rdoc.options = options

    store = RDoc::Store.new
    store.encoding = options.encoding
    store.dry_run  = options.dry_run
    store.main     = options.main_page
    store.title    = options.title

    @rdoc.store = store

    say "Parsing documentation for #{@spec.full_name}"

    Dir.chdir @spec.full_gem_path do
      @rdoc.parse_files options.files
    end

    document 'ri',       options, @ri_dir if
      @generate_ri   and (@force or not File.exist? @ri_dir)

    document 'darkfish', options, @rdoc_dir if
      @generate_rdoc and (@force or not File.exist? @rdoc_dir)
  end

  ##
  # #new_rdoc creates a new RDoc instance.  This method is provided only to
  # make testing easier.

  def new_rdoc # :nodoc:
    ::RDoc::RDoc.new
  end

  ##
  # Is rdoc documentation installed?

  def rdoc_installed?
    File.exist? @rdoc_dir
  end

  ##
  # Removes generated RDoc and ri data

  def remove
    base_dir = @spec.base_dir

    raise Gem::FilePermissionError, base_dir unless File.writable? base_dir

    FileUtils.rm_rf @rdoc_dir
    FileUtils.rm_rf @ri_dir
  end

  ##
  # Is ri data installed?

  def ri_installed?
    File.exist? @ri_dir
  end

  ##
  # Prepares the spec for documentation generation

  def setup
    self.class.load_rdoc

    raise Gem::FilePermissionError, @doc_dir if
      File.exist?(@doc_dir) and not File.writable?(@doc_dir)

    FileUtils.mkdir_p @doc_dir unless File.exist? @doc_dir
  end

end

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 03 2024 22:48:02
root / root
0755
context
--
March 03 2024 22:48:01
root / linksafe
0755
generator
--
March 03 2024 22:48:01
root / linksafe
0755
i18n
--
March 03 2024 22:48:01
root / linksafe
0755
markdown
--
March 03 2024 22:48:01
root / linksafe
0755
markup
--
March 03 2024 22:48:01
root / linksafe
0755
parser
--
March 03 2024 22:48:01
root / linksafe
0755
rd
--
March 03 2024 22:48:01
root / linksafe
0755
ri
--
March 03 2024 22:48:01
root / linksafe
0755
stats
--
March 03 2024 22:48:01
root / linksafe
0755
alias.rb
2.123 KB
March 31 2020 11:42:18
root / linksafe
0644
anon_class.rb
0.169 KB
March 31 2020 11:42:18
root / linksafe
0644
any_method.rb
7.067 KB
March 31 2020 11:42:18
root / linksafe
0644
attr.rb
3.76 KB
March 31 2020 11:42:18
root / linksafe
0644
class_module.rb
19.757 KB
March 31 2020 11:42:18
root / linksafe
0644
code_object.rb
9.351 KB
March 31 2020 11:42:18
root / linksafe
0644
code_objects.rb
0.148 KB
March 31 2020 11:42:18
root / linksafe
0644
comment.rb
5.285 KB
March 31 2020 11:42:18
root / linksafe
0644
constant.rb
3.577 KB
March 31 2020 11:42:18
root / linksafe
0644
context.rb
28.798 KB
March 31 2020 11:42:18
root / linksafe
0644
cross_reference.rb
5.854 KB
March 31 2020 11:42:18
root / linksafe
0644
encoding.rb
2.985 KB
March 31 2020 11:42:18
root / linksafe
0644
erb_partial.rb
0.392 KB
March 31 2020 11:42:18
root / linksafe
0644
erbio.rb
0.806 KB
March 31 2020 11:42:18
root / linksafe
0644
extend.rb
0.167 KB
March 31 2020 11:42:18
root / linksafe
0644
generator.rb
1.795 KB
March 31 2020 11:42:18
root / linksafe
0644
ghost_method.rb
0.142 KB
March 31 2020 11:42:18
root / linksafe
0644
i18n.rb
0.178 KB
March 31 2020 11:42:18
root / linksafe
0644
include.rb
0.169 KB
March 31 2020 11:42:18
root / linksafe
0644
known_classes.rb
2.623 KB
March 31 2020 11:42:18
root / linksafe
0644
markdown.rb
373.6 KB
March 31 2020 11:42:18
root / linksafe
0644
markup.rb
28.267 KB
March 31 2020 11:42:18
root / linksafe
0644
meta_method.rb
0.127 KB
March 31 2020 11:42:18
root / linksafe
0644
method_attr.rb
9.036 KB
March 31 2020 11:42:18
root / linksafe
0644
mixin.rb
2.753 KB
March 31 2020 11:42:18
root / linksafe
0644
normal_class.rb
2.135 KB
March 31 2020 11:42:18
root / linksafe
0644
normal_module.rb
1.434 KB
March 31 2020 11:42:18
root / linksafe
0644
options.rb
30.342 KB
March 31 2020 11:42:18
root / linksafe
0644
parser.rb
7.801 KB
March 31 2020 11:42:18
root / linksafe
0644
rd.rb
3.568 KB
March 31 2020 11:42:18
root / linksafe
0644
rdoc.rb
13.387 KB
March 31 2020 11:42:18
root / linksafe
0644
require.rb
0.943 KB
March 31 2020 11:42:18
root / linksafe
0644
ri.rb
0.338 KB
March 31 2020 11:42:18
root / linksafe
0644
ruby_lex.rb
27.474 KB
March 31 2020 11:42:18
root / linksafe
0644
ruby_token.rb
11.354 KB
March 31 2020 11:42:18
root / linksafe
0644
rubygems_hook.rb
5.143 KB
March 31 2020 11:42:18
root / linksafe
0644
servlet.rb
11.897 KB
March 31 2020 11:42:18
root / linksafe
0644
single_class.rb
0.399 KB
March 31 2020 11:42:18
root / linksafe
0644
stats.rb
10.479 KB
March 31 2020 11:42:18
root / linksafe
0644
store.rb
21.94 KB
March 31 2020 11:42:18
root / linksafe
0644
task.rb
7.672 KB
March 31 2020 11:42:18
root / linksafe
0644
test_case.rb
3.778 KB
March 31 2020 11:42:18
root / linksafe
0644
text.rb
7.337 KB
March 31 2020 11:42:18
root / linksafe
0644
token_stream.rb
2.503 KB
March 31 2020 11:42:18
root / linksafe
0644
tom_doc.rb
6.293 KB
March 31 2020 11:42:18
root / linksafe
0644
top_level.rb
5.44 KB
March 31 2020 11:42:18
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF