ruby: extract abi_version method
This commit is contained in:
parent
64be7e30fc
commit
cc419af3e1
1 changed files with 6 additions and 2 deletions
|
@ -69,7 +69,11 @@ class Ruby < Formula
|
||||||
|
|
||||||
# Customize rubygems to look/install in the global gem directory
|
# Customize rubygems to look/install in the global gem directory
|
||||||
# instead of in the Cellar, making gems last across reinstalls
|
# instead of in the Cellar, making gems last across reinstalls
|
||||||
(lib/"ruby/2.1.0/rubygems/defaults/operating_system.rb").write rubygems_config
|
(lib/"ruby/#{abi_version}/rubygems/defaults/operating_system.rb").write rubygems_config
|
||||||
|
end
|
||||||
|
|
||||||
|
def abi_version
|
||||||
|
"2.1.0"
|
||||||
end
|
end
|
||||||
|
|
||||||
def rubygems_config; <<-EOS.undent
|
def rubygems_config; <<-EOS.undent
|
||||||
|
@ -86,7 +90,7 @@ class Ruby < Formula
|
||||||
"lib",
|
"lib",
|
||||||
"ruby",
|
"ruby",
|
||||||
"gems",
|
"gems",
|
||||||
"2.1.0"
|
"#{abi_version}"
|
||||||
]
|
]
|
||||||
|
|
||||||
@default_dir ||= File.join(*path)
|
@default_dir ||= File.join(*path)
|
||||||
|
|
Loading…
Reference in a new issue