diff options
author | Bundlerbot <bot@bundler.io> | 2019-11-29 12:01:45 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2019-11-29 12:01:45 +0000 |
commit | 8c78566bf25917bd77c5183604c5d34c175eb987 (patch) | |
tree | 930c003949bde2a541341bc6ac321d4a1d76f73c | |
parent | 31f875ff81a3d738ef32a57952dcd2dded593a65 (diff) | |
parent | bb1981b1022f810af23653507071520ee1dd4520 (diff) | |
download | bundler-8c78566bf25917bd77c5183604c5d34c175eb987.tar.gz |
Merge #7459
7459: Unskip quality specs r=deivid-rodriguez a=deivid-rodriguez
### What was the end-user problem that led to this PR?
The problem was after 5003a436765eb50d9208ffdce4bbe46cf0d6d63b backported from ruby-core, quality_specs are no longer run, not even in our repo.
### What was your diagnosis of the problem?
My diagnosis was that the condition to check whether the root folder is a git folder was incorrect.
### What is your fix for the problem, implemented in this PR?
My fix is to correct the condition.
Co-authored-by: David RodrÃguez <deivid.rodriguez@riseup.net>
-rw-r--r-- | spec/support/path.rb | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/spec/support/path.rb b/spec/support/path.rb index 4b3941b70f..3e42589f4d 100644 --- a/spec/support/path.rb +++ b/spec/support/path.rb @@ -30,23 +30,20 @@ module Spec end def tracked_files - if root != `git rev-parse --show-toplevel` - skip "not in git working directory" - end + skip "not in git working directory" unless git_root_dir? + @tracked_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler man/bundler*` : `git ls-files -z` end def shipped_files - if root != `git rev-parse --show-toplevel` - skip "not in git working directory" - end + skip "not in git working directory" unless git_root_dir? + @shipped_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb man/bundler* libexec/bundle*` : `git ls-files -z -- lib man exe CHANGELOG.md LICENSE.md README.md bundler.gemspec` end def lib_tracked_files - if root != `git rev-parse --show-toplevel` - skip "not in git working directory" - end + skip "not in git working directory" unless git_root_dir? + @lib_tracked_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb` : `git ls-files -z -- lib` end @@ -182,5 +179,11 @@ module Spec end extend self + + private + + def git_root_dir? + root.to_s == `git rev-parse --show-toplevel`.chomp + end end end |