ruby, gem: update page; irb, rake: add page (#10412)

* gem: update page

* Use `snake_case` for placeholders
* Update the documentation URL

* ruby: move `irb` example to a separate page

* rake: add page

* ruby: reference other ruby-related pages

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* irb: standard input => `stdin` (#10436)

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
pull/23/head
Lena 2023-08-09 09:09:12 +02:00 committed by GitHub
parent 0238aa119e
commit 3f9320290a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 14 deletions

View File

@ -1,7 +1,7 @@
# gem # gem
> Interact with the package manager for the Ruby programming language. > A package manager for the Ruby programming language.
> More information: <https://rubygems.org>. > More information: <https://guides.rubygems.org>.
- Search for remote gem(s) and show all available versions: - Search for remote gem(s) and show all available versions:
@ -9,19 +9,19 @@
- Install the latest version of a gem: - Install the latest version of a gem:
`gem install {{gemname}}` `gem install {{gem_name}}`
- Install specific version of a gem: - Install a specific version of a gem:
`gem install {{gemname}} --version {{1.0.0}}` `gem install {{gem_name}} --version {{1.0.0}}`
- Install the latest matching (SemVer) version of a gem: - Install the latest matching (SemVer) version of a gem:
`gem install {{gemname}} --version '~> {{1.0}}'` `gem install {{gem_name}} --version '~> {{1.0}}'`
- Update a gem: - Update a gem:
`gem update {{gemname}}` `gem update {{gem_name}}`
- List all local gems: - List all local gems:
@ -29,8 +29,8 @@
- Uninstall a gem: - Uninstall a gem:
`gem uninstall {{gemname}}` `gem uninstall {{gem_name}}`
- Uninstall specific version of a gem: - Uninstall a specific version of a gem:
`gem uninstall {{gemname}} --version {{1.0.0}}` `gem uninstall {{gem_name}} --version {{1.0.0}}`

9
pages/common/irb.md Normal file
View File

@ -0,0 +1,9 @@
# irb
> Interactive Ruby shell.
> Evaluate Ruby code read from `stdin`.
> More information: <https://docs.ruby-lang.org/en/master/IRB.html>.
- Start the interactive shell:
`irb`

25
pages/common/rake.md Normal file
View File

@ -0,0 +1,25 @@
# rake
> A Make-like program for Ruby.
> Tasks for `rake` are specified in a Rakefile.
> More information: <https://ruby.github.io/rake>.
- Run the `default` Rakefile task:
`rake`
- Run a specific task:
`rake {{task}}`
- Execute `n` jobs at a time in parallel (number of CPU cores + 4 by default):
`rake --jobs {{n}}`
- Use a specific Rakefile:
`rake --rakefile {{path/to/Rakefile}}`
- Execute `rake` from another directory:
`rake --directory {{path/to/directory}}`

View File

@ -1,12 +1,9 @@
# ruby # ruby
> Ruby programming language interpreter. > Ruby programming language interpreter.
> See also: `gem`, `bundler`, `rake`, `irb`.
> More information: <https://www.ruby-lang.org>. > More information: <https://www.ruby-lang.org>.
- Start a REPL (interactive shell):
`irb`
- Execute a Ruby script: - Execute a Ruby script:
`ruby {{script.rb}}` `ruby {{script.rb}}`