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:
github-actions[bot]
2025-04-16 13:25:15 -05:00
committed by GitHub
parent 456d16e80b
commit 1180b81ce4
13 changed files with 28 additions and 13 deletions

View File

@@ -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]/) }