D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Gem
/
Package
/
Filename :
cdesc-Package.ri
back
Copy
U:RDoc::NormalClass[iI"Package:ETI"Gem::Package;TI"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"!Example using a Gem::Package;To:RDoc::Markup::BlankLine o; ;[I"MBuilds a .gem file given a Gem::Specification. A .gem file is a tarball ;TI"Owhich contains a data.tar.gz, metadata.gz, checksums.yaml.gz and possibly ;TI"signatures.;T@o:RDoc::Markup::Verbatim;[I"require 'rubygems' ;TI" require 'rubygems/package' ;TI" ;TI"*spec = Gem::Specification.new do |s| ;TI"3 s.summary = "Ruby based make-like utility." ;TI" s.name = 'rake' ;TI" s.version = PKG_VERSION ;TI" s.requirements << 'none' ;TI" s.files = PKG_FILES ;TI" s.description = <<-EOF ;TI"<Rake is a Make-like program implemented in Ruby. Tasks ;TI"=and dependencies are specified in standard Ruby syntax. ;TI" EOF ;TI" end ;TI" ;TI"Gem::Package.build spec ;T:@format0o; ;[I"Reads a .gem file.;T@o;;[ I"require 'rubygems' ;TI" require 'rubygems/package' ;TI" ;TI"1the_gem = Gem::Package.new(path_to_dot_gem) ;TI"1the_gem.contents # get the files in the gem ;TI"Tthe_gem.extract_files destination_directory # extract the gem into a directory ;TI"0the_gem.spec # get the spec out of the gem ;TI"vthe_gem.verify # check the gem is OK (contains valid gem specification, contains a not corrupt contents archive) ;T;0o; ;[I"N#files are the files in the .gem tar file, not the Ruby files in the gem ;TI"<#extract_files and #contents automatically call #verify;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ I"checksums;TI"R;T:publicFI"lib/rubygems/package.rb;T[ I"data_mode;TI"RW;T;F@?[ I" dir_mode;T@B;F@?[ I" files;T@>;F@?[ I"gem;T@>;F@?[ I"prog_mode;T@B;F@?[ I"security_policy;T@B;F@?[ I" spec;TI"W;T;F@?[ [[I"Gem::UserInteraction;To;;[ ; @:;0@?[[I" class;T[[;[[I" build;T@?[I"new;T@?[I" raw_spec;T@?[:protected[ [:private[ [I" instance;T[[;[[I"add_checksums;T@?[I" build;T@?[I" contents;T@?[I"copy_to;T@?[I"extract_files;T@?[I"gzip_to;T@?[I"limit_read;T@?[I"normalize_path;T@?[I"read_checksums;T@?[I"setup_signer;T@?[I" spec;T@?[I"verify;T@?[I"verify_entry;T@?[I"verify_files;T@?[;[[I"initialize;T@?[;[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[@:I"&lib/rubygems/package/digest_io.rb;TI"(lib/rubygems/package/file_source.rb;TI"&lib/rubygems/package/io_source.rb;TI" lib/rubygems/package/old.rb;TI"#lib/rubygems/package/source.rb;TI"'lib/rubygems/package/tar_header.rb;TI"'lib/rubygems/package/tar_reader.rb;TI"-lib/rubygems/package/tar_reader/entry.rb;TI"'lib/rubygems/package/tar_writer.rb;T@:cRDoc::TopLevel