add code to remove files within gems after bundler gets call

Fixes #2285
This commit is contained in:
Pere Urbon-Bayes 2014-12-30 18:36:53 +01:00 committed by Jordan Sissel
parent 2ec759a676
commit ab0a654be8

View file

@ -121,7 +121,6 @@ namespace "vendor" do
Rake::Task["dependency:rbx-stdlib"] if LogStash::Environment.ruby_engine == "rbx"
Rake::Task["dependency:stud"].invoke
Rake::Task["vendor:bundle"].invoke("tools/Gemfile") if args.to_hash.empty? || args[:bundle]
end # task gems
task "all" => "gems"
@ -146,6 +145,11 @@ namespace "vendor" do
end
end
# We aim to clean up specs within the logstash related projects, as we know they
# not necessary to have while packaging.
Dir.glob("vendor/bundle/jruby/*/gems/logstash-*/spec").each do |dir|
FileUtils.rm_rf(dir)
end
# because --path creates a .bundle/config file and changes bundler path
# we need to remove this file so it doesn't influence following bundler calls
FileUtils.rm_rf(::File.join(LogStash::Environment::LOGSTASH_HOME, "tools/.bundle"))