diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-08-15 16:48:42 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-17 17:08:50 +0900 |
commit | c896f71577e17e7b89ad39463b82d8936f000480 (patch) | |
tree | 6ac34bbb39b364052ecd38cb1de66976e7d79b85 /spec/bundler | |
parent | b43f4bd2184989c5f47ee539e583c785dfadb8d0 (diff) | |
download | ruby-c896f71577e17e7b89ad39463b82d8936f000480.tar.gz |
[bundler/bundler] Extract a `tracked_files` path helper
https://github.com/bundler/bundler/commit/d35e31d2e0
Diffstat (limited to 'spec/bundler')
-rw-r--r-- | spec/bundler/quality_spec.rb | 4 | ||||
-rw-r--r-- | spec/bundler/support/path.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/bundler/quality_spec.rb b/spec/bundler/quality_spec.rb index cbc58fd4cb..aa59e74662 100644 --- a/spec/bundler/quality_spec.rb +++ b/spec/bundler/quality_spec.rb @@ -108,7 +108,6 @@ RSpec.describe "The library itself" do exempt = /\.gitmodules|fixtures|vendor|LICENSE|vcr_cassettes|rbreadline\.diff|\.txt$/ error_messages = [] Dir.chdir(root) do - tracked_files = ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler` : `git ls-files -z` tracked_files.split("\x0").each do |filename| next if filename =~ exempt error_messages << check_for_tab_characters(filename) @@ -122,7 +121,6 @@ RSpec.describe "The library itself" do exempt = /vendor|vcr_cassettes|LICENSE|rbreadline\.diff/ error_messages = [] Dir.chdir(root) do - tracked_files = ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler` : `git ls-files -z` tracked_files.split("\x0").each do |filename| next if filename =~ exempt error_messages << check_for_straneous_quotes(filename) @@ -135,7 +133,6 @@ RSpec.describe "The library itself" do exempt = %r{quality_spec.rb|support/helpers|vcr_cassettes|\.md|\.ronn|\.txt|\.5|\.1} error_messages = [] Dir.chdir(root) do - tracked_files = ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler` : `git ls-files -z` tracked_files.split("\x0").each do |filename| next if filename =~ exempt error_messages << check_for_debugging_mechanisms(filename) @@ -148,7 +145,6 @@ RSpec.describe "The library itself" do error_messages = [] exempt = %r{lock/lockfile_spec|quality_spec|vcr_cassettes|\.ronn|lockfile_parser\.rb} Dir.chdir(root) do - tracked_files = ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler` : `git ls-files -z` tracked_files.split("\x0").each do |filename| next if filename =~ exempt error_messages << check_for_git_merge_conflicts(filename) diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb index 133d86e722..70ce645c0a 100644 --- a/spec/bundler/support/path.rb +++ b/spec/bundler/support/path.rb @@ -25,6 +25,10 @@ module Spec @spec_dir ||= root.join(ruby_core? ? "spec/bundler" : "spec") end + def tracked_files + @tracked_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler` : `git ls-files -z` + end + def tmp(*path) root.join("tmp", *path) end |