Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for piotrmurach/issues/35 #40

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pgorgita
Copy link

Describe the change

It fixes an issue that happens by rotating to vertical and back providing no header described at /issues/35.

Why are we doing this?

It was failing when the table size exceeds the currently set width and it defaults to vertical orientation.

Benefits

The gem will behave as expected when rotated to vertical and again when back to horizontal.

Drawbacks

None that I can foresee, but does not hurt to have a look before. Could be good to improve all specs to have further columns and different number of columns vs rows both including versions with more columns than rows and more rows than columns to check if further similar issues are found across the library.

Requirements

Put an X between brackets on each line if you have done the item:
[X] Tests written & passing locally?
[X] Code style checked?
[X] Rebased with master branch?
[] Documentation updated?

lib/tty/table/orientation/horizontal.rb Show resolved Hide resolved
spec/unit/rotate_spec.rb Show resolved Hide resolved
spec/unit/rotate_spec.rb Show resolved Hide resolved
spec/unit/rotate_spec.rb Show resolved Hide resolved
@@ -64,9 +68,13 @@
['h1', 'a1'],
['h2', 'a2'],
['h3', 'a3'],
['h4', 'a4'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/WordArray: Use %w or %W for an array of words.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

spec/unit/rotate_spec.rb Show resolved Hide resolved
spec/unit/rotate_spec.rb Show resolved Hide resolved
spec/unit/rotate_spec.rb Show resolved Hide resolved
spec/unit/rotate_spec.rb Show resolved Hide resolved
spec/unit/rotate_spec.rb Show resolved Hide resolved
@stillhart
Copy link

@piotrmurach can you have a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants