Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions v2/ruby/lib/terminalwire/v2/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ def session
end
end

# Delegate `session` from the CLI instance to its shell — matching v1's
# `def_delegators :shell, :session` — so unchanged Thor code that calls `session`
# (current_user, login, whoami) works over v2 without app changes.
Terminalwire::V2::Server::Thor::Helpers.module_eval do
def session = shell.session
end

module Terminalwire
module V2
# Drop-in Rails integration for serving a Terminalwire CLI over BOTH the v1
Expand Down
Loading