
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Add this line to your application's Gemfile:
gem 'termtable'
And then execute:
$ bundle
Or install it yourself as:
$ gem install termtable
A table instance can take a 2 dimensional array for the rows.
table = Termtable::Table.new [[1, 2, 3], [4, 5, 6]]
This can also be given as a hash with a rows key.
table = Termtable::Table.new rows: [[1, 2, 3], [4, 5, 6]]
puts table.render
+--+--+--+
|1 |2 |3 |
|4 |5 |6 |
+--+--+--+
Headers can be given as the first array
Termtable::Table.new ['Header A', 'Header B'], [['a1', 'a2'], ['b1', 'b2']]
Also as a headers key
Termtable::Table.new headers: ['Header A', 'Header B'], rows: [['a1', 'a2'], ['b1', 'b2']]
+---------+---------+
|Header A |Header B |
+---------+---------+
|a1 |a2 |
|b1 |b2 |
+---------+---------+
It is possible to pass a padding argument to the render method
table = Termtable::Table.new rows: [['a1', 'a2'], ['b1', 12345]]
puts table.render(padding: 3)
+-----+--------+
|a1 |a2 |
|b1 |12345 |
+-----+--------+
It is possible to pass an alignment argument to render
table = Termtable::Table.new rows: [['a1', 'a2'], ['b1', 123456]]
puts table.render(alignment: 'center')
+----+--------+
| a1 | a2 |
| b1 | 123456 |
+----+--------+
To run the tests
$ rake
Bug reports and pull requests are welcome on GitHub at https://github.com/nikkypx/termtable.
FAQs
Unknown package
We found that termtable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.