v0.4.0 - New Tricks 🎾
🐕 Keela v0.4.0 - "New Tricks"
The one where Keela learned to explain herself, speak robot, and sniff in new places.
🔍 "Show Your Work" Mode
Ever wonder why Keela found (or didn't find) something? Now you can ask.
keela --verbose=== Verbose Mode ===
Configuration:
Extensions: rb, haml, erb
Directory patterns: app/**/*.%<ext>s, lib/**/*.%<ext>s
Files to scan (847):
app/models/user.rb
app/models/post.rb
...
No more guessing why that method in lib/ wasn't detected. (#53)
📍 "Where Exactly?" Mode
Reports now tell you the line number:
keela --source-location --reportapp/models/user.rb:
- legacy_method app/models/user.rb:47
- old_callback app/models/user.rb:123Jump straight to the crime scene. (#55)
🧹 "Clean Up Your Exclusions" Mode
That exclusion file you've been maintaining? Some of those entries are probably stale.
keela --test-exclusions✅ Valid exclusions (12):
methods:
app/models/user.rb:metaprogrammed_method
⚠️ Stale exclusions found (2):
methods:
app/models/user.rb:renamed_method — no definition found
app/models/deleted_file.rb:foo — file not found
Exit code 1 if stale entries found. Perfect for CI. (#56)
🤖 Keela Speaks Robot Now
New output format for our AI overlords:
keela --format toon --reportstrategies[2]: methods,scopes
unused:
methods:
"app/models/user.rb"[2]: old_method,legacy_helper
summary:
total: 2
TOON uses ~40-50% fewer tokens than JSON. Feed Keela's findings to your LLM without blowing your context window. (#58)
🗺️ Teach Keela New Places to Sniff
By default, Keela only looks for method definitions in app/helpers and app/models. Got code in lib/? Now you can tell her:
# keela.yml
strategies:
methods:
definition_paths:
- app/helpers
- app/models
- lib/
- ee/app/modelsEnterprise edition directories, engine code, wherever your methods hide. (#59)
⚠️ Behavior Change
--quiet now means quiet. Previously it just hid the progress bar but still printed results. Now it suppresses ALL output. Use exit codes in your scripts.
If you were parsing --quiet output... sorry. This is better, we promise. (#54)
🐛 Bug Fixes
-
Multi-method delegates -
delegate :foo, :bar, :baz, to: :targetnow detects all three methods, not just:foo. Keela was getting distracted after the first one. (#51) -
Class methods -
def self.important_methodwas being marked as "used" because Keela sawself.important_methodin the definition and thought "oh someone's calling it!" No, Keela, that's the definition. Fixed. (#60)
Upgrade
gem install keela
# or
bundle update keelaFull Changelog
10 PRs in one release. Keela's been a very busy girl. 🦴