From 4dbb6f5392e2bf47555f2f0b1e8c19164dbce190 Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 13 Apr 2017 15:52:43 -0700 Subject: [PATCH] Fix bug with gem_excludes not being used on bundler gems --- lib/warbler/traits/bundler.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/warbler/traits/bundler.rb b/lib/warbler/traits/bundler.rb index d7330edd..fb984135 100644 --- a/lib/warbler/traits/bundler.rb +++ b/lib/warbler/traits/bundler.rb @@ -108,10 +108,8 @@ def add_bundler_files(jar) filenames = [] gem_relative_path.each_filename { |f| filenames << f } - exclude_gems = true unless filenames.empty? full_gem_path = Pathname.new(::Bundler.install_path) + filenames.first - exclude_gems = false end if spec.groups.include?(:warbler_excluded) @@ -122,7 +120,7 @@ def add_bundler_files(jar) FileList[pattern].each do |src| f = Pathname.new(src).relative_path_from(full_gem_path).to_s - next if exclude_gems && config.gem_excludes && config.gem_excludes.any? {|rx| f =~ rx } + next if config.gem_excludes && config.gem_excludes.any? {|rx| f =~ rx } jar.files[apply_pathmaps(config, File.join(full_gem_path.basename, f), :git)] = src end end