From 95e8e4421d96e87026883a3a8b00c2ffccbb5704 Mon Sep 17 00:00:00 2001 From: Jeremy Friesen Date: Sat, 1 Feb 2020 17:00:22 -0500 Subject: [PATCH] =?UTF-8?q?Removing=20spec=20files=20from=20gem=20distribu?= =?UTF-8?q?tion=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This time for real. With SHA 42bf8a1c41c52ceaa9811f60ae94411fce57c785 I removed the test_files from gem distrubtion. However, the files would have continued to be distributed. I discovered this when I went to try to release Hyrax 2.7.0, and got the same error. I wrote the Regular Expression to skip the spec directory. This leaves me a bit non-plussed, as its more invasive and seems to break more of the practices. To test if this would work, I made the change and then ran: ```console $ gem build hyrax.gemspec ``` That command built the gem file for distribution, and worked. My plan is to push up a second commit to compare and contrast. I'm not happy with what is needed, as the previous commit felt appropriate and this feels more invasive. Perhaps I'm overly concerned and this is the best means forward, especially considering our discussion. This builds on PR #4239 --- hyrax.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyrax.gemspec b/hyrax.gemspec index 1a61830925..23dc7b80c0 100644 --- a/hyrax.gemspec +++ b/hyrax.gemspec @@ -16,7 +16,7 @@ SUMMARY spec.homepage = "http://github.com/samvera/hyrax" - spec.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR) + spec.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR).select { |f| File.dirname(f) !~ %r{\A"?spec\/?} } spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) } spec.name = "hyrax" spec.require_paths = ["lib"]