TupleSpaceProxy
allows a remote Tuplespace to appear as local.
Documentation?
The Tuplespace manages access to the tuples it contains, ensuring mutual exclusion requirements are met.
The sec
option for the write, take, move, read and notify methods may either be a number of seconds or a Renewer object.
Gem::ConfigFile
RubyGems options and gem command options from gemrc.
gemrc is a YAML
file that uses strings to match gem command arguments and symbols to match RubyGems options.
Gem
command arguments use a String
key that matches the command name and allow you to specify default arguments:
install: --no-rdoc --no-ri update: --no-rdoc --no-ri
You can use gem:
to set default arguments for all commands.
RubyGems options use symbol keys. Valid options are:
:backtrace
See backtrace
:sources
Sets Gem::sources
:verbose
See verbose
:concurrent_downloads
gemrc files may exist in various locations and are read and merged in the following order:
system wide (/etc/gemrc)
per user (~/.gemrc)
per environment (gemrc files listed in the GEMRC environment variable)
Raised when there are conflicting gem specs loaded
Example using a Gem::Package
Builds a .gem file given a Gem::Specification
. A .gem file is a tarball which contains a data.tar.gz, metadata.gz, checksums.yaml.gz and possibly signatures.
require 'rubygems' require 'rubygems/package' spec = Gem::Specification.new do |s| s.summary = "Ruby based make-like utility." s.name = 'rake' s.version = PKG_VERSION s.requirements << 'none' s.files = PKG_FILES s.description = <<-EOF Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax. EOF end Gem::Package.build spec
Reads a .gem file.
require 'rubygems' require 'rubygems/package' the_gem = Gem::Package.new(path_to_dot_gem) the_gem.contents # get the files in the gem the_gem.extract_files destination_directory # extract the gem into a directory the_gem.spec # get the spec out of the gem the_gem.verify # check the gem is OK (contains valid gem specification, contains a not corrupt contents archive)
files
are the files in the .gem tar file, not the Ruby files in the gem extract_files
and contents
automatically call verify
Create a package based upon a Gem::Specification
. Gem
packages, as well as zip files and tar/gzipped packages can be produced by this task.
In addition to the Rake targets generated by Rake::PackageTask, a Gem::PackageTask
will also generate the following tasks:
Create a RubyGems package with the given name and version.
Example using a Gem::Specification
:
require 'rubygems' require 'rubygems/package_task' spec = Gem::Specification.new do |s| s.summary = "Ruby based make-like utility." s.name = 'rake' s.version = PKG_VERSION s.requirements << 'none' s.files = PKG_FILES s.description = <<-EOF Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax. EOF end Gem::PackageTask.new(spec) do |pkg| pkg.need_zip = true pkg.need_tar = true end
Subclass of StreamUI that instantiates the user interaction using STDIN, STDOUT, and STDERR.
Not a URI
component.
File::Constants
provides file-related constants. All possible file constants are listed in the documentation but they may not all be present on your platform.
If the underlying platform doesn’t define a constant the corresponding Ruby constant is not defined.
Your platform documentations (e.g. man open(2)) may describe more detailed information.
A DSL that provides the means to dynamically load libraries and build modules around them including calling extern functions within the C library that has been loaded.
require 'fiddle' require 'fiddle/import' module LibSum extend Fiddle::Importer dlload './libsum.so' extern 'double sum(double*, int)' extern 'double split(double)' end
exception to wait for reading. see IO.select
.
This module contains configuration information about the SSL
extension, for example if socket support is enabled, or the host name TLS extension is enabled. Constants in this module will always be defined, but contain true
or false
values depending on the configuration of your OpenSSL
installation.
Socket::Constants
provides socket-related constants. All possible socket constants are listed in the documentation but they may not all be present on your platform.
If the underlying platform doesn’t define a constant the corresponding Ruby constant is not defined.
The WIN32OLE::VARIANT
module includes constants of VARIANT
type constants. The constants is used when creating WIN32OLE_VARIANT
object.
obj = WIN32OLE_VARIANT.new("2e3", WIN32OLE::VARIANT::VT_R4) obj.value # => 2000.0
This module has all methods of FileUtils
module, but never changes files/directories. This equates to passing the :noop
flag to methods in FileUtils
.