Commit graph

654 commits

Author SHA1 Message Date
Claudio Bley
3a9e95c653 Use RSpec's output matcher instead of capture_output 2019-03-14 23:50:53 +01:00
Claudio Bley
c0d9266378 Fix spec failures due to calling exit 2019-03-14 23:37:55 +01:00
Claudio Bley
5b7b583733
Merge pull request #269 from avdv/ignore-h-option
Add `--human-readable` option for compatibility with GNU ls
2019-03-14 15:28:34 +01:00
Claudio Bley
6d6d121553 Add --human-readable option for compatibility with GNU ls
* make `-h` an alias for `--human-readable`
* both options are simply ignored when used with an argument or another option
* running `colorls -h` still shows the help text since just as before
2019-03-14 14:48:19 +01:00
Claudio Bley
3fb904614d
Merge pull request #268 from avdv/git-prefix
Improve git status handling

Close #265
2019-03-12 11:25:17 +01:00
Claudio Bley
c92b5c59a4 Fix git status reporting for file arguments 2019-03-11 23:42:38 +01:00
Claudio Bley
6f500722d0 Add String#delete_prefix method for Ruby < 2.5 2019-03-11 23:17:52 +01:00
Claudio Bley
b5caa35de5 Compute git status relative to the actual directory
Using the `--show-prefix` option for `git ref-parse` simplifies determining the
status for the child items.

Previsouly, `File.realdirpath` was used to determine an absolute path, but this
method returns a path without symlinks. This caused status to be reported about
the link target instead of the symlink.
2019-03-11 23:17:52 +01:00
Claudio Bley
1c5f5a0292
Merge pull request #261 from avdv/alpha-releases
Create prereleases on rubygems.
2019-02-26 22:06:05 +01:00
Claudio Bley
e945c3ae7d Publish prereleases to rubygems
By default `gem list` only shows proper releases, use `gem list -r --pre` in
order to list prereleases too.

Use `gem install colorls --pre` to install a prerelease.

