Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skull-squadron/hirb-unicode
https://github.com/skull-squadron/hirb-unicode
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/skull-squadron/hirb-unicode
- Owner: skull-squadron
- License: mit
- Created: 2023-05-11T03:48:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-11T03:49:53.000Z (over 1 year ago)
- Last Synced: 2024-04-22T20:31:43.407Z (9 months ago)
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Hirb-unicode
`hirb-unicode` fixes the problem that [full-width unicode characters](http://en.wikipedia.org/wiki/Fullwidth_form#Fullwidth_form) is aligned incorrectly.In the original `hirb` unicode gem, the full-width character will be misaligned:
![Original hirb screenshot](http://miaout17.github.com/hirb-unicode/hirb-original.png)
With `hirb-unicode-steakknife`, the cells is correctly aligned:
![Original hirb screenshot](http://miaout17.github.com/hirb-unicode/hirb-unicode.png)
## Installation
gem install hirb-unicode-steakknife
## Usage
This will load `hirb` and `hirb-unicode-steakknife`, and fix the unicode problem automtically:
gem 'hirb-unicode-steakknife'
require 'hirb-unicode'If you are using `bundler` (ex. Rails 3), add `hirb-unicode-steakknife` into your gemfile:
gem 'hirb-unicode-steakknife'
And run `require 'hirb-unicode'` in your irb console or `.irbrc`
## Dependency
`hirb-unicode-steakknife` uses `unicode-display_width` gem to calculate width of unicode characters.
## Testing
* `rake test:hirb` loads `hirb` and `hirb-unicode-steakknife`, run all test of original `hirb` gem. This ensures the original `hirb` functionality is not broken.
* `rake test:unicode` tests functions about unicode string processing.
* `rake test` run both two tests above.## License
Read MIT-LICENSE file for details.