Installs the gem dep_or_name
and all its dependencies. Returns an Array
of installed gem specifications.
If the :prerelease
option is set and there is a prerelease for dep_or_name
the prerelease version will be installed.
Unless explicitly specified as a prerelease dependency, prerelease gems that dep_or_name
depend on will not be installed.
If c-1.a depends on b-1 and a-1.a and there is a gem b-1.a available then c-1.a, b-1 and a-1.a will be installed. b-1.a will need to be installed separately.
Changes in rubygems to lazily loading ‘rubygems/command` (in order to lazily load `optparse` as a side effect) affect bundler’s custom installer which uses ‘Gem::Command` without requiring it (up until bundler 2.2.29). This hook is to compensate for that missing require.
TODO: Remove when rubygems no longer supports running on bundler older than 2.2.29.
Installs the gem and returns a loaded Gem::Specification
for the installed gem.
The gem will be installed with the following structure:
@gem_home/ cache/<gem-version>.gem #=> a cached copy of the installed gem gems/<gem-version>/... #=> extracted files specifications/<gem-version>.gemspec #=> the Gem::Specification
Installs gems for this RequestSet
using the Gem::Installer
options
.
If a block
is given an activation request
and installer
are yielded. The installer
will be nil
if a gem matching the request was already installed.
Performs the uninstall of the gem. This removes the spec, the Gem
directory, and the cached .gem file.
Returns an array of missing elements
For example this:
ExplainSyntax.new(code_lines: lines).missing # => ["}"]
Would indicate that the source is missing a ‘}` character in the source code
Returns an array of missing syntax characters or ‘“end”` or `“keyword”`
left_right.missing # => ["}"]
Sets userinfo, argument is string like ‘name:pass’.
Returns the userinfo, either as ‘user’ or ‘user:password’.
Returns attributes.
Setter for attributes val
.
Formats and writes to the stream converting parameters under control of the format string.
See Kernel#sprintf
for format string details.
Check if gem name
version version
is installed.
return the stub script text used to launch the true Ruby
script
Expire memoized instance variables that can incorrectly generate, replace or miss files due changes in certain attributes used to compute them.
Shows the context around code provided by “falling” indentation
Converts:
it "foo" do
into:
class OH def hello it "foo" do end end
Helper method for grabbing elements from document
Like ‘take_while` except when it stops iterating, it also returns the line that caused it to stop