When running on Windows this test failed with:
```
Failures:
1) ColorLS::Flags symlinked directory with trailing separator shows the file in the linked directory
Failure/Error: expect { subject }.to output(/yaml_sort_checker.rb/).to_stdout
expected block to output /yaml_sort_checker.rb/ to stdout, but output " Supportlink \n"
Diff:
@@ -1 +1 @@
-/yaml_sort_checker.rb/
+ Supportlink
# ./spec/color_ls/flags_spec.rb:329:in `block (3 levels) in <top (required)>'
```
This is due to the different handling of paths to a symlink with a trailing
slash / backslash.
`File.lstat(x).directory?` returns
OS | x | value
----------------------------
Windows | symlink\ | false
Windows | symlink | false
Linux | symlink/ | true
Linux | symlink | false
This could be fixed in colorls by handling a trailing (back)slash specifically,
but I am unsure whether that is the right thing to do on Windows.
The files are automatically generated, but using rake's `file` task does not
work correctly when the files are checked into the repo since the timestamps are
updated independently of the commit time.
Removing them ensures that these files are always freshly generated before
building the gem and thus are always up-to-date which was often not the case in
the past.
If a directory was reported with a concrete status by git, it was
assumed that all files below this directory would have the same status.
This is not the case were git ignore files are applied to some files
in subdirectories.
Fixes#461.
The pessimistic version contraint on rubocop-rspec permitted minor version
updates of the dependency, which broke the tests again since version 2.9.0
introduced / changed offenses.
Allow only the patch version to increase automatically to avoid this in the future.
Make the `test/run` script compatible to the ancient Bash version on macos.
```
test/run: line 56: conditional binary operator expected
```
Also, run `set -e` only for Bash >= 4. Otherwise the shell silently exits with
a failure when a command (expectedly) fails.
fix bogus test failure with Bash 3.2 on macos