Response class for Moved Permanently
responses (status code 301).
The Moved Permanently
response indicates that links or records returning this response should be updated to use the given URL. See 301 Moved Permanently.
Response class for Found
responses (status code 302).
The Found
response indicates that the client should look at (browse to) another URL. See 302 Found.
Response class for Expectation Failed
responses (status code 417).
The server cannot meet the requirements of the Expect request-header field. See 417 Expectation Failed.
Response class for Unavailable For Legal Reasons
responses (status code 451).
A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource. See 451 Unavailable For Legal Reasons.
Response class for Internal Server Error
responses (status code 500).
An unexpected condition was encountered and no more specific message is suitable. See 500 Internal Server Error.
Raises when switch is undefined.
Raises when the given argument does not match required format.
A table of LALR states.
A LALR state.
Raised when a hash-based tuple has an invalid key.
Potentially raised when a specification is validated.
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
Validator
performs various gem file and gem database validation
Used for formatting invalid blocks
Explains syntax errors based on their source
example:
source = "def foo; puts 'lol'" # Note missing end explain ExplainSyntax.new( code_lines: CodeLine.from_source(source) ).call explain.errors.first # => "Unmatched keyword, missing `end' ?"
When the error cannot be determined by lexical counting then ripper is run against the input and the raw ripper errors returned.
Example:
source = "1 * " # Note missing a second number explain ExplainSyntax.new( code_lines: CodeLine.from_source(source) ).call explain.errors.first # => "syntax error, unexpected end-of-input"
Value object for accessing lex values
This lex:
[1, 0], :on_ident, "describe", CMDARG
Would translate into:
lex.line # => 1 lex.type # => :on_indent lex.token # => "describe"
Not a URI
.