mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-06 22:24:12 -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
@@ -2,6 +2,7 @@ require 'fileutils'
|
||||
require_relative '../lib/const'
|
||||
require_relative '../lib/package'
|
||||
require_relative '../lib/package_utils'
|
||||
require_relative '../lib/require_gem'
|
||||
|
||||
class Command
|
||||
def self.check(name, force)
|
||||
@@ -18,7 +19,14 @@ class Command
|
||||
# Use rubocop to sanitize package file, and let errors get flagged.
|
||||
if Kernel.system('rubocop --version', %i[out err] => File::NULL)
|
||||
puts "Using rubocop to sanitize #{local_package}".orange
|
||||
system "rubocop -c #{File.join(CREW_LOCAL_REPO_ROOT, '.rubocop.yml')} -A #{local_package}", exception: true
|
||||
# The .rubocop.yml file is found in the rubocop-chromebrew gem
|
||||
require_gem('rubocop-chromebrew')
|
||||
if File.file?(File.join(CREW_LOCAL_REPO_ROOT, '.rubocop.yml'))
|
||||
system "rubocop -c #{File.join(CREW_LOCAL_REPO_ROOT, '.rubocop.yml')} -A #{local_package}", exception: true
|
||||
else
|
||||
puts 'The configuration file for rubocop in .rubocop.yml, from the rubocop-chromebrew gem, was not found.'.lightred
|
||||
puts 'To install rubocop-chromebrew, run the following command: '.lightred + "crew #{PackageUtils.installed?('ruby_rubocop_chromebrew') ? 're' : ''}install ruby_rubocop_chromebrew".lightblue
|
||||
end
|
||||
else
|
||||
puts "Rubocop is not installed, and thus will not be used to sanitize #{local_package}".lightred
|
||||
puts 'To install Rubocop, run the following command: '.lightred + "crew #{PackageUtils.installed?('ruby_rubocop') ? 're' : ''}install ruby_rubocop".lightblue
|
||||
|
||||
@@ -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]/) }
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
require 'etc'
|
||||
|
||||
OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
|
||||
CREW_VERSION ||= '1.58.1' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
CREW_VERSION ||= '1.58.2' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
|
||||
# Kernel architecture.
|
||||
KERN_ARCH ||= Etc.uname[:machine]
|
||||
|
||||
@@ -129,7 +129,7 @@ def http_downloader(uri, filename = File.basename(url), verbose: false)
|
||||
downloaded_size = 0.0
|
||||
|
||||
# initialize progress bar
|
||||
progress_bar = ProgressBar.new(file_size)
|
||||
progress_bar = ChromebrewProgressBar.new(file_size)
|
||||
|
||||
if verbose
|
||||
warn <<~EOT
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'io/console'
|
||||
require_relative 'color'
|
||||
require_relative 'misc_functions'
|
||||
|
||||
class ProgressBar
|
||||
class ChromebrewProgressBar
|
||||
class InvalidSizeError < StandardError; end
|
||||
|
||||
attr_accessor :progress_bar_showing
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'package'
|
||||
class Buildessential < Package
|
||||
description 'A collection of tools essential to compile and build software.'
|
||||
homepage 'SKIP'
|
||||
version '1.41'
|
||||
version '1.42'
|
||||
license 'GPL-3+'
|
||||
compatibility 'all'
|
||||
|
||||
@@ -176,7 +176,7 @@ class Buildessential < Package
|
||||
depends_on 'ruby_pry_byebug'
|
||||
# Add rubocop for linting packages. (This also installs the
|
||||
# rubocop config file.)
|
||||
# depends_on 'ruby_rubocop'
|
||||
depends_on 'ruby_rubocop'
|
||||
|
||||
# Code quality
|
||||
depends_on 'py3_pre_commit'
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
||||
class Ruby_bundler < RUBY
|
||||
description "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably."
|
||||
homepage 'https://bundler.io'
|
||||
version "2.6.7-#{CREW_RUBY_VER}"
|
||||
version "2.6.8-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
||||
class Ruby_csv < RUBY
|
||||
description 'The csv library provides a complete interface to csv files and data.'
|
||||
homepage 'https://github.com/ruby/csv'
|
||||
version "3.3.3-#{CREW_RUBY_VER}"
|
||||
version "3.3.4-#{CREW_RUBY_VER}"
|
||||
license 'BSD-2-Clause'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
||||
class Ruby_parallel < RUBY
|
||||
description 'Run any code in parallel Processes(> use all CPUs), Threads(> speedup blocking operations), or Ractors(> use all CPUs).'
|
||||
homepage 'https://github.com/grosser/parallel'
|
||||
version "1.26.3-#{CREW_RUBY_VER}"
|
||||
version "1.27.0-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
||||
class Ruby_pry_byebug < RUBY
|
||||
description 'Adds step-by-step debugging and stack navigation capabilities to pry using byebug.'
|
||||
homepage 'https://github.com/deivid-rodriguez/pry-byebug'
|
||||
version "3.10.1-#{CREW_RUBY_VER}"
|
||||
version "3.11.0-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
||||
class Ruby_reline < RUBY
|
||||
description 'Alternative GNU Readline or Editline implementation by pure Ruby.'
|
||||
homepage 'https://github.com/ruby/reline'
|
||||
version "0.6.0-#{CREW_RUBY_VER}"
|
||||
version "0.6.1-#{CREW_RUBY_VER}"
|
||||
license 'Ruby'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
||||
class Ruby_rubocop_chromebrew < RUBY
|
||||
description 'A RuboCop extension to enforce Chromebrew-specific practices.'
|
||||
homepage 'https://github.com/chromebrew/rubocop-chromebrew'
|
||||
version "0.0.3-#{CREW_RUBY_VER}"
|
||||
version "0.0.4-#{CREW_RUBY_VER}"
|
||||
license 'GPL-3.0-or-later'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
||||
class Ruby_rubygems_update < RUBY
|
||||
description 'RubyGems is a package management framework for Ruby.'
|
||||
homepage 'https://github.com/rubygems/rubygems'
|
||||
version "3.6.3-#{CREW_RUBY_VER}"
|
||||
version "3.6.8-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
Reference in New Issue
Block a user