mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 03:24:00 +02:00
Merge RubyGems-3.3.19 and Bundler-2.3.19
This commit is contained in:
parent
0918783347
commit
44c926f3a9
362 changed files with 7843 additions and 7605 deletions
|
@ -1,40 +1,40 @@
|
|||
# frozen_string_literal: true
|
||||
require_relative '../command'
|
||||
require_relative '../remote_fetcher'
|
||||
require_relative '../spec_fetcher'
|
||||
require_relative '../local_remote_options'
|
||||
require_relative "../command"
|
||||
require_relative "../remote_fetcher"
|
||||
require_relative "../spec_fetcher"
|
||||
require_relative "../local_remote_options"
|
||||
|
||||
class Gem::Commands::SourcesCommand < Gem::Command
|
||||
include Gem::LocalRemoteOptions
|
||||
|
||||
def initialize
|
||||
require 'fileutils'
|
||||
require "fileutils"
|
||||
|
||||
super 'sources',
|
||||
'Manage the sources and cache file RubyGems uses to search for gems'
|
||||
super "sources",
|
||||
"Manage the sources and cache file RubyGems uses to search for gems"
|
||||
|
||||
add_option '-a', '--add SOURCE_URI', 'Add source' do |value, options|
|
||||
add_option "-a", "--add SOURCE_URI", "Add source" do |value, options|
|
||||
options[:add] = value
|
||||
end
|
||||
|
||||
add_option '-l', '--list', 'List sources' do |value, options|
|
||||
add_option "-l", "--list", "List sources" do |value, options|
|
||||
options[:list] = value
|
||||
end
|
||||
|
||||
add_option '-r', '--remove SOURCE_URI', 'Remove source' do |value, options|
|
||||
add_option "-r", "--remove SOURCE_URI", "Remove source" do |value, options|
|
||||
options[:remove] = value
|
||||
end
|
||||
|
||||
add_option '-c', '--clear-all',
|
||||
'Remove all sources (clear the cache)' do |value, options|
|
||||
add_option "-c", "--clear-all",
|
||||
"Remove all sources (clear the cache)" do |value, options|
|
||||
options[:clear_all] = value
|
||||
end
|
||||
|
||||
add_option '-u', '--update', 'Update source cache' do |value, options|
|
||||
add_option "-u", "--update", "Update source cache" do |value, options|
|
||||
options[:update] = value
|
||||
end
|
||||
|
||||
add_option '-f', '--[no-]force', "Do not show any confirmation prompts and behave as if 'yes' was always answered" do |value, options|
|
||||
add_option "-f", "--[no-]force", "Do not show any confirmation prompts and behave as if 'yes' was always answered" do |value, options|
|
||||
options[:force] = value
|
||||
end
|
||||
|
||||
|
@ -82,8 +82,8 @@ Do you want to add this source?
|
|||
def check_rubygems_https(source_uri) # :nodoc:
|
||||
uri = URI source_uri
|
||||
|
||||
if uri.scheme and uri.scheme.downcase == 'http' and
|
||||
uri.host.downcase == 'rubygems.org'
|
||||
if uri.scheme and uri.scheme.downcase == "http" and
|
||||
uri.host.downcase == "rubygems.org"
|
||||
question = <<-QUESTION.chomp
|
||||
https://rubygems.org is recommended for security over #{uri}
|
||||
|
||||
|
@ -112,7 +112,7 @@ Do you want to add this insecure source?
|
|||
end
|
||||
|
||||
def defaults_str # :nodoc:
|
||||
'--list'
|
||||
"--list"
|
||||
end
|
||||
|
||||
def description # :nodoc:
|
||||
|
@ -138,8 +138,8 @@ do not recognize you should remove them.
|
|||
RubyGems has been configured to serve gems via the following URLs through
|
||||
its history:
|
||||
|
||||
* http://gems.rubyforge.org (RubyGems 1.3.6 and earlier)
|
||||
* https://rubygems.org/ (RubyGems 1.3.7 through 1.8.25)
|
||||
* http://gems.rubyforge.org (RubyGems 1.3.5 and earlier)
|
||||
* http://rubygems.org (RubyGems 1.3.6 through 1.8.30, and 2.0.0)
|
||||
* https://rubygems.org (RubyGems 2.0.1 and newer)
|
||||
|
||||
Since all of these sources point to the same set of gems you only need one
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue