ignore .Gemfile.jruby-1.9.lock, .lock and Gemfile

Fixes #6985
This commit is contained in:
Armin Braun 2017-04-27 10:18:28 +02:00
parent 11d34204f5
commit b72b167161
3 changed files with 12 additions and 1 deletions

3
.gitignore vendored
View file

@ -33,6 +33,9 @@ qa/.vm_ssh_config
qa/.vagrant qa/.vagrant
qa/acceptance/.vagrant qa/acceptance/.vagrant
qa/Gemfile.lock qa/Gemfile.lock
Gemfile.jruby-1.9.lock
.lock
Gemfile
*.ipr *.ipr
*.iws *.iws
*.iml *.iml

View file

@ -13,7 +13,7 @@ module LogStash
end end
end end
# Patch to prevent Bundler to save a .bundle/config file in the root # Patch to prevent Bundler to save a .bundle/config file in the root
# of the application # of the application
::Bundler::Settings.module_exec do ::Bundler::Settings.module_exec do
def set_key(key, value, hash, file) def set_key(key, value, hash, file)
@ -95,6 +95,14 @@ module LogStash
require "bundler" require "bundler"
require "bundler/cli" require "bundler/cli"
# create Gemfile from template iff it does not exist
unless ::File.exists?(Environment::GEMFILE_PATH)
::FileUtils.copy(
::File.join(ENV["LOGSTASH_HOME"], "Gemfile.template"), Environment::GEMFILE_PATH
)
end
LogStash::Bundler.patch! LogStash::Bundler.patch!
# force Rubygems sources to our Gemfile sources # force Rubygems sources to our Gemfile sources