ruby-changes:62195
From: Nobuyoshi <ko1@a...>
Date: Mon, 13 Jul 2020 00:35:36 +0900 (JST)
Subject: [ruby-changes:62195] 49cb2345c6 (master): sync_default_gems.rb: Added `list` subcommand
https://git.ruby-lang.org/ruby.git/commit/?id=49cb2345c6 From 49cb2345c657c805762a368cf46a1cbb75c6ca92 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 13 Jul 2020 00:30:44 +0900 Subject: sync_default_gems.rb: Added `list` subcommand diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 5c70b3c..51ac521 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -470,6 +470,13 @@ when "up" https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L470 end when "all" $repositories.keys.each{|gem| sync_default_gems(gem.to_s)} +when "list" + ARGV.shift + pattern = Regexp.new(ARGV.join('|')) + $repositories.each_pair do |name, gem| + next unless pattern =~ name or pattern =~ gem + printf "%-15s https://github.com/%s\n", name, gem + end when nil, "-h", "--help" puts <<-HELP \e[1mSync with upstream code of default libraries\e[0m @@ -482,6 +489,12 @@ when nil, "-h", "--help" https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L489 \e[1mPick a commit range from the upstream repository\e[0m ruby #$0 rubygems 97e9768612..9e53702832 + +\e[1mList known libraries\e[0m + ruby #$0 list + +\e[1mList known libraries matching with patterns\e[0m + ruby #$0 list read HELP exit -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/