Skip to content

Commit 3b0de89

Browse files
authored
Add Ruby ecosystem cache support (#6)
- rbenv versions (~/.rbenv/versions) - mise rubies (~/.local/share/mise/installs/ruby) - RVM (~/.rvm) - Bundler cache (~/.bundle/cache) Closes #2 Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 parent 426b37a commit 3b0de89

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

Sources/ClearDisk/DiskMonitor.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,11 @@ class DiskMonitor: ObservableObject {
371371
"Rust Cargo": "Cached crate sources and registries. Re-downloads on cargo build.",
372372
"Flutter/Pub Cache": "Cached Dart/Flutter packages. Re-downloads on flutter pub get.",
373373
"JetBrains Cache": "IDE caches (IntelliJ, WebStorm, etc). Rebuilds on IDE restart.",
374-
"Ruby Gems": "Installed Ruby gems and documentation. Re-install with bundle install.",
374+
"Ruby Gems": "Installed gems and docs. Reinstall with bundle install.",
375+
"rbenv Versions": "Ruby versions managed by rbenv. Reinstall with rbenv install X.Y.Z.",
376+
"mise Rubies": "Ruby versions managed by mise. Reinstall with mise install ruby@X.Y.Z.",
377+
"RVM": "RVM rubies and gemsets. Reinstall with rvm install X.Y.Z.",
378+
"Bundler Cache": "Downloaded gem files. Rebuilds automatically with bundle install.",
375379
]
376380

377381
/// Resolve DerivedData subfolders to project names using info.plist → WorkspacePath
@@ -466,6 +470,10 @@ class DiskMonitor: ObservableObject {
466470
("JetBrains Cache", "\(home)/.cache/JetBrains"),
467471
// Ruby
468472
("Ruby Gems", "\(home)/.gem"),
473+
("rbenv Versions", "\(home)/.rbenv/versions"),
474+
("mise Rubies", "\(home)/.local/share/mise/installs/ruby"),
475+
("RVM", "\(home)/.rvm"),
476+
("Bundler Cache", "\(home)/.bundle/cache"),
469477
]
470478
}
471479

@@ -515,6 +523,10 @@ class DiskMonitor: ObservableObject {
515523
("JetBrains Cache", "laptopcomputer", "\(home)/.cache/JetBrains", "safe"),
516524
// Ruby
517525
("Ruby Gems", "diamond.fill", "\(home)/.gem", "safe"),
526+
("rbenv Versions", "diamond.fill", "\(home)/.rbenv/versions", "caution"),
527+
("mise Rubies", "diamond.fill", "\(home)/.local/share/mise/installs/ruby", "caution"),
528+
("RVM", "diamond.fill", "\(home)/.rvm", "caution"),
529+
("Bundler Cache", "shippingbox.fill", "\(home)/.bundle/cache", "safe"),
518530
]
519531

520532
var caches: [DevCache] = []

0 commit comments

Comments
 (0)