Commit graph

23 commits

Author SHA1 Message Date
Claudio Bley
22fb57ac21 Use console_size if console is nil
When running on github actions CI, there is no proper tty / console.
2021-05-06 14:24:47 +02:00
Claudio Bley
93b08f9403 Prefer require_relative for internal dependencies 2021-01-15 11:03:21 +01:00
Claudio Bley
0ad630da4c Properly encode hyperlinks with special characters
This also works on Windows now, since absolute paths include a colon after the
drive letter, the `file:` URI needs to start with a triple slash.
2021-01-15 11:03:21 +01:00
Claudio Bley
67ee23069c Take display width of characters into account
Some Unicode characters, e.g. chinese, consume more space when displayed on a terminal
than a single roman character. To avoid alignment issues, try to determine the width
using the unicode-display_width gem.
2020-11-22 21:29:51 +01:00
Claudio Bley
d528bf18ef Introduce Layout classes and use them
* add `Layout` base class which contains the base (binary) algorithm
  for finding the maximum amount of columns fitting the given limit
* add `HorizontalLayout` and use it in `Core`
* add `SingleColumnLayout` and use it in `Core`
2019-07-01 23:16:33 +02:00
Claudio Bley
e02b30a111 Drop support for Ruby 2.2
It reached EOL on 20th Jun 2018 and no longer receives patches.

* set required Ruby version to >= 2.3 in spec file
* set rubocop's TargetRubyVersion to 2.3 and fix all the offenses
2019-01-04 12:08:06 +01:00
Claudio Bley
694fdee03c Use git rev-parse to find git root path 2018-01-02 11:02:36 +01:00
Claudio Bley
e0ebbdb3d0 Add FileInfo class, reduce syscalls 2018-01-02 11:02:36 +01:00
Claudio Bley
fe78028949 Use IO#winsize instead of calling out to tput
If the window size cannot be determined, use a default of 80 columns, just like
tput.
2017-12-10 10:05:30 +01:00
Claudio Bley
bebe09f5f7 Use clocale gem for proper sorting 2017-12-01 09:05:04 +01:00
Alex
1cd2029126 Create yaml class and add class methods. Move specs to appropriate folder. Fix method calls. Move flags spec to appropriate folder for rubocop 2017-11-07 19:22:37 -05:00
Athitya
7543257c7e Removes require call of git gem 2017-10-29 05:39:40 +05:30
Athitya
9dbe6cde49 Adds rubocop fixes 2017-10-29 05:35:57 +05:30
Athitya
0984a529ac Adds custom config coloring support for faster git-status 2017-10-29 05:32:38 +05:30
Athitya
a6a6fffd64 Removes facets dependency 2017-10-28 22:55:05 +05:30
Athitya
5619a5bbf8 Requires monkey patches 2017-10-28 21:58:22 +05:30
Athitya
aeb3a3950c Switches from colorize to rainbow dependency 2017-10-28 18:21:01 +05:30
rohitner
6b14f40331 minor bug fixes and changed rubocop 2017-08-26 18:31:37 +05:30
Tom Lazar
1afa3aa682 Adds colors.yaml file (#81)
* add colors.yaml file and switch any color reference to use it in
`lib/colors/core.rb`

* add light and dark verions of the commands, also moved load_from_yaml

* fix typo

* add colors for new commands from the merge

* fix name and update colors for the light and dark scheme

* fixed small typo when no files are found
2017-07-14 11:44:17 +05:30
GladOSkar
46f86a44bc add -l / --long flag 2017-07-10 11:35:59 +02:00
Athitya
39b7282c8a Updates to gem v0.1.3 2017-07-07 20:19:46 +05:30
Athitya
4905321dca Updates Ruby gem for release 0.1.0 2017-07-05 22:15:46 +05:30
Athitya
f993755f0e Adds ruby gem skeleton 2017-07-05 19:53:11 +05:30
Renamed from colorls.rb (Browse further)