mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Store perl/python/icu/ruby versions for packages as constants in const.rb (#10528)
* Adjust const.rb and packages to use generated version constants. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update gem binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update update scripts. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Libxml2 => 2.13.4 Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust install.sh to handle new gem package versioning suffix. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * update openimageio Signed-off-by: Satadru Pramanik <satadru@gmail.com> * update py3_ruff Signed-off-by: Satadru Pramanik <satadru@gmail.com> * add pip binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Move activesupport gem behind requre_gem function. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust file path in ruby_pry. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * lint Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e9425c5098
commit
8473668c0d
@@ -1,4 +1,3 @@
|
||||
require 'active_support/core_ext/object/blank'
|
||||
require 'digest/sha2'
|
||||
require 'io/console'
|
||||
require 'uri'
|
||||
@@ -6,6 +5,27 @@ require_relative 'const'
|
||||
require_relative 'color'
|
||||
require_relative 'progress_bar'
|
||||
|
||||
def require_gem(gem_name_and_require = nil, require_override = nil)
|
||||
# Allow only loading gems when needed.
|
||||
return if gem_name_and_require.nil?
|
||||
|
||||
gem_name = gem_name_and_require.split('/')[0]
|
||||
begin
|
||||
gem gem_name
|
||||
rescue LoadError
|
||||
puts " -> install #{gem_name} gem".orange
|
||||
Gem.install(gem_name)
|
||||
gem gem_name
|
||||
end
|
||||
requires = if require_override.nil?
|
||||
gem_name_and_require.split('/')[1].nil? ? gem_name_and_require.split('/')[0] : gem_name_and_require
|
||||
else
|
||||
require_override
|
||||
end
|
||||
require requires
|
||||
end
|
||||
require_gem('activesupport', 'active_support/core_ext/object/blank')
|
||||
|
||||
begin
|
||||
require 'securerandom'
|
||||
require 'resolv-replace'
|
||||
|
||||
Reference in New Issue
Block a user