rubygems-update 3.5.17 → 3.5.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +52 -0
- data/Manifest.txt +10 -0
- data/bundler/CHANGELOG.md +46 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/add.rb +1 -1
- data/bundler/lib/bundler/cli/gem.rb +4 -1
- data/bundler/lib/bundler/cli/install.rb +4 -3
- data/bundler/lib/bundler/cli/lock.rb +5 -5
- data/bundler/lib/bundler/cli/outdated.rb +1 -1
- data/bundler/lib/bundler/definition.rb +14 -25
- data/bundler/lib/bundler/dsl.rb +27 -17
- data/bundler/lib/bundler/errors.rb +7 -5
- data/bundler/lib/bundler/fetcher.rb +2 -2
- data/bundler/lib/bundler/inline.rb +19 -4
- data/bundler/lib/bundler/installer/gem_installer.rb +4 -2
- data/bundler/lib/bundler/installer/parallel_installer.rb +3 -2
- data/bundler/lib/bundler/installer.rb +9 -11
- data/bundler/lib/bundler/lockfile_parser.rb +1 -1
- data/bundler/lib/bundler/man/bundle-add.1 +27 -16
- data/bundler/lib/bundler/man/bundle-add.1.ronn +37 -14
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +1 -1
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- 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-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +3 -1
- data/bundler/lib/bundler/man/gemfile.5.ronn +6 -0
- data/bundler/lib/bundler/resolver/base.rb +6 -0
- data/bundler/lib/bundler/resolver/package.rb +10 -1
- data/bundler/lib/bundler/resolver.rb +31 -9
- data/bundler/lib/bundler/retry.rb +1 -1
- data/bundler/lib/bundler/ruby_version.rb +7 -1
- data/bundler/lib/bundler/rubygems_ext.rb +43 -16
- data/bundler/lib/bundler/rubygems_gem_installer.rb +4 -3
- data/bundler/lib/bundler/source/git/git_proxy.rb +4 -2
- data/bundler/lib/bundler/source/git.rb +16 -6
- data/bundler/lib/bundler/source/rubygems.rb +5 -12
- data/bundler/lib/bundler/templates/newgem/README.md.tt +6 -2
- data/bundler/lib/bundler/ui/shell.rb +24 -2
- data/bundler/lib/bundler/ui/silent.rb +12 -1
- data/bundler/lib/bundler/vendor/securerandom/.document +1 -0
- data/bundler/lib/bundler/vendor/securerandom/LICENSE.txt +22 -0
- data/bundler/lib/bundler/vendor/securerandom/lib/random/formatter.rb +373 -0
- data/bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb +96 -0
- data/bundler/lib/bundler/vendored_securerandom.rb +14 -0
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +1 -1
- data/lib/rubygems/commands/exec_command.rb +1 -6
- data/lib/rubygems/commands/fetch_command.rb +14 -0
- data/lib/rubygems/commands/install_command.rb +0 -4
- data/lib/rubygems/commands/setup_command.rb +2 -0
- data/lib/rubygems/commands/uninstall_command.rb +8 -3
- data/lib/rubygems/exceptions.rb +2 -3
- data/lib/rubygems/installer.rb +1 -1
- data/lib/rubygems/remote_fetcher.rb +0 -1
- data/lib/rubygems/resolver/activation_request.rb +1 -1
- data/lib/rubygems/resolver/best_set.rb +2 -28
- data/lib/rubygems/source/git.rb +7 -5
- data/lib/rubygems/source/installed.rb +3 -1
- data/lib/rubygems/source/local.rb +8 -4
- data/lib/rubygems/source/specific_file.rb +5 -3
- data/lib/rubygems/source.rb +10 -8
- data/lib/rubygems/specification.rb +1 -1
- data/lib/rubygems/specification_policy.rb +1 -1
- data/lib/rubygems/vendor/molinillo/lib/molinillo/resolution.rb +1 -1
- data/lib/rubygems/vendor/net-http/lib/net/https.rb +1 -1
- data/lib/rubygems/vendor/optparse/lib/optparse.rb +1 -1
- data/lib/rubygems/vendor/resolv/lib/resolv.rb +71 -16
- data/lib/rubygems/vendor/securerandom/.document +1 -0
- data/lib/rubygems/vendor/securerandom/LICENSE.txt +22 -0
- data/lib/rubygems/vendor/securerandom/lib/random/formatter.rb +373 -0
- data/lib/rubygems/vendor/securerandom/lib/securerandom.rb +96 -0
- data/lib/rubygems/vendored_securerandom.rb +4 -0
- data/lib/rubygems.rb +18 -15
- data/rubygems-update.gemspec +1 -1
- metadata +13 -3
@@ -0,0 +1,96 @@
|
|
1
|
+
# -*- coding: us-ascii -*-
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require_relative 'random/formatter'
|
5
|
+
|
6
|
+
# == Secure random number generator interface.
|
7
|
+
#
|
8
|
+
# This library is an interface to secure random number generators which are
|
9
|
+
# suitable for generating session keys in HTTP cookies, etc.
|
10
|
+
#
|
11
|
+
# You can use this library in your application by requiring it:
|
12
|
+
#
|
13
|
+
# require 'rubygems/vendor/securerandom/lib/securerandom'
|
14
|
+
#
|
15
|
+
# It supports the following secure random number generators:
|
16
|
+
#
|
17
|
+
# * openssl
|
18
|
+
# * /dev/urandom
|
19
|
+
# * Win32
|
20
|
+
#
|
21
|
+
# Gem::SecureRandom is extended by the Gem::Random::Formatter module which
|
22
|
+
# defines the following methods:
|
23
|
+
#
|
24
|
+
# * alphanumeric
|
25
|
+
# * base64
|
26
|
+
# * choose
|
27
|
+
# * gen_random
|
28
|
+
# * hex
|
29
|
+
# * rand
|
30
|
+
# * random_bytes
|
31
|
+
# * random_number
|
32
|
+
# * urlsafe_base64
|
33
|
+
# * uuid
|
34
|
+
#
|
35
|
+
# These methods are usable as class methods of Gem::SecureRandom such as
|
36
|
+
# +Gem::SecureRandom.hex+.
|
37
|
+
#
|
38
|
+
# If a secure random number generator is not available,
|
39
|
+
# +NotImplementedError+ is raised.
|
40
|
+
|
41
|
+
module Gem::SecureRandom
|
42
|
+
|
43
|
+
# The version
|
44
|
+
VERSION = "0.3.1"
|
45
|
+
|
46
|
+
class << self
|
47
|
+
# Returns a random binary string containing +size+ bytes.
|
48
|
+
#
|
49
|
+
# See Random.bytes
|
50
|
+
def bytes(n)
|
51
|
+
return gen_random(n)
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
|
56
|
+
# :stopdoc:
|
57
|
+
|
58
|
+
# Implementation using OpenSSL
|
59
|
+
def gen_random_openssl(n)
|
60
|
+
return OpenSSL::Random.random_bytes(n)
|
61
|
+
end
|
62
|
+
|
63
|
+
# Implementation using system random device
|
64
|
+
def gen_random_urandom(n)
|
65
|
+
ret = Random.urandom(n)
|
66
|
+
unless ret
|
67
|
+
raise NotImplementedError, "No random device"
|
68
|
+
end
|
69
|
+
unless ret.length == n
|
70
|
+
raise NotImplementedError, "Unexpected partial read from random device: only #{ret.length} for #{n} bytes"
|
71
|
+
end
|
72
|
+
ret
|
73
|
+
end
|
74
|
+
|
75
|
+
begin
|
76
|
+
# Check if Random.urandom is available
|
77
|
+
Random.urandom(1)
|
78
|
+
alias gen_random gen_random_urandom
|
79
|
+
rescue RuntimeError
|
80
|
+
begin
|
81
|
+
require 'openssl'
|
82
|
+
rescue NoMethodError
|
83
|
+
raise NotImplementedError, "No random device"
|
84
|
+
else
|
85
|
+
alias gen_random gen_random_openssl
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# :startdoc:
|
90
|
+
|
91
|
+
# Generate random data bytes for Gem::Random::Formatter
|
92
|
+
public :gen_random
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
Gem::SecureRandom.extend(Gem::Random::Formatter)
|
data/lib/rubygems.rb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
require "rbconfig"
|
10
10
|
|
11
11
|
module Gem
|
12
|
-
VERSION = "3.5.
|
12
|
+
VERSION = "3.5.19"
|
13
13
|
end
|
14
14
|
|
15
15
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -753,18 +753,14 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
753
753
|
# Safely read a file in binary mode on all platforms.
|
754
754
|
|
755
755
|
def self.read_binary(path)
|
756
|
-
|
757
|
-
rescue Errno::EACCES, Errno::EROFS
|
758
|
-
open_file(path, "rb", &:read)
|
756
|
+
File.binread(path)
|
759
757
|
end
|
760
758
|
|
761
759
|
##
|
762
760
|
# Safely write a file in binary mode on all platforms.
|
763
761
|
|
764
762
|
def self.write_binary(path, data)
|
765
|
-
|
766
|
-
io.write data
|
767
|
-
end
|
763
|
+
File.binwrite(path, data)
|
768
764
|
rescue Errno::ENOSPC
|
769
765
|
# If we ran out of space but the file exists, it's *guaranteed* to be corrupted.
|
770
766
|
File.delete(path) if File.exist?(path)
|
@@ -778,24 +774,31 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
778
774
|
File.open(path, flags, &block)
|
779
775
|
end
|
780
776
|
|
777
|
+
##
|
778
|
+
# Open a file with given flags, and protect access with a file lock
|
779
|
+
|
780
|
+
def self.open_file_with_lock(path, &block)
|
781
|
+
file_lock = "#{path}.lock"
|
782
|
+
open_file_with_flock(file_lock, &block)
|
783
|
+
ensure
|
784
|
+
FileUtils.rm_f file_lock
|
785
|
+
end
|
786
|
+
|
781
787
|
##
|
782
788
|
# Open a file with given flags, and protect access with flock
|
783
789
|
|
784
790
|
def self.open_file_with_flock(path, &block)
|
785
|
-
|
791
|
+
mode = IO::RDONLY | IO::APPEND | IO::CREAT | IO::BINARY
|
792
|
+
mode |= IO::SHARE_DELETE if IO.const_defined?(:SHARE_DELETE)
|
786
793
|
|
787
|
-
File.open(path,
|
794
|
+
File.open(path, mode) do |io|
|
788
795
|
begin
|
789
796
|
io.flock(File::LOCK_EX)
|
790
797
|
rescue Errno::ENOSYS, Errno::ENOTSUP
|
798
|
+
rescue Errno::ENOLCK # NFS
|
799
|
+
raise unless Thread.main == Thread.current
|
791
800
|
end
|
792
801
|
yield io
|
793
|
-
rescue Errno::ENOLCK # NFS
|
794
|
-
if Thread.main != Thread.current
|
795
|
-
raise
|
796
|
-
else
|
797
|
-
open_file(path, flags, &block)
|
798
|
-
end
|
799
802
|
end
|
800
803
|
end
|
801
804
|
|
data/rubygems-update.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rubygems-update"
|
5
|
-
s.version = "3.5.
|
5
|
+
s.version = "3.5.19"
|
6
6
|
s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
|
7
7
|
s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
|
8
8
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: exe
|
18
18
|
cert_chain: []
|
19
|
-
date: 2024-
|
19
|
+
date: 2024-09-18 00:00:00.000000000 Z
|
20
20
|
dependencies: []
|
21
21
|
description: |-
|
22
22
|
A package (also known as a library) contains a set of functionality
|
@@ -365,6 +365,10 @@ files:
|
|
365
365
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb
|
366
366
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb
|
367
367
|
- bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb
|
368
|
+
- bundler/lib/bundler/vendor/securerandom/.document
|
369
|
+
- bundler/lib/bundler/vendor/securerandom/LICENSE.txt
|
370
|
+
- bundler/lib/bundler/vendor/securerandom/lib/random/formatter.rb
|
371
|
+
- bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb
|
368
372
|
- bundler/lib/bundler/vendor/thor/.document
|
369
373
|
- bundler/lib/bundler/vendor/thor/LICENSE.md
|
370
374
|
- bundler/lib/bundler/vendor/thor/lib/thor.rb
|
@@ -426,6 +430,7 @@ files:
|
|
426
430
|
- bundler/lib/bundler/vendored_net_http.rb
|
427
431
|
- bundler/lib/bundler/vendored_persistent.rb
|
428
432
|
- bundler/lib/bundler/vendored_pub_grub.rb
|
433
|
+
- bundler/lib/bundler/vendored_securerandom.rb
|
429
434
|
- bundler/lib/bundler/vendored_thor.rb
|
430
435
|
- bundler/lib/bundler/vendored_timeout.rb
|
431
436
|
- bundler/lib/bundler/vendored_tsort.rb
|
@@ -667,6 +672,10 @@ files:
|
|
667
672
|
- lib/rubygems/vendor/resolv/.document
|
668
673
|
- lib/rubygems/vendor/resolv/LICENSE.txt
|
669
674
|
- lib/rubygems/vendor/resolv/lib/resolv.rb
|
675
|
+
- lib/rubygems/vendor/securerandom/.document
|
676
|
+
- lib/rubygems/vendor/securerandom/LICENSE.txt
|
677
|
+
- lib/rubygems/vendor/securerandom/lib/random/formatter.rb
|
678
|
+
- lib/rubygems/vendor/securerandom/lib/securerandom.rb
|
670
679
|
- lib/rubygems/vendor/timeout/.document
|
671
680
|
- lib/rubygems/vendor/timeout/LICENSE.txt
|
672
681
|
- lib/rubygems/vendor/timeout/lib/timeout.rb
|
@@ -693,6 +702,7 @@ files:
|
|
693
702
|
- lib/rubygems/vendored_molinillo.rb
|
694
703
|
- lib/rubygems/vendored_net_http.rb
|
695
704
|
- lib/rubygems/vendored_optparse.rb
|
705
|
+
- lib/rubygems/vendored_securerandom.rb
|
696
706
|
- lib/rubygems/vendored_timeout.rb
|
697
707
|
- lib/rubygems/vendored_tsort.rb
|
698
708
|
- lib/rubygems/version.rb
|
@@ -727,7 +737,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
727
737
|
- !ruby/object:Gem::Version
|
728
738
|
version: '0'
|
729
739
|
requirements: []
|
730
|
-
rubygems_version: 3.5.
|
740
|
+
rubygems_version: 3.5.19
|
731
741
|
signing_key:
|
732
742
|
specification_version: 4
|
733
743
|
summary: RubyGems is a package management framework for Ruby. This gem is downloaded
|