tty-table
tty-table copied to clipboard
How to disable rotating?
I'd like that to be a simple render option.
The automatic rotation is a little crazy because it also happens when testing code via rspec... specs might pass on your dev machine, but fail if they're run by a dev that uses a narrower terminal, or in travis (https://travis-ci.org/kontena/kontena/jobs/353727211#L861)
Workaround is to fake the screen size...
before do
allow(TTY::Screen).to receive(:width).and_return(1000)
end
The table.render resize: true
behavior does not help, and it's actually buggy as well (exceptions in the alignment/truncation operations if the terminal is narrower than some column).