See [here](https://guides.rubygems.org/patterns/#prerelease-gems) for details.
2019-02-26 21:57:25 +01:00
Claudio Bley
b354c01031 travis: Automatically deploy to rubygems 2019-02-26 21:42:09 +01:00
dependabot[bot]
2deb4411e5
Merge pull request #258 from athityakumar/dependabot/bundler/rubocop-tw-0.65.0 2019-02-20 19:43:17 +00:00
dependabot[bot]
bafe6e2731
Update rubocop requirement from ~> 0.64.0 to ~> 0.65.0
Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.64.0...v0.65.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-19 23:15:34 +00:00
dependabot[bot]
65a3f2dfba
Merge pull request #257 from athityakumar/dependabot/bundler/rubocop-tw-0.64.0 2019-02-11 23:20:05 +00:00
dependabot[bot]
9e849fee90
Update rubocop requirement from ~> 0.63.0 to ~> 0.64.0
Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/commits/v0.64.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-11 23:15:14 +00:00
dependabot[bot]
5804f924c3
Merge pull request #255 from athityakumar/dependabot/bundler/rubocop-tw-0.63.0 2019-01-17 07:30:13 +00:00
dependabot[bot]
39b1ce9f94
Update rubocop requirement from ~> 0.62.0 to ~> 0.63.0
Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/commits/v0.63.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-16 23:15:25 +00:00
Alex Cano
c60a2ebec8 Add the option to handle depth for the tree flag (#253)
* Add the option to handle depth for the tree flag

* Update README to describe the new option for the tree flag

* Add tests
2019-01-11 07:36:02 +01:00
Claudio Bley
3897c6cba2
Merge pull request #252 from avdv/exclude-specs-from-coverage
spec: Exclude specs from coverage
2019-01-04 13:54:32 +01:00
Claudio Bley
ce9be74c7a spec: Exclude specs from coverage 2019-01-04 13:45:25 +01:00
Claudio Bley
e47626e7af
Merge pull request #251 from athityakumar/dependabot/bundler/bundler-tw-2.0
Update bundler requirement from ~> 1.15 to ~> 2.0, drop Ruby 2.2 support.
2019-01-04 12:16:26 +01: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
b6a5366159 travis: Upgrade RubyGems to the latest version and install bundler 2
This fixes build failures due to Bundler 2.0 requires rubygems >= 3.0.0
2019-01-04 12:08:06 +01:00
dependabot[bot]
53a3cc9a5a Update bundler requirement from ~> 1.15 to ~> 2.0
Updates the requirements on [bundler](https://github.com/bundler/bundler) to permit the latest version.
- [Release notes](https://github.com/bundler/bundler/releases)
- [Changelog](https://github.com/bundler/bundler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bundler/bundler/commits/v2.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-04 12:07:54 +01:00
dependabot[bot]
31c3bfaef8 Update rubocop requirement from ~> 0.61.1 to ~> 0.62.0
Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/commits/v0.62.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-04 12:07:54 +01:00
Claudio Bley
2e25373916
Merge pull request #250 from athityakumar/dependabot/bundler/rubocop-tw-0.62.0
Update rubocop requirement from ~> 0.61.1 to ~> 0.62.0
2019-01-02 11:51:36 +01:00
dependabot[bot]
4ed9353148
Update rubocop requirement from ~> 0.61.1 to ~> 0.62.0
Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/commits/v0.62.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-01 23:12:49 +00:00
Claudio Bley
602de5a5bb
Merge pull request #249 from avdv/add-ruby-2.6-no-warnings
Add ruby 2.6 no warnings
2018-12-29 17:36:34 +01:00
Claudio Bley
c6d1b44e11 travis: Add Ruby 2.6 to build matrix
Ruby 2.6 has been released on 25th Dec 2018.
2018-12-29 17:23:07 +01:00
Claudio Bley
d3541c1afc travis: Only build pushes on master, PRs to master and tags
This avoids duplicate builds for PRs of branches for the origin repository (e.g.
from dependabot).
2018-12-29 17:23:07 +01:00
Claudio Bley
9c266c9fda Make ColorLS::Git a module instead of a class
There is no reason it should inherit from `Core`.
2018-12-29 17:23:07 +01:00
Claudio Bley
306bcd3cbc Fix warning about method redefinement
`lib/colorls/monkeys.rb:26: warning: method redefined; discarding old sum`
2018-12-29 17:13:33 +01:00
Claudio Bley
73e036c939 Fix warning about unintialized instance variable
`warning: instance variable @git_status not initialized`
2018-12-29 16:46:51 +01:00
Claudio Bley
3e53464ddf Enable warnings when running RSpec from rake
- travis: Use rake to run specs to generate warnings.
2018-12-29 16:46:51 +01:00
dependabot[bot]
74c7c9c0a1
Merge pull request #244 from athityakumar/dependabot/bundler/rubocop-tw-0.61.1 2018-12-28 18:01:20 +00:00
Claudio Bley
f0e53937de Fix rubocop warnings 2018-12-28 18:55:57 +01:00
Claudio Bley
6061590a34 Set rubocop target Ruby version to 2.2 2018-12-28 18:55:57 +01:00
dependabot[bot]
ff852e1ea1 Update rubocop requirement from ~> 0.57.2 to ~> 0.61.1
Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/commits/v0.61.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-28 18:55:57 +01:00
dependabot[bot]
a0bef84712
Merge pull request #247 from athityakumar/dependabot/bundler/rdoc-tw-6.1 2018-12-28 17:29:49 +00:00
Claudio Bley
4033995a83 spec: Avoid failures when STDOUT is no TTY
When using secret variables in Travis CI, the output gets filtered through a
helper process by default (called `redirect_io` strategy) and hence the `STDOUT`
is no longer a real TTY when running the specs. See [1].

[1]: https://github.com/travis-ci/travis-ci/issues/6018
2018-12-28 18:15:27 +01:00
dependabot[bot]
dde0195ec0
Update rdoc requirement from ~> 5.1 to ~> 6.1
Updates the requirements on [rdoc](https://github.com/ruby/rdoc) to permit the latest version.
- [Release notes](https://github.com/ruby/rdoc/releases)
- [Changelog](https://github.com/ruby/rdoc/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rdoc/commits/v6.1.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-28 15:34:53 +00:00
Claudio Bley
6e5a0825d8
Merge pull request #248 from avdv/codecov
Report code coverage to codecov.io
2018-12-28 16:32:50 +01:00
Claudio Bley
9d7d48d48f Report code coverage to codecov.io 2018-12-28 16:28:21 +01:00
Claudio Bley
f0ff45e69d
Merge pull request #245 from avdv/drop-ruby-2.1
Drop support for Ruby 2.1
2018-12-09 09:29:19 +01:00
Claudio Bley
9c8a93565e Drop support for Ruby 2.1
It reached EOL already and rubocop > 0.60 no longer supports it.
2018-12-09 09:23:52 +01:00
Claudio Bley
421284ffb1
Merge pull request #239 from JustinHallquist/add-forwardable-dep
add forwardable dependency
2018-11-20 17:56:53 +01:00
Justin Hallquist
54bafa03f0 add forwardable dependency 2018-11-20 08:38:25 -08:00
Claudio Bley
7a9ea25808
Merge pull request #229 from avdv/socket-chardev-blockdev
Add support for special files
2018-11-12 08:23:51 +01:00
Claudio Bley
ab419d2ce6
Merge pull request #228 from avdv/add-format-option
Add `--format` and `-x` options
2018-10-23 11:57:00 +02:00
Claudio Bley
5d6fe50edd Remove _keys arrays from Core, use key? instead
Instead of searching through an Array, it is much better querying a Hash for a
key.
2018-10-21 23:27:38 +02:00