Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tibra/tty-table
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: piotrmurach/tty-table
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 15 commits
  • 11 files changed
  • 2 contributors

Commits on Dec 15, 2020

  1. Fix typo in README.md

    tibra authored Dec 15, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a4af9af View commit details

Commits on Mar 1, 2021

  1. Copy the full SHA
    04ed554 View commit details
  2. Copy the full SHA
    274e897 View commit details
  3. Copy the full SHA
    b2af2ab View commit details

Commits on Jun 2, 2021

  1. Copy the full SHA
    91fef15 View commit details
  2. Copy the full SHA
    ead9999 View commit details
  3. Copy the full SHA
    b858295 View commit details
  4. Copy the full SHA
    c77b541 View commit details

Commits on Jul 12, 2022

  1. Copy the full SHA
    d788b6d View commit details

Commits on Jul 13, 2022

  1. Copy the full SHA
    6cd0d00 View commit details

Commits on Aug 3, 2023

  1. Copy the full SHA
    286da33 View commit details

Commits on Aug 4, 2023

  1. Copy the full SHA
    2cb2475 View commit details

Commits on Aug 5, 2023

  1. Copy the full SHA
    6bbfa61 View commit details

Commits on Mar 5, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    piotrmurach Piotr Murach
    Copy the full SHA
    d2318ee View commit details

Commits on Mar 6, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    piotrmurach Piotr Murach
    Copy the full SHA
    192396c View commit details
18 changes: 13 additions & 5 deletions .github/ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
### Are you in the right place?
* For issues or feature requests file a GitHub issue in this repository
* For general questions or discussion post in [Gitter](https://gitter.im/piotrmurach/tty)
---
name: Bug report
about: Report something not working correctly or as expected
title: ''
labels: bug
assignees: ''
---

### Describe the problem
A brief description of the issue/feature.

A brief description of the issue.

### Steps to reproduce the problem

```
Your code here to reproduce the issue
```

### Actual behaviour
What happened? This could be a description, log output, error raised etc...

What happened? This could be a description, log output, error raised etc.

### Expected behaviour

What did you expect to happen?

### Describe your environment
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest new functionality
title: ''
labels: enhancement
assignees: ''
---

### Describe the problem

A brief description of the problem you're trying to solve.

### How would the new feature work?

A short explanation of the new feature.

```
Example code that shows possible usage
```

### Drawbacks

Can you see any potential drawbacks?
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: TTY Community Discussions
url: https://github.com/piotrmurach/tty/discussions
about: Suggest ideas, ask and answer questions
11 changes: 6 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -11,8 +11,9 @@ How will the library improve?
Possible drawbacks applying this change.

### Requirements
Put an X between brackets on each line if you have done the item:
[] Tests written & passing locally?
[] Code style checked?
[] Rebased with `master` branch?
[] Documentation updated?
<!--- Put an X between brackets on each line if you have done the item: -->
- [ ] Tests written & passing locally?
- [ ] Code style checked?
- [ ] Rebased with `master` branch?
- [ ] Documentation updated?
- [ ] Changelog updated?
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: CI
on:
push:
branches:
- master
paths-ignore:
- "benchmarks/**"
- "examples/**"
- "*.md"
pull_request:
branches:
- master
paths-ignore:
- "benchmarks/**"
- "examples/**"
- "*.md"
jobs:
tests:
name: Ruby ${{ matrix.ruby }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
ruby:
- "2.0"
- "2.1"
- "2.3"
- "2.4"
- "2.5"
- "2.6"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- ruby-head
- jruby-9.2
- jruby-9.3
- jruby-9.4
- jruby-head
- truffleruby-head
include:
- ruby: "2.2"
os: ubuntu-20.04
- ruby: "2.7"
coverage: true
env:
COVERAGE: ${{ matrix.coverage }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake ci
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

150 changes: 104 additions & 46 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -2,73 +2,131 @@

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contributes to a positive environment for our
community include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior by participants include:
Examples of unacceptable behavior include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
## Enforcement Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at piotr@piotrmurach.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
reported to the community leaders responsible for enforcement at
piotr@piotrmurach.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
12 changes: 9 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -2,17 +2,23 @@ source "https://rubygems.org"

gemspec

if RUBY_VERSION.split(".")[1].to_i > 0
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.1.0")
gem "rspec-benchmark"
end
if RUBY_VERSION == "2.0.0"
gem "json", "2.4.1"
gem "rake", "12.3.3"
end

group :tools do
gem "yard", "~> 0.9.12"
end

group :metrics do
gem "coveralls", "~> 0.8.22"
gem "simplecov", "~> 0.16.1"
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.5.0")
gem "coveralls_reborn", "~> 0.21.0"
gem "simplecov", "~> 0.21.0"
end
gem "yardstick", "~> 0.9.9"
end

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<div align="center">
<a href="https://ttytoolkit.org" target="_blank"><img width="130" src="https://github.com/piotrmurach/tty/blob/master/images/tty.png" alt="TTY Toolkit logo" /></a>
<a href="https://ttytoolkit.org"><img width="130" src="https://github.com/piotrmurach/tty/blob/master/images/tty.png" alt="TTY Toolkit logo" /></a>
</div>

# TTY::Table [![Gitter](https://badges.gitter.im/Join%20Chat.svg)][gitter]

[![Gem Version](https://badge.fury.io/rb/tty-table.svg)][gem]
[![Build Status](https://secure.travis-ci.org/piotrmurach/tty-table.svg?branch=master)][travis]
[![Actions CI](https://github.com/piotrmurach/tty-table/workflows/CI/badge.svg?branch=master)][gh_actions_ci]
[![Build status](https://ci.appveyor.com/api/projects/status/8fxrbawbyomqd979?svg=true)][appveyor]
[![Code Climate](https://codeclimate.com/github/piotrmurach/tty-table/badges/gpa.svg)][codeclimate]
[![Coverage Status](https://coveralls.io/repos/github/piotrmurach/tty-table/badge.svg?branch=master)][coverage]
[![Inline docs](http://inch-ci.org/github/piotrmurach/tty-table.svg?branch=master)][inchpages]

[gitter]: https://gitter.im/piotrmurach/tty
[gem]: http://badge.fury.io/rb/tty-table
[travis]: http://travis-ci.org/piotrmurach/tty-table
[gh_actions_ci]: https://github.com/piotrmurach/tty-table/actions?query=workflow%3ACI
[appveyor]: https://ci.appveyor.com/project/piotrmurach/tty-table
[codeclimate]: https://codeclimate.com/github/piotrmurach/tty-table
[coverage]: https://coveralls.io/github/piotrmurach/tty-table
@@ -347,7 +347,7 @@ table.render(:unicode)

Rendering of **TTY-Table** includes numerous customization options:

* `:alignments` - array of cell alignments out of `:left`, `:center` and `:righit`. Defaults to `:left`.
* `:alignments` - array of cell alignments out of `:left`, `:center` and `:right`. Defaults to `:left`.
* `:border` - hash of border options out of `:characters`, `:style` and `:separator`
* `:border_class` - a type of border to use such as `TTY::Table::Border::Null`, `TTY::Table::Border::ASCII` and `TTY::Table::Border::Unicode`
* `:column_widths` - array of maximum column widths
5 changes: 5 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
skip_commits:
files:
- "benchmarks/**"
- "examples/**"
- "*.md"
install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- gem install bundler -v '< 2.0'
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

if ENV["COVERAGE"] || ENV["TRAVIS"]
if ENV["COVERAGE"] == "true"
require "simplecov"
require "coveralls"