rubygems-update 3.5.22 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +91 -0
- data/Manifest.txt +23 -16
- data/README.md +14 -9
- data/bundler/CHANGELOG.md +83 -0
- data/bundler/bundler.gemspec +2 -2
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/add.rb +2 -0
- data/bundler/lib/bundler/cli/check.rb +2 -2
- data/bundler/lib/bundler/cli/console.rb +0 -4
- data/bundler/lib/bundler/cli/doctor.rb +4 -4
- data/bundler/lib/bundler/cli/exec.rb +1 -0
- data/bundler/lib/bundler/cli/gem.rb +1 -1
- data/bundler/lib/bundler/cli/info.rb +2 -2
- data/bundler/lib/bundler/cli/inject.rb +1 -1
- data/bundler/lib/bundler/cli/install.rb +4 -0
- data/bundler/lib/bundler/cli/lock.rb +20 -1
- data/bundler/lib/bundler/cli/pristine.rb +1 -1
- data/bundler/lib/bundler/cli/show.rb +2 -2
- data/bundler/lib/bundler/cli.rb +23 -53
- data/bundler/lib/bundler/compact_index_client/cache_file.rb +0 -5
- data/bundler/lib/bundler/compact_index_client/updater.rb +0 -11
- data/bundler/lib/bundler/definition.rb +143 -76
- data/bundler/lib/bundler/dependency.rb +1 -1
- data/bundler/lib/bundler/dsl.rb +33 -28
- data/bundler/lib/bundler/endpoint_specification.rb +10 -1
- data/bundler/lib/bundler/errors.rb +10 -0
- data/bundler/lib/bundler/feature_flag.rb +1 -0
- data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
- data/bundler/lib/bundler/fetcher.rb +10 -3
- data/bundler/lib/bundler/gem_helpers.rb +21 -5
- data/bundler/lib/bundler/injector.rb +2 -2
- data/bundler/lib/bundler/inline.rb +12 -8
- data/bundler/lib/bundler/installer/standalone.rb +2 -2
- data/bundler/lib/bundler/installer.rb +4 -38
- data/bundler/lib/bundler/lazy_specification.rb +74 -26
- data/bundler/lib/bundler/lockfile_generator.rb +1 -1
- data/bundler/lib/bundler/lockfile_parser.rb +9 -1
- data/bundler/lib/bundler/man/bundle-add.1 +17 -11
- data/bundler/lib/bundler/man/bundle-add.1.ronn +16 -10
- data/bundler/lib/bundler/man/bundle-binstubs.1 +7 -4
- data/bundler/lib/bundler/man/bundle-binstubs.1.ronn +6 -3
- data/bundler/lib/bundler/man/bundle-cache.1 +30 -2
- data/bundler/lib/bundler/man/bundle-cache.1.ronn +31 -2
- data/bundler/lib/bundler/man/bundle-check.1 +3 -3
- data/bundler/lib/bundler/man/bundle-check.1.ronn +4 -2
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +3 -5
- data/bundler/lib/bundler/man/bundle-config.1.ronn +2 -7
- data/bundler/lib/bundler/man/bundle-console.1 +2 -4
- data/bundler/lib/bundler/man/bundle-console.1.ronn +2 -7
- data/bundler/lib/bundler/man/bundle-doctor.1 +2 -2
- data/bundler/lib/bundler/man/bundle-doctor.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-env.1 +9 -0
- data/bundler/lib/bundler/man/bundle-env.1.ronn +10 -0
- data/bundler/lib/bundler/man/bundle-exec.1 +5 -2
- data/bundler/lib/bundler/man/bundle-exec.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-fund.1 +22 -0
- data/bundler/lib/bundler/man/bundle-fund.1.ronn +25 -0
- data/bundler/lib/bundler/man/bundle-gem.1 +17 -5
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +27 -6
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +5 -2
- data/bundler/lib/bundler/man/bundle-info.1.ronn +6 -2
- data/bundler/lib/bundler/man/bundle-init.1 +3 -3
- data/bundler/lib/bundler/man/bundle-init.1.ronn +3 -2
- data/bundler/lib/bundler/man/bundle-inject.1 +10 -2
- data/bundler/lib/bundler/man/bundle-inject.1.ronn +9 -1
- data/bundler/lib/bundler/man/bundle-install.1 +15 -12
- data/bundler/lib/bundler/man/bundle-install.1.ronn +22 -18
- data/bundler/lib/bundler/man/bundle-issue.1 +45 -0
- data/bundler/lib/bundler/man/bundle-issue.1.ronn +37 -0
- data/bundler/lib/bundler/man/bundle-licenses.1 +9 -0
- data/bundler/lib/bundler/man/bundle-licenses.1.ronn +10 -0
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +21 -6
- data/bundler/lib/bundler/man/bundle-lock.1.ronn +25 -4
- data/bundler/lib/bundler/man/bundle-open.1 +2 -2
- data/bundler/lib/bundler/man/bundle-open.1.ronn +2 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +8 -5
- data/bundler/lib/bundler/man/bundle-outdated.1.ronn +8 -4
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +5 -2
- data/bundler/lib/bundler/man/bundle-show.1.ronn +4 -0
- data/bundler/lib/bundler/man/bundle-update.1 +13 -7
- data/bundler/lib/bundler/man/bundle-update.1.ronn +14 -6
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +4 -4
- data/bundler/lib/bundler/man/bundle-viz.1.ronn +7 -3
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/man/index.txt +4 -0
- data/bundler/lib/bundler/materialization.rb +59 -0
- data/bundler/lib/bundler/plugin/events.rb +24 -0
- data/bundler/lib/bundler/plugin/installer.rb +1 -1
- data/bundler/lib/bundler/plugin.rb +20 -1
- data/bundler/lib/bundler/process_lock.rb +10 -14
- data/bundler/lib/bundler/remote_specification.rb +6 -1
- data/bundler/lib/bundler/resolver/base.rb +6 -6
- data/bundler/lib/bundler/resolver/candidate.rb +2 -2
- data/bundler/lib/bundler/resolver/spec_group.rb +4 -3
- data/bundler/lib/bundler/resolver.rb +5 -5
- data/bundler/lib/bundler/rubygems_ext.rb +30 -27
- data/bundler/lib/bundler/rubygems_gem_installer.rb +3 -2
- data/bundler/lib/bundler/rubygems_integration.rb +23 -40
- data/bundler/lib/bundler/runtime.rb +27 -7
- data/bundler/lib/bundler/self_manager.rb +2 -3
- data/bundler/lib/bundler/settings.rb +6 -1
- data/bundler/lib/bundler/shared_helpers.rb +29 -17
- data/bundler/lib/bundler/source/git/git_proxy.rb +0 -6
- data/bundler/lib/bundler/source/git.rb +56 -31
- data/bundler/lib/bundler/source/metadata.rb +2 -3
- data/bundler/lib/bundler/source/path.rb +2 -2
- data/bundler/lib/bundler/source_list.rb +1 -1
- data/bundler/lib/bundler/spec_set.rb +81 -56
- data/bundler/lib/bundler/stub_specification.rb +8 -0
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +0 -3
- data/bundler/lib/bundler/templates/newgem/README.md.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +15 -15
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -4
- data/bundler/lib/bundler/uri_credentials_filter.rb +1 -1
- data/bundler/lib/bundler/vendor/fileutils/COPYING +56 -0
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +15 -13
- data/bundler/lib/bundler/vendor/securerandom/COPYING +56 -0
- data/bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb +5 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +3 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +11 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +1 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +2 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +9 -9
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +5 -21
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +11 -0
- data/bundler/lib/bundler/vendor/uri/COPYING +56 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +37 -16
- data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +3 -3
- data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +16 -26
- data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +2 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +10 -3
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +26 -3
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri.rb +9 -9
- data/bundler/lib/bundler/vendored_securerandom.rb +0 -2
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +38 -14
- data/{CONTRIBUTING.md → doc/rubygems/CONTRIBUTING.md} +9 -9
- data/{POLICIES.md → doc/rubygems/POLICIES.md} +11 -11
- data/lib/rubygems/basic_specification.rb +5 -4
- data/lib/rubygems/commands/cleanup_command.rb +2 -2
- data/lib/rubygems/commands/contents_command.rb +4 -4
- data/lib/rubygems/commands/exec_command.rb +3 -0
- data/lib/rubygems/commands/pristine_command.rb +2 -2
- data/lib/rubygems/commands/push_command.rb +29 -5
- data/lib/rubygems/commands/rdoc_command.rb +2 -2
- data/lib/rubygems/commands/rebuild_command.rb +0 -2
- data/lib/rubygems/commands/setup_command.rb +7 -16
- data/lib/rubygems/commands/unpack_command.rb +0 -6
- data/lib/rubygems/commands/update_command.rb +2 -8
- data/lib/rubygems/config_file.rb +12 -0
- data/lib/rubygems/core_ext/kernel_warn.rb +2 -6
- data/lib/rubygems/defaults.rb +1 -1
- data/lib/rubygems/exceptions.rb +0 -6
- data/lib/rubygems/ext/builder.rb +6 -4
- data/lib/rubygems/ext/cargo_builder.rb +7 -4
- data/lib/rubygems/ext/cmake_builder.rb +7 -2
- data/lib/rubygems/ext/configure_builder.rb +7 -2
- data/lib/rubygems/ext/ext_conf_builder.rb +9 -5
- data/lib/rubygems/ext/rake_builder.rb +6 -1
- data/lib/rubygems/gem_runner.rb +9 -0
- data/lib/rubygems/gemcutter_utilities.rb +8 -2
- data/lib/rubygems/install_update_options.rb +5 -0
- data/lib/rubygems/installer.rb +8 -9
- data/lib/rubygems/package/tar_header.rb +11 -0
- data/lib/rubygems/package/tar_reader/entry.rb +1 -5
- data/lib/rubygems/platform.rb +4 -3
- data/lib/rubygems/psych_tree.rb +4 -0
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
- data/lib/rubygems/requirement.rb +0 -4
- data/lib/rubygems/resolver/composed_set.rb +3 -3
- data/lib/rubygems/resolver/git_set.rb +0 -1
- data/lib/rubygems/resolver/index_set.rb +2 -2
- data/lib/rubygems/resolver.rb +3 -3
- data/lib/rubygems/source/git.rb +13 -10
- data/lib/rubygems/spec_fetcher.rb +46 -7
- data/lib/rubygems/specification.rb +38 -32
- data/lib/rubygems/target_rbconfig.rb +50 -0
- data/lib/rubygems/uri.rb +1 -1
- data/lib/rubygems/util/licenses.rb +10 -1
- data/lib/rubygems/vendor/net-http/COPYING +56 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/header.rb +1 -1
- data/lib/rubygems/vendor/net-http/lib/net/http/requests.rb +5 -0
- data/lib/rubygems/vendor/net-http/lib/net/http.rb +120 -36
- data/lib/rubygems/vendor/optparse/lib/optparse/ac.rb +16 -0
- data/lib/rubygems/vendor/optparse/lib/optparse/kwargs.rb +8 -3
- data/lib/rubygems/vendor/optparse/lib/optparse/version.rb +9 -0
- data/lib/rubygems/vendor/optparse/lib/optparse.rb +147 -51
- data/lib/rubygems/vendor/resolv/COPYING +56 -0
- data/lib/rubygems/vendor/resolv/lib/resolv.rb +50 -37
- data/lib/rubygems/vendor/securerandom/COPYING +56 -0
- data/lib/rubygems/vendor/securerandom/lib/securerandom.rb +5 -5
- data/lib/rubygems/vendor/timeout/COPYING +56 -0
- data/lib/rubygems/vendor/timeout/lib/timeout.rb +5 -8
- data/lib/rubygems/vendor/uri/COPYING +56 -0
- data/lib/rubygems/vendor/uri/lib/uri/common.rb +37 -16
- data/lib/rubygems/vendor/uri/lib/uri/file.rb +3 -3
- data/lib/rubygems/vendor/uri/lib/uri/ftp.rb +1 -1
- data/lib/rubygems/vendor/uri/lib/uri/generic.rb +16 -26
- data/lib/rubygems/vendor/uri/lib/uri/http.rb +2 -2
- data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +10 -3
- data/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +26 -3
- data/lib/rubygems/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/rubygems/vendor/uri/lib/uri.rb +9 -9
- data/lib/rubygems/vendored_securerandom.rb +0 -1
- data/lib/rubygems/version.rb +0 -4
- data/lib/rubygems.rb +30 -20
- data/rubygems-update.gemspec +5 -5
- data/setup.rb +1 -1
- metadata +36 -27
- data/bundler/lib/bundler/vendor/fileutils/LICENSE.txt +0 -22
- data/bundler/lib/bundler/vendor/securerandom/LICENSE.txt +0 -22
- data/bundler/lib/bundler/vendor/securerandom/lib/random/formatter.rb +0 -373
- data/bundler/lib/bundler/vendor/uri/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/net-http/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/net-http/lib/net/http/backward.rb +0 -40
- data/lib/rubygems/vendor/resolv/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/securerandom/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/securerandom/lib/random/formatter.rb +0 -373
- data/lib/rubygems/vendor/timeout/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/uri/LICENSE.txt +0 -22
- /data/{MAINTAINERS.txt → doc/MAINTAINERS.txt} +0 -0
- /data/{bundler → doc/bundler}/UPGRADING.md +0 -0
- /data/{UPGRADING.md → doc/rubygems/UPGRADING.md} +0 -0
@@ -180,7 +180,8 @@ end
|
|
180
180
|
# - {CVE-2004-0452}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452].
|
181
181
|
#
|
182
182
|
module Bundler::FileUtils
|
183
|
-
|
183
|
+
# The version number.
|
184
|
+
VERSION = "1.7.3"
|
184
185
|
|
185
186
|
def self.private_module_function(name) #:nodoc:
|
186
187
|
module_function name
|
@@ -1651,7 +1652,7 @@ module Bundler::FileUtils
|
|
1651
1652
|
when "a"
|
1652
1653
|
mask | 07777
|
1653
1654
|
else
|
1654
|
-
raise ArgumentError, "invalid
|
1655
|
+
raise ArgumentError, "invalid 'who' symbol in file mode: #{chr}"
|
1655
1656
|
end
|
1656
1657
|
end
|
1657
1658
|
end
|
@@ -1705,7 +1706,7 @@ module Bundler::FileUtils
|
|
1705
1706
|
copy_mask = user_mask(chr)
|
1706
1707
|
(current_mode & copy_mask) / (copy_mask & 0111) * (user_mask & 0111)
|
1707
1708
|
else
|
1708
|
-
raise ArgumentError, "invalid
|
1709
|
+
raise ArgumentError, "invalid 'perm' symbol in file mode: #{chr}"
|
1709
1710
|
end
|
1710
1711
|
end
|
1711
1712
|
|
@@ -2028,21 +2029,22 @@ module Bundler::FileUtils
|
|
2028
2029
|
|
2029
2030
|
private
|
2030
2031
|
|
2031
|
-
module StreamUtils_
|
2032
|
+
module StreamUtils_ # :nodoc:
|
2033
|
+
|
2032
2034
|
private
|
2033
2035
|
|
2034
2036
|
case (defined?(::RbConfig) ? ::RbConfig::CONFIG['host_os'] : ::RUBY_PLATFORM)
|
2035
2037
|
when /mswin|mingw/
|
2036
|
-
def fu_windows?; true end
|
2038
|
+
def fu_windows?; true end #:nodoc:
|
2037
2039
|
else
|
2038
|
-
def fu_windows?; false end
|
2040
|
+
def fu_windows?; false end #:nodoc:
|
2039
2041
|
end
|
2040
2042
|
|
2041
2043
|
def fu_copy_stream0(src, dest, blksize = nil) #:nodoc:
|
2042
2044
|
IO.copy_stream(src, dest)
|
2043
2045
|
end
|
2044
2046
|
|
2045
|
-
def fu_stream_blksize(*streams)
|
2047
|
+
def fu_stream_blksize(*streams) #:nodoc:
|
2046
2048
|
streams.each do |s|
|
2047
2049
|
next unless s.respond_to?(:stat)
|
2048
2050
|
size = fu_blksize(s.stat)
|
@@ -2051,14 +2053,14 @@ module Bundler::FileUtils
|
|
2051
2053
|
fu_default_blksize()
|
2052
2054
|
end
|
2053
2055
|
|
2054
|
-
def fu_blksize(st)
|
2056
|
+
def fu_blksize(st) #:nodoc:
|
2055
2057
|
s = st.blksize
|
2056
2058
|
return nil unless s
|
2057
2059
|
return nil if s == 0
|
2058
2060
|
s
|
2059
2061
|
end
|
2060
2062
|
|
2061
|
-
def fu_default_blksize
|
2063
|
+
def fu_default_blksize #:nodoc:
|
2062
2064
|
1024
|
2063
2065
|
end
|
2064
2066
|
end
|
@@ -2503,7 +2505,7 @@ module Bundler::FileUtils
|
|
2503
2505
|
end
|
2504
2506
|
private_module_function :fu_output_message
|
2505
2507
|
|
2506
|
-
def fu_split_path(path)
|
2508
|
+
def fu_split_path(path) #:nodoc:
|
2507
2509
|
path = File.path(path)
|
2508
2510
|
list = []
|
2509
2511
|
until (parent, base = File.split(path); parent == path or parent == ".")
|
@@ -2524,7 +2526,7 @@ module Bundler::FileUtils
|
|
2524
2526
|
end
|
2525
2527
|
private_module_function :fu_relative_components_from
|
2526
2528
|
|
2527
|
-
def fu_clean_components(*comp)
|
2529
|
+
def fu_clean_components(*comp) #:nodoc:
|
2528
2530
|
comp.shift while comp.first == "."
|
2529
2531
|
return comp if comp.empty?
|
2530
2532
|
clean = [comp.shift]
|
@@ -2543,11 +2545,11 @@ module Bundler::FileUtils
|
|
2543
2545
|
private_module_function :fu_clean_components
|
2544
2546
|
|
2545
2547
|
if fu_windows?
|
2546
|
-
def fu_starting_path?(path)
|
2548
|
+
def fu_starting_path?(path) #:nodoc:
|
2547
2549
|
path&.start_with?(%r(\w:|/))
|
2548
2550
|
end
|
2549
2551
|
else
|
2550
|
-
def fu_starting_path?(path)
|
2552
|
+
def fu_starting_path?(path) #:nodoc:
|
2551
2553
|
path&.start_with?("/")
|
2552
2554
|
end
|
2553
2555
|
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
|
2
|
+
You can redistribute it and/or modify it under either the terms of the
|
3
|
+
2-clause BSDL (see the file BSDL), or the conditions below:
|
4
|
+
|
5
|
+
1. You may make and give away verbatim copies of the source form of the
|
6
|
+
software without restriction, provided that you duplicate all of the
|
7
|
+
original copyright notices and associated disclaimers.
|
8
|
+
|
9
|
+
2. You may modify your copy of the software in any way, provided that
|
10
|
+
you do at least ONE of the following:
|
11
|
+
|
12
|
+
a. place your modifications in the Public Domain or otherwise
|
13
|
+
make them Freely Available, such as by posting said
|
14
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
+
the author to include your modifications in the software.
|
16
|
+
|
17
|
+
b. use the modified software only within your corporation or
|
18
|
+
organization.
|
19
|
+
|
20
|
+
c. give non-standard binaries non-standard names, with
|
21
|
+
instructions on where to get the original software distribution.
|
22
|
+
|
23
|
+
d. make other distribution arrangements with the author.
|
24
|
+
|
25
|
+
3. You may distribute the software in object code or binary form,
|
26
|
+
provided that you do at least ONE of the following:
|
27
|
+
|
28
|
+
a. distribute the binaries and library files of the software,
|
29
|
+
together with instructions (in the manual page or equivalent)
|
30
|
+
on where to get the original distribution.
|
31
|
+
|
32
|
+
b. accompany the distribution with the machine-readable source of
|
33
|
+
the software.
|
34
|
+
|
35
|
+
c. give non-standard binaries non-standard names, with
|
36
|
+
instructions on where to get the original software distribution.
|
37
|
+
|
38
|
+
d. make other distribution arrangements with the author.
|
39
|
+
|
40
|
+
4. You may modify and include the part of the software into any other
|
41
|
+
software (possibly commercial). But some files in the distribution
|
42
|
+
are not written by the author, so that they are not under these terms.
|
43
|
+
|
44
|
+
For the list of those files and their copying conditions, see the
|
45
|
+
file LEGAL.
|
46
|
+
|
47
|
+
5. The scripts and library files supplied as input to or produced as
|
48
|
+
output from the software do not automatically fall under the
|
49
|
+
copyright of the software, but belong to whomever generated them,
|
50
|
+
and may be sold commercially, and may be aggregated with this
|
51
|
+
software.
|
52
|
+
|
53
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
54
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
55
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
56
|
+
PURPOSE.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: us-ascii -*-
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
require 'random/formatter'
|
5
5
|
|
6
6
|
# == Secure random number generator interface.
|
7
7
|
#
|
@@ -18,7 +18,7 @@ require_relative 'random/formatter'
|
|
18
18
|
# * /dev/urandom
|
19
19
|
# * Win32
|
20
20
|
#
|
21
|
-
# Bundler::SecureRandom is extended by the
|
21
|
+
# Bundler::SecureRandom is extended by the Random::Formatter module which
|
22
22
|
# defines the following methods:
|
23
23
|
#
|
24
24
|
# * alphanumeric
|
@@ -41,7 +41,7 @@ require_relative 'random/formatter'
|
|
41
41
|
module Bundler::SecureRandom
|
42
42
|
|
43
43
|
# The version
|
44
|
-
VERSION = "0.
|
44
|
+
VERSION = "0.4.0"
|
45
45
|
|
46
46
|
class << self
|
47
47
|
# Returns a random binary string containing +size+ bytes.
|
@@ -88,9 +88,9 @@ module Bundler::SecureRandom
|
|
88
88
|
|
89
89
|
# :startdoc:
|
90
90
|
|
91
|
-
# Generate random data bytes for
|
91
|
+
# Generate random data bytes for Random::Formatter
|
92
92
|
public :gen_random
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
96
|
-
Bundler::SecureRandom.extend(
|
96
|
+
Bundler::SecureRandom.extend(Random::Formatter)
|
@@ -10,7 +10,6 @@ class Bundler::Thor
|
|
10
10
|
# destination<String>:: the relative path to the destination root.
|
11
11
|
# config<Hash>:: give :verbose => false to not log the status, and
|
12
12
|
# :mode => :preserve, to preserve the file mode from the source.
|
13
|
-
|
14
13
|
#
|
15
14
|
# ==== Examples
|
16
15
|
#
|
@@ -275,9 +274,8 @@ class Bundler::Thor
|
|
275
274
|
end
|
276
275
|
end
|
277
276
|
|
278
|
-
# Uncomment all lines matching a given regex.
|
279
|
-
#
|
280
|
-
# between the comment hash and the beginning of the line.
|
277
|
+
# Uncomment all lines matching a given regex. Preserves indentation before
|
278
|
+
# the comment hash and removes the hash and any immediate following space.
|
281
279
|
#
|
282
280
|
# ==== Parameters
|
283
281
|
# path<String>:: path of the file to be changed
|
@@ -291,7 +289,7 @@ class Bundler::Thor
|
|
291
289
|
def uncomment_lines(path, flag, *args)
|
292
290
|
flag = flag.respond_to?(:source) ? flag.source : flag
|
293
291
|
|
294
|
-
gsub_file(path, /^(\s*)#[[:blank:]]
|
292
|
+
gsub_file(path, /^(\s*)#[[:blank:]]?(.*#{flag})/, '\1\2', *args)
|
295
293
|
end
|
296
294
|
|
297
295
|
# Comment all lines matching a given regex. It will leave the space
|
@@ -211,6 +211,17 @@ class Bundler::Thor::Group
|
|
211
211
|
raise error, msg
|
212
212
|
end
|
213
213
|
|
214
|
+
# Checks if a specified command exists.
|
215
|
+
#
|
216
|
+
# ==== Parameters
|
217
|
+
# command_name<String>:: The name of the command to check for existence.
|
218
|
+
#
|
219
|
+
# ==== Returns
|
220
|
+
# Boolean:: +true+ if the command exists, +false+ otherwise.
|
221
|
+
def command_exists?(command_name) #:nodoc:
|
222
|
+
commands.keys.include?(command_name)
|
223
|
+
end
|
224
|
+
|
214
225
|
protected
|
215
226
|
|
216
227
|
# The method responsible for dispatching given the args.
|
@@ -89,8 +89,8 @@ class Bundler::Thor
|
|
89
89
|
|
90
90
|
sample = "[#{sample}]".dup unless required?
|
91
91
|
|
92
|
-
if boolean?
|
93
|
-
sample << ", [#{dasherize('no-' + human_name)}]
|
92
|
+
if boolean? && name != "force" && !name.match(/\A(no|skip)[\-_]/)
|
93
|
+
sample << ", [#{dasherize('no-' + human_name)}], [#{dasherize('skip-' + human_name)}]"
|
94
94
|
end
|
95
95
|
|
96
96
|
aliases_for_usage.ljust(padding) + sample
|
@@ -250,7 +250,8 @@ class Bundler::Thor
|
|
250
250
|
@parsing_options
|
251
251
|
end
|
252
252
|
|
253
|
-
# Parse boolean values which can be given as --foo=true
|
253
|
+
# Parse boolean values which can be given as --foo=true or --foo for true values, or
|
254
|
+
# --foo=false, --no-foo or --skip-foo for false values.
|
254
255
|
#
|
255
256
|
def parse_boolean(switch)
|
256
257
|
if current_is_value?
|
@@ -67,15 +67,15 @@ class Bundler::Thor
|
|
67
67
|
# Readline.
|
68
68
|
#
|
69
69
|
# ==== Example
|
70
|
-
#
|
70
|
+
# ask("What is your name?")
|
71
71
|
#
|
72
|
-
#
|
72
|
+
# ask("What is the planet furthest from the sun?", :default => "Neptune")
|
73
73
|
#
|
74
|
-
#
|
74
|
+
# ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"])
|
75
75
|
#
|
76
|
-
#
|
76
|
+
# ask("What is your password?", :echo => false)
|
77
77
|
#
|
78
|
-
#
|
78
|
+
# ask("Where should the file be saved?", :path => true)
|
79
79
|
#
|
80
80
|
def ask(statement, *args)
|
81
81
|
options = args.last.is_a?(Hash) ? args.pop : {}
|
@@ -93,7 +93,7 @@ class Bundler::Thor
|
|
93
93
|
# are passed straight to puts (behavior got from Highline).
|
94
94
|
#
|
95
95
|
# ==== Example
|
96
|
-
#
|
96
|
+
# say("I know you knew that.")
|
97
97
|
#
|
98
98
|
def say(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
|
99
99
|
return if quiet?
|
@@ -110,7 +110,7 @@ class Bundler::Thor
|
|
110
110
|
# are passed straight to puts (behavior got from Highline).
|
111
111
|
#
|
112
112
|
# ==== Example
|
113
|
-
#
|
113
|
+
# say_error("error: something went wrong")
|
114
114
|
#
|
115
115
|
def say_error(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
|
116
116
|
return if quiet?
|
@@ -143,14 +143,14 @@ class Bundler::Thor
|
|
143
143
|
stdout.flush
|
144
144
|
end
|
145
145
|
|
146
|
-
#
|
146
|
+
# Asks the user a question and returns true if the user replies "y" or
|
147
147
|
# "yes".
|
148
148
|
#
|
149
149
|
def yes?(statement, color = nil)
|
150
150
|
!!(ask(statement, color, add_to_history: false) =~ is?(:yes))
|
151
151
|
end
|
152
152
|
|
153
|
-
#
|
153
|
+
# Asks the user a question and returns true if the user replies "n" or
|
154
154
|
# "no".
|
155
155
|
#
|
156
156
|
def no?(statement, color = nil)
|
@@ -102,33 +102,17 @@ class Bundler::Thor
|
|
102
102
|
|
103
103
|
def truncate(string)
|
104
104
|
return string unless @truncate
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
chars[0, @truncate - 3 - @indent].join + "..."
|
111
|
-
end
|
105
|
+
chars = string.chars.to_a
|
106
|
+
if chars.length <= @truncate
|
107
|
+
chars.join
|
108
|
+
else
|
109
|
+
chars[0, @truncate - 3 - @indent].join + "..."
|
112
110
|
end
|
113
111
|
end
|
114
112
|
|
115
113
|
def indentation
|
116
114
|
" " * @indent
|
117
115
|
end
|
118
|
-
|
119
|
-
if "".respond_to?(:encode)
|
120
|
-
def as_unicode
|
121
|
-
yield
|
122
|
-
end
|
123
|
-
else
|
124
|
-
def as_unicode
|
125
|
-
old = $KCODE # rubocop:disable Style/GlobalVars
|
126
|
-
$KCODE = "U" # rubocop:disable Style/GlobalVars
|
127
|
-
yield
|
128
|
-
ensure
|
129
|
-
$KCODE = old # rubocop:disable Style/GlobalVars
|
130
|
-
end
|
131
|
-
end
|
132
116
|
end
|
133
117
|
end
|
134
118
|
end
|
@@ -133,7 +133,7 @@ class Bundler::Thor
|
|
133
133
|
*pieces, command = namespace.split(":")
|
134
134
|
namespace = pieces.join(":")
|
135
135
|
namespace = "default" if namespace.empty?
|
136
|
-
klass = Bundler::Thor::Base.subclasses.detect { |thor| thor.namespace == namespace && thor.
|
136
|
+
klass = Bundler::Thor::Base.subclasses.detect { |thor| thor.namespace == namespace && thor.command_exists?(command) }
|
137
137
|
end
|
138
138
|
unless klass # look for a Bundler::Thor::Group with the right name
|
139
139
|
klass = Bundler::Thor::Util.find_by_namespace(namespace)
|
@@ -439,6 +439,17 @@ class Bundler::Thor
|
|
439
439
|
command && disable_required_check.include?(command.name.to_sym)
|
440
440
|
end
|
441
441
|
|
442
|
+
# Checks if a specified command exists.
|
443
|
+
#
|
444
|
+
# ==== Parameters
|
445
|
+
# command_name<String>:: The name of the command to check for existence.
|
446
|
+
#
|
447
|
+
# ==== Returns
|
448
|
+
# Boolean:: +true+ if the command exists, +false+ otherwise.
|
449
|
+
def command_exists?(command_name) #:nodoc:
|
450
|
+
commands.keys.include?(normalize_command_name(command_name))
|
451
|
+
end
|
452
|
+
|
442
453
|
protected
|
443
454
|
|
444
455
|
# Returns this class exclusive options array set.
|
@@ -0,0 +1,56 @@
|
|
1
|
+
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
|
2
|
+
You can redistribute it and/or modify it under either the terms of the
|
3
|
+
2-clause BSDL (see the file BSDL), or the conditions below:
|
4
|
+
|
5
|
+
1. You may make and give away verbatim copies of the source form of the
|
6
|
+
software without restriction, provided that you duplicate all of the
|
7
|
+
original copyright notices and associated disclaimers.
|
8
|
+
|
9
|
+
2. You may modify your copy of the software in any way, provided that
|
10
|
+
you do at least ONE of the following:
|
11
|
+
|
12
|
+
a. place your modifications in the Public Domain or otherwise
|
13
|
+
make them Freely Available, such as by posting said
|
14
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
+
the author to include your modifications in the software.
|
16
|
+
|
17
|
+
b. use the modified software only within your corporation or
|
18
|
+
organization.
|
19
|
+
|
20
|
+
c. give non-standard binaries non-standard names, with
|
21
|
+
instructions on where to get the original software distribution.
|
22
|
+
|
23
|
+
d. make other distribution arrangements with the author.
|
24
|
+
|
25
|
+
3. You may distribute the software in object code or binary form,
|
26
|
+
provided that you do at least ONE of the following:
|
27
|
+
|
28
|
+
a. distribute the binaries and library files of the software,
|
29
|
+
together with instructions (in the manual page or equivalent)
|
30
|
+
on where to get the original distribution.
|
31
|
+
|
32
|
+
b. accompany the distribution with the machine-readable source of
|
33
|
+
the software.
|
34
|
+
|
35
|
+
c. give non-standard binaries non-standard names, with
|
36
|
+
instructions on where to get the original software distribution.
|
37
|
+
|
38
|
+
d. make other distribution arrangements with the author.
|
39
|
+
|
40
|
+
4. You may modify and include the part of the software into any other
|
41
|
+
software (possibly commercial). But some files in the distribution
|
42
|
+
are not written by the author, so that they are not under these terms.
|
43
|
+
|
44
|
+
For the list of those files and their copying conditions, see the
|
45
|
+
file LEGAL.
|
46
|
+
|
47
|
+
5. The scripts and library files supplied as input to or produced as
|
48
|
+
output from the software do not automatically fall under the
|
49
|
+
copyright of the software, but belong to whomever generated them,
|
50
|
+
and may be sold commercially, and may be aggregated with this
|
51
|
+
software.
|
52
|
+
|
53
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
54
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
55
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
56
|
+
PURPOSE.
|
@@ -13,26 +13,47 @@ require_relative "rfc2396_parser"
|
|
13
13
|
require_relative "rfc3986_parser"
|
14
14
|
|
15
15
|
module Bundler::URI
|
16
|
-
|
16
|
+
RFC2396_PARSER = RFC2396_Parser.new
|
17
|
+
Ractor.make_shareable(RFC2396_PARSER) if defined?(Ractor)
|
17
18
|
|
18
|
-
REGEXP = RFC2396_REGEXP
|
19
|
-
Parser = RFC2396_Parser
|
20
19
|
RFC3986_PARSER = RFC3986_Parser.new
|
21
20
|
Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
|
22
|
-
RFC2396_PARSER = RFC2396_Parser.new
|
23
|
-
Ractor.make_shareable(RFC2396_PARSER) if defined?(Ractor)
|
24
21
|
|
25
|
-
|
26
|
-
DEFAULT_PARSER
|
27
|
-
|
28
|
-
|
29
|
-
|
22
|
+
DEFAULT_PARSER = RFC3986_PARSER
|
23
|
+
Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)
|
24
|
+
|
25
|
+
def self.parser=(parser = RFC3986_PARSER)
|
26
|
+
remove_const(:Parser) if defined?(::Bundler::URI::Parser)
|
27
|
+
const_set("Parser", parser.class)
|
28
|
+
|
29
|
+
remove_const(:REGEXP) if defined?(::Bundler::URI::REGEXP)
|
30
|
+
remove_const(:PATTERN) if defined?(::Bundler::URI::PATTERN)
|
31
|
+
if Parser == RFC2396_Parser
|
32
|
+
const_set("REGEXP", Bundler::URI::RFC2396_REGEXP)
|
33
|
+
const_set("PATTERN", Bundler::URI::RFC2396_REGEXP::PATTERN)
|
34
|
+
end
|
35
|
+
|
36
|
+
Parser.new.regexp.each_pair do |sym, str|
|
37
|
+
remove_const(sym) if const_defined?(sym, false)
|
38
|
+
const_set(sym, str)
|
30
39
|
end
|
31
40
|
end
|
32
|
-
|
33
|
-
|
41
|
+
self.parser = RFC3986_PARSER
|
42
|
+
|
43
|
+
def self.const_missing(const)
|
44
|
+
if const == :REGEXP
|
45
|
+
warn "Bundler::URI::REGEXP is obsolete. Use Bundler::URI::RFC2396_REGEXP explicitly.", uplevel: 1 if $VERBOSE
|
46
|
+
Bundler::URI::RFC2396_REGEXP
|
47
|
+
elsif value = RFC2396_PARSER.regexp[const]
|
48
|
+
warn "Bundler::URI::#{const} is obsolete. Use RFC2396_PARSER.regexp[#{const.inspect}] explicitly.", uplevel: 1 if $VERBOSE
|
49
|
+
value
|
50
|
+
elsif value = RFC2396_Parser.const_get(const)
|
51
|
+
warn "Bundler::URI::#{const} is obsolete. Use RFC2396_Parser::#{const} explicitly.", uplevel: 1 if $VERBOSE
|
52
|
+
value
|
53
|
+
else
|
54
|
+
super
|
55
|
+
end
|
34
56
|
end
|
35
|
-
Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)
|
36
57
|
|
37
58
|
module Util # :nodoc:
|
38
59
|
def make_components_hash(klass, array_hash)
|
@@ -170,7 +191,7 @@ module Bundler::URI
|
|
170
191
|
# ["fragment", "top"]]
|
171
192
|
#
|
172
193
|
def self.split(uri)
|
173
|
-
|
194
|
+
DEFAULT_PARSER.split(uri)
|
174
195
|
end
|
175
196
|
|
176
197
|
# Returns a new \Bundler::URI object constructed from the given string +uri+:
|
@@ -184,7 +205,7 @@ module Bundler::URI
|
|
184
205
|
# if it may contain invalid Bundler::URI characters.
|
185
206
|
#
|
186
207
|
def self.parse(uri)
|
187
|
-
|
208
|
+
DEFAULT_PARSER.parse(uri)
|
188
209
|
end
|
189
210
|
|
190
211
|
# Merges the given Bundler::URI strings +str+
|
@@ -211,7 +232,7 @@ module Bundler::URI
|
|
211
232
|
# # => #<Bundler::URI::HTTP http://example.com/foo/bar>
|
212
233
|
#
|
213
234
|
def self.join(*str)
|
214
|
-
|
235
|
+
DEFAULT_PARSER.join(*str)
|
215
236
|
end
|
216
237
|
|
217
238
|
#
|
@@ -70,17 +70,17 @@ module Bundler::URI
|
|
70
70
|
|
71
71
|
# raise InvalidURIError
|
72
72
|
def check_userinfo(user)
|
73
|
-
raise Bundler::URI::InvalidURIError, "
|
73
|
+
raise Bundler::URI::InvalidURIError, "cannot set userinfo for file Bundler::URI"
|
74
74
|
end
|
75
75
|
|
76
76
|
# raise InvalidURIError
|
77
77
|
def check_user(user)
|
78
|
-
raise Bundler::URI::InvalidURIError, "
|
78
|
+
raise Bundler::URI::InvalidURIError, "cannot set user for file Bundler::URI"
|
79
79
|
end
|
80
80
|
|
81
81
|
# raise InvalidURIError
|
82
82
|
def check_password(user)
|
83
|
-
raise Bundler::URI::InvalidURIError, "
|
83
|
+
raise Bundler::URI::InvalidURIError, "cannot set password for file Bundler::URI"
|
84
84
|
end
|
85
85
|
|
86
86
|
# do nothing
|
@@ -17,7 +17,7 @@ module Bundler::URI
|
|
17
17
|
# This class will be redesigned because of difference of implementations;
|
18
18
|
# the structure of its path. draft-hoffman-ftp-uri-04 is a draft but it
|
19
19
|
# is a good summary about the de facto spec.
|
20
|
-
#
|
20
|
+
# https://datatracker.ietf.org/doc/html/draft-hoffman-ftp-uri-04
|
21
21
|
#
|
22
22
|
class FTP < Generic
|
23
23
|
# A Default port of 21 for Bundler::URI::FTP.
|