mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
use bundler compatible ruby version string
This commit is contained in:
parent
0d3df38cb9
commit
cc2155919f
2 changed files with 7 additions and 2 deletions
|
@ -43,7 +43,7 @@ require "bundler/cli"
|
|||
module Bundler
|
||||
module SharedHelpers
|
||||
def default_lockfile
|
||||
ruby = "#{LogStash::Environment.ruby_engine}-#{LogStash::Environment.ruby_abi_version}"
|
||||
ruby = "#{LogStash::Environment.ruby_engine}-#{LogStash::Environment.gem_ruby_version}"
|
||||
return Pathname.new("#{default_gemfile}.#{ruby}.lock")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -29,7 +29,7 @@ module LogStash
|
|||
end
|
||||
|
||||
def set_gem_paths!
|
||||
gemdir = "#{gem_target}/#{ruby_engine}/#{ruby_abi_version}/"
|
||||
gemdir = "#{gem_target}/#{ruby_engine}/#{gem_ruby_version}/"
|
||||
ENV["GEM_HOME"] = gemdir
|
||||
ENV["GEM_PATH"] = gemdir
|
||||
end
|
||||
|
@ -39,6 +39,11 @@ module LogStash
|
|||
RUBY_VERSION[/(\d+\.\d+)(\.\d+)*/, 1]
|
||||
end
|
||||
|
||||
# @return [String] the ruby version string bundler uses to craft its gem path
|
||||
def gem_ruby_version
|
||||
RbConfig::CONFIG["ruby_version"]
|
||||
end
|
||||
|
||||
# @return [String] jruby, ruby, rbx, ...
|
||||
def ruby_engine
|
||||
RUBY_ENGINE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue