mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
AutoBuild: gem started at 2025-04-16-16UTC (#11724)
* Gem logic and version updates. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Use Time.new in progress_bar Signed-off-by: Satadru Pramanik <satadru@gmail.com> * WIP time issue Signed-off-by: Satadru Pramanik <satadru@gmail.com> * bump buildessential version Signed-off-by: Satadru Pramanik <satadru@gmail.com> * require time for progress_bar Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Try to fix time... Signed-off-by: Satadru Pramanik <satadru@gmail.com> * time debug Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Avoid conflict with progressbar gem. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Remove debug code Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Use CamelCase Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
456d16e80b
commit
1180b81ce4
@@ -44,10 +44,17 @@ def set_vars(passed_name = nil, passed_version = nil)
|
||||
$gems ||= BasicCompactIndexClient.new.gems
|
||||
puts 'Done populating gem information.'.lightgreen
|
||||
end
|
||||
# Parse gem information from compact index, the format for which is
|
||||
# here: https://guides.rubygems.org/rubygems-org-compact-index-api/
|
||||
# Figure out gem name, noting that there may be dashes and underscores
|
||||
# in the name.
|
||||
gem_test = $gems.grep(/#{"^#{passed_name.gsub(/^ruby_/, '')}\\s.*$"}/).last.blank? ? $gems.grep(/#{"^\(#{passed_name.gsub(/^ruby_/, '').gsub('_', ')*.(')}\\s\).*$"}/).last : $gems.grep(/#{"^#{passed_name.gsub(/^ruby_/, '')}\\s.*$"}/).last
|
||||
abort "Cannot find #{passed_name} gem to install.".lightred if gem_test.blank?
|
||||
gem_test_name = gem_test.split.first
|
||||
gem_test_versions = gem_test.split[1].split(',')
|
||||
# Remove minus prefixed versions, as those have been yanked as per
|
||||
# https://guides.rubygems.org/rubygems-org-compact-index-api/
|
||||
gem_test_versions.delete_if { |i| i.start_with?('-') }
|
||||
# Any version with a letter is considered a prerelease as per
|
||||
# https://github.com/rubygems/rubygems/blob/b5798efd348935634d4e0e2b846d4f455582db48/lib/rubygems/version.rb#L305
|
||||
gem_test_versions.delete_if { |i| i.match?(/[a-zA-Z]/) }
|
||||
|
||||
Reference in New Issue
Block a user