From 3f9320290aa19843f9c1bcbe461f2adcba80efb6 Mon Sep 17 00:00:00 2001 From: Lena <126529524+acuteenvy@users.noreply.github.com> Date: Wed, 9 Aug 2023 09:09:12 +0200 Subject: [PATCH] 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 * irb: standard input => `stdin` (#10436) --------- Co-authored-by: K.B.Dharun Krishna --- pages/common/gem.md | 20 ++++++++++---------- pages/common/irb.md | 9 +++++++++ pages/common/rake.md | 25 +++++++++++++++++++++++++ pages/common/ruby.md | 5 +---- 4 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 pages/common/irb.md create mode 100644 pages/common/rake.md diff --git a/pages/common/gem.md b/pages/common/gem.md index 44238d40a..500029c8d 100644 --- a/pages/common/gem.md +++ b/pages/common/gem.md @@ -1,7 +1,7 @@ # gem -> Interact with the package manager for the Ruby programming language. -> More information: . +> A package manager for the Ruby programming language. +> More information: . - Search for remote gem(s) and show all available versions: @@ -9,19 +9,19 @@ - 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: -`gem install {{gemname}} --version '~> {{1.0}}'` +`gem install {{gem_name}} --version '~> {{1.0}}'` - Update a gem: -`gem update {{gemname}}` +`gem update {{gem_name}}` - List all local gems: @@ -29,8 +29,8 @@ - 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}}` diff --git a/pages/common/irb.md b/pages/common/irb.md new file mode 100644 index 000000000..e6fa9750a --- /dev/null +++ b/pages/common/irb.md @@ -0,0 +1,9 @@ +# irb + +> Interactive Ruby shell. +> Evaluate Ruby code read from `stdin`. +> More information: . + +- Start the interactive shell: + +`irb` diff --git a/pages/common/rake.md b/pages/common/rake.md new file mode 100644 index 000000000..e055edad2 --- /dev/null +++ b/pages/common/rake.md @@ -0,0 +1,25 @@ +# rake + +> A Make-like program for Ruby. +> Tasks for `rake` are specified in a Rakefile. +> More information: . + +- 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}}` diff --git a/pages/common/ruby.md b/pages/common/ruby.md index 7649856bc..5cf1f7687 100644 --- a/pages/common/ruby.md +++ b/pages/common/ruby.md @@ -1,12 +1,9 @@ # ruby > Ruby programming language interpreter. +> See also: `gem`, `bundler`, `rake`, `irb`. > More information: . -- Start a REPL (interactive shell): - -`irb` - - Execute a Ruby script: `ruby {{script.rb}}`