mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Update & add rubocop related gems. (#11241)
* Add/update missing ruby gems. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Remove extra blank lines. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add ruby_rubocop_chromebrew dep for unit tests. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Handle gem names with underscores and dashes. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * update rubocop Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add ruby_rubocop_chromebrew to packages.yaml 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
41702cc5b3
commit
51784d35ac
@@ -62,7 +62,8 @@ def set_vars(passed_name = nil, passed_version = nil)
|
||||
$gems ||= BasicCompactIndexClient.new.gems
|
||||
puts 'Done populating gem information.'.lightgreen
|
||||
end
|
||||
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
|
||||
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(',')
|
||||
# Any version with a letter is considered a prerelease as per
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
require 'etc'
|
||||
|
||||
OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
|
||||
CREW_VERSION ||= '1.56.8' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
CREW_VERSION ||= '1.56.9' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
|
||||
# Kernel architecture.
|
||||
KERN_ARCH ||= Etc.uname[:machine]
|
||||
|
||||
15
packages/ruby_ast.rb
Normal file
15
packages/ruby_ast.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'buildsystems/ruby'
|
||||
|
||||
class Ruby_ast < RUBY
|
||||
description "A library for working with Abstract Syntax Trees."
|
||||
homepage 'https://whitequark.github.io/ast/'
|
||||
version "2.4.2-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'ruby_parser' # R
|
||||
|
||||
conflicts_ok
|
||||
no_compile_needed
|
||||
end
|
||||
13
packages/ruby_language_server_protocol.rb
Normal file
13
packages/ruby_language_server_protocol.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
require 'buildsystems/ruby'
|
||||
|
||||
class Ruby_language_server_protocol < RUBY
|
||||
description "A Language Server Protocol SDK."
|
||||
homepage 'https://github.com/mtsmfm/language_server-protocol-ruby'
|
||||
version "3.17.0.4-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
conflicts_ok
|
||||
no_compile_needed
|
||||
end
|
||||
13
packages/ruby_parallel.rb
Normal file
13
packages/ruby_parallel.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
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}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
conflicts_ok
|
||||
no_compile_needed
|
||||
end
|
||||
16
packages/ruby_parser.rb
Normal file
16
packages/ruby_parser.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
require 'buildsystems/ruby'
|
||||
|
||||
class Ruby_parser < RUBY
|
||||
description "A Ruby parser written in pure Ruby."
|
||||
homepage 'https://github.com/whitequark/parser'
|
||||
version "3.3.7.0-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'ruby_ast' # R
|
||||
depends_on 'ruby_racc' # R
|
||||
|
||||
conflicts_ok
|
||||
no_compile_needed
|
||||
end
|
||||
13
packages/ruby_rainbow.rb
Normal file
13
packages/ruby_rainbow.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
require 'buildsystems/ruby'
|
||||
|
||||
class Ruby_rainbow < RUBY
|
||||
description "Colorize printed text on ANSI terminals."
|
||||
homepage 'https://github.com/sickill/rainbow'
|
||||
version "3.1.1-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
conflicts_ok
|
||||
no_compile_needed
|
||||
end
|
||||
13
packages/ruby_regexp_parser.rb
Normal file
13
packages/ruby_regexp_parser.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
require 'buildsystems/ruby'
|
||||
|
||||
class Ruby_regexp_parser < RUBY
|
||||
description "A library for tokenizing, lexing, and parsing Ruby regular expressions."
|
||||
homepage 'https://github.com/ammar/regexp_parser'
|
||||
version "2.10.0-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
conflicts_ok
|
||||
no_compile_needed
|
||||
end
|
||||
@@ -6,13 +6,24 @@ require 'buildsystems/ruby'
|
||||
class Ruby_rubocop < RUBY
|
||||
description 'A Ruby static code analyzer and formatter'
|
||||
homepage 'https://rubocop.org'
|
||||
version "1.71.1-#{CREW_RUBY_VER}"
|
||||
version "1.71.2-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'libyaml'
|
||||
depends_on 'xdg_base'
|
||||
depends_on 'libyaml' # R
|
||||
depends_on 'ruby_json' # R
|
||||
depends_on 'ruby_language_server_protocol' # R
|
||||
depends_on 'ruby_parallel' # R
|
||||
depends_on 'ruby_parser' # R
|
||||
depends_on 'ruby_parser' # R
|
||||
depends_on 'ruby_rainbow' # R
|
||||
depends_on 'ruby_regexp_parser' # R
|
||||
depends_on 'ruby_rubocop' # R
|
||||
depends_on 'ruby_rubocop_ast' # R
|
||||
depends_on 'ruby_ruby_progressbar' # R
|
||||
depends_on 'ruby_unicode_display_width' # R
|
||||
depends_on 'xdg_base' # L
|
||||
|
||||
conflicts_ok
|
||||
no_fhs
|
||||
|
||||
15
packages/ruby_rubocop_ast.rb
Normal file
15
packages/ruby_rubocop_ast.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'buildsystems/ruby'
|
||||
|
||||
class Ruby_rubocop_ast < RUBY
|
||||
description "Contains the classes needed by RuboCop to deal with Ruby's AST."
|
||||
homepage 'https://github.com/rubocop/rubocop-ast'
|
||||
version "1.38.0-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'ruby_parser' # R
|
||||
|
||||
conflicts_ok
|
||||
no_compile_needed
|
||||
end
|
||||
15
packages/ruby_rubocop_chromebrew.rb
Normal file
15
packages/ruby_rubocop_chromebrew.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
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.2-#{CREW_RUBY_VER}"
|
||||
license 'GPL-3.0-or-later'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'ruby_rubocop' # R
|
||||
|
||||
conflicts_ok
|
||||
no_compile_needed
|
||||
end
|
||||
13
packages/ruby_ruby_progressbar.rb
Normal file
13
packages/ruby_ruby_progressbar.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
require 'buildsystems/ruby'
|
||||
|
||||
class Ruby_ruby_progressbar < RUBY
|
||||
description "Ruby/ProgressBar is an extremely flexible text progress bar library for Ruby."
|
||||
homepage 'https://github.com/jfelchner/ruby-progressbar'
|
||||
version "1.13.0-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
conflicts_ok
|
||||
no_compile_needed
|
||||
end
|
||||
15
packages/ruby_unicode_display_width.rb
Normal file
15
packages/ruby_unicode_display_width.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'buildsystems/ruby'
|
||||
|
||||
class Ruby_unicode_display_width < RUBY
|
||||
description 'Determines the monospace display width of a string in Ruby, which is useful for all kinds of terminal-based applications.'
|
||||
homepage 'https://github.com/janlelis/unicode-display_width'
|
||||
version "3.1.4-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'ruby_unicode_emoji' # R
|
||||
|
||||
conflicts_ok
|
||||
no_compile_needed
|
||||
end
|
||||
13
packages/ruby_unicode_emoji.rb
Normal file
13
packages/ruby_unicode_emoji.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
require 'buildsystems/ruby'
|
||||
|
||||
class Ruby_unicode_emoji < RUBY
|
||||
description "Provides various sophisticated regular expressions to work with Emoji in strings, incorporating the latest Unicode / Emoji standards."
|
||||
homepage 'https://github.com/janlelis/unicode-emoji'
|
||||
version "4.0.4-#{CREW_RUBY_VER}"
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
conflicts_ok
|
||||
no_compile_needed
|
||||
end
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# create_gem_packages version 1.3 (for Chromebrew)
|
||||
# create_gem_packages version 1.4 (for Chromebrew)
|
||||
# This creates ruby gem packages based upon the default and bundled gems
|
||||
# listed at https://stdgems.org/
|
||||
# OR from gem names passed in as arguments.
|
||||
@@ -133,7 +133,6 @@ def create_gem_package(package)
|
||||
license '#{license}'
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
#{dependencyblock}
|
||||
conflicts_ok
|
||||
#{check_gem_binary_build_needed(package, version) ? 'gem_compile_needed' : 'no_compile_needed'}
|
||||
|
||||
@@ -7965,6 +7965,11 @@ url: https://github.com/asciidoctor/asciidoctor/releases
|
||||
activity: medium
|
||||
---
|
||||
kind: url
|
||||
name: ruby_ast
|
||||
url: https://github.com/whitequark/ast/tags
|
||||
activity: low
|
||||
---
|
||||
kind: url
|
||||
name: ruby_byebug
|
||||
url: https://github.com/deivid-rodriguez/byebug/releases
|
||||
activity: low
|
||||
@@ -8000,11 +8005,26 @@ url: https://github.com/JEG2/highline/tags
|
||||
activity: medium
|
||||
---
|
||||
kind: url
|
||||
name: ruby_language_server_protocol
|
||||
url: https://github.com/mtsmfm/language_server-protocol-ruby/tags
|
||||
activity: high
|
||||
---
|
||||
kind: url
|
||||
name: ruby_mdl
|
||||
url: https://github.com/markdownlint/markdownlint/tags
|
||||
activity: low
|
||||
---
|
||||
kind: url
|
||||
name: ruby_parallel
|
||||
url: https://github.com/grosser/parallel/tags
|
||||
activity: medium
|
||||
---
|
||||
kind: url
|
||||
name: ruby_parser
|
||||
url: https://github.com/whitequark/parser/tags
|
||||
activity: high
|
||||
---
|
||||
kind: url
|
||||
name: ruby_pry
|
||||
url: https://github.com/pry/pry/tags
|
||||
activity: low
|
||||
@@ -8015,6 +8035,16 @@ url: https://github.com/deivid-rodriguez/pry-byebug/releases
|
||||
activity: low
|
||||
---
|
||||
kind: url
|
||||
name: ruby_rainbow
|
||||
url: https://github.com/ku1ik/rainbow/tags
|
||||
activity: low
|
||||
---
|
||||
kind: url
|
||||
name: ruby_regexp_parser
|
||||
url: https://github.com/ammar/regexp_parser/tags
|
||||
activity: high
|
||||
---
|
||||
kind: url
|
||||
name: ruby_repl_type_completor
|
||||
url: https://github.com/ruby/repl_type_completor/tags
|
||||
activity: high
|
||||
@@ -8025,11 +8055,36 @@ url: https://github.com/rubocop/rubocop/releases
|
||||
activity: medium
|
||||
---
|
||||
kind: url
|
||||
name: ruby_rubocop_ast
|
||||
url: https://github.com/rubocop/rubocop-ast/tags
|
||||
activity: high
|
||||
---
|
||||
kind: url
|
||||
name: ruby_rubocop_chromebrew
|
||||
url: https://github.com/chromebrew/rubocop-chromebrew/tags
|
||||
activity: medium
|
||||
---
|
||||
kind: url
|
||||
name: ruby_ruby_libversion
|
||||
url: https://github.com/Zopolis4/ruby-libversion/tags
|
||||
activity: medium
|
||||
---
|
||||
kind: url
|
||||
name: ruby_ruby_progressbar
|
||||
url: https://github.com/jfelchner/ruby-progressbar/tags
|
||||
activity: low
|
||||
---
|
||||
kind: url
|
||||
name: ruby_unicode_display_width
|
||||
url: https://github.com/janlelis/unicode-display_width/tags
|
||||
activity: high
|
||||
---
|
||||
kind: url
|
||||
name: ruby_unicode_emoji
|
||||
url: https://github.com/janlelis/unicode-emoji/tags
|
||||
activity: high
|
||||
---
|
||||
kind: url
|
||||
name: ruby_webrick
|
||||
url: https://github.com/ruby/webrick/releases
|
||||
activity: medium
|
||||
|
||||
@@ -48,7 +48,8 @@ numlength = total_files_to_check.to_s.length
|
||||
relevant_gem_packages.each_with_index do |package, index|
|
||||
pool.post do
|
||||
untested_package_name = package.gsub(%r{^packages/ruby_}, '').gsub(/.rb$/, '')
|
||||
gem_test = gems.grep(/#{"^#{untested_package_name}\\s.*$"}/).last.blank? ? gems.grep(/#{"^#{untested_package_name.gsub('_', '-')}\\s.*$"}/).last : gems.grep(/#{"^#{untested_package_name}\\s.*$"}/).last
|
||||
gem_test = gems.grep(/#{"^#{untested_package_name}\\s.*$"}/).last.blank? ? gems.grep(/#{"^\(#{passed_name.gsub(/^ruby_/, '').gsub('_', ')*.(')}\\s\).*$"}/).last : gems.grep(/#{"^#{untested_package_name}\\s.*$"}/).last
|
||||
abort "Cannot find #{passed_name} gem to install.".lightred if gem_test.blank?
|
||||
gem_test_name = gem_test.split.first
|
||||
puts "#{untested_package_name} versions for #{gem_test_name} are #{gem_test.split[1].split(',')}" if CREW_VERBOSE
|
||||
gem_test_versions = gem_test.split[1].split(',')
|
||||
|
||||
Reference in New Issue
Block a user