-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converted chruby to generic ruby (#437)
* Converted chruby to generic ruby * Attempt at tests * Only show the Ruby version if current directory has .rb files * Only show the Ruby version if current directory has .rb files * Revert "Only show the Ruby version if current directory has .rb files" This reverts commit 136b02c. * Refactor * Removed .tool-versions * Sort configs * Sort icons * Remove pending changes * Sort for remove_unusable_items --------- Co-authored-by: Ilan Cosman <ilancosman@gmail.com>
- Loading branch information
1 parent
1e08167
commit 9252158
Showing
12 changed files
with
44 additions
and
35 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
function _tide_item_ruby | ||
if path is $_tide_parent_dirs/{*.gemspec,Gemfile,Rakefile,.ruby-version} | ||
ruby --version | string match -qr "(?<v>[\d.]+)" | ||
_tide_print_item ruby $tide_ruby_icon' ' $v | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# RUN: %fish %s | ||
_tide_parent_dirs | ||
|
||
function _ruby | ||
_tide_decolor (_tide_item_ruby) | ||
end | ||
|
||
set -l ruby_directory (mktemp -d) | ||
cd $ruby_directory | ||
|
||
mock ruby --version "echo 'ruby 3.2.0 (2022-12-25 revision a528908271) +YJIT [arm64-darwin22]'" | ||
|
||
set -lx tide_ruby_icon | ||
|
||
_ruby # CHECK: | ||
|
||
touch Gemfile | ||
|
||
_ruby # CHECK: 3.2.0 | ||
|
||
command rm -r $ruby_directory |