summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-11-29 12:01:45 +0000
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-13 20:07:19 +0100
commita2c2d3c5c55e4ed128ec8728c177d639213ecbe8 (patch)
tree903ac5e38aa091396dbc6450adc0663744d94d7c
parent8b11b7b961ffee99754265ea0a55916e65951115 (diff)
downloadbundler-a2c2d3c5c55e4ed128ec8728c177d639213ecbe8.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> (cherry picked from commit 8c78566bf25917bd77c5183604c5d34c175eb987)
-rw-r--r--spec/support/path.rb21
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