athityakumar / colorls

A Ruby gem that beautifies the terminal's ls command, with color and font-awesome icons. :tada:
MIT License
4.9k stars 387 forks source link

fix: 🐛 add support for files with no extension #577

Open olirwin opened 1 year ago

olirwin commented 1 year ago

Description

Updated the way the key is computed to allow for files without an extension to get icons.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +1.03 :tada:

Comparison is base (5e0b25a) 90.86% compared to head (fdcd93c) 91.89%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #577 +/- ## ========================================== + Coverage 90.86% 91.89% +1.03% ========================================== Files 8 8 Lines 580 617 +37 ========================================== + Hits 527 567 +40 + Misses 53 50 -3 ``` | [Impacted Files](https://app.codecov.io/gh/athityakumar/colorls/pull/577?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [lib/colorls/core.rb](https://app.codecov.io/gh/athityakumar/colorls/pull/577?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-bGliL2NvbG9ybHMvY29yZS5yYg==) | `92.80% <100.00%> (+2.00%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/athityakumar/colorls/pull/577/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

avdv commented 1 year ago

Thank you @olirwin!

The tests failed, can you fix them?

olirwin commented 1 year ago

Thank you @olirwin!

The tests failed, can you fix them?

Fixed as much as I could understand (there were 2 failing tests, one due to linter warnings, the other to test coverage). I am not in a position to write tests for this change in code.

The other tests were just being auto cancelled.

dmitrykok commented 5 months ago

Solved this: add support for files with no extension #577 and: Fixes Icons for files without extenstions #459 Relates to Icons for file with only one extension #469

tests:

bundle exec rubocop
bundle exec rspec
test/run

finished OK

Here you can see dot-files with icons and file without extension with icon, and also can be file only from dots: image

how to assign it to me ? and make me permission to commit branch and PR ?