From f20a64d35f8abdc4ed7c8d068052948682bca296 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Thu, 23 Aug 2018 01:34:18 -0700 Subject: [PATCH] Include `gem_build_complete_path` in jar (#439) `Gem::Specification#missing_extensions?` uses this file to determine if a gem has properly completed building extensions. --- lib/warbler/jar.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/warbler/jar.rb b/lib/warbler/jar.rb index 66ba767c..9665efb9 100644 --- a/lib/warbler/jar.rb +++ b/lib/warbler/jar.rb @@ -234,6 +234,11 @@ def find_single_gem_files(config, spec) next if config.gem_excludes && config.gem_excludes.any? {|rx| f =~ rx } @files[apply_pathmaps(config, File.join(spec.full_name, f), :gems)] = src end + if File.exist?(spec.gem_build_complete_path) + base_dir = Pathname.new(spec.base_dir) + gem_build_complete_path = Pathname.new(spec.gem_build_complete_path) + @files[File.join(config.relative_gem_path, gem_build_complete_path.relative_path_from(base_dir))] = spec.gem_build_complete_path + end end # Add all application directories and files to the archive.