rubygems-update 3.7.2 → 4.0.0.beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1413 -1323
  3. data/CODE_OF_CONDUCT.md +7 -129
  4. data/Manifest.txt +5 -11
  5. data/README.md +2 -2
  6. data/bundler/CHANGELOG.md +990 -917
  7. data/bundler/README.md +4 -4
  8. data/bundler/bundler.gemspec +3 -3
  9. data/bundler/lib/bundler/build_metadata.rb +2 -2
  10. data/bundler/lib/bundler/capistrano.rb +1 -19
  11. data/bundler/lib/bundler/cli/cache.rb +1 -11
  12. data/bundler/lib/bundler/cli/common.rb +20 -3
  13. data/bundler/lib/bundler/cli/config.rb +1 -2
  14. data/bundler/lib/bundler/cli/console.rb +5 -0
  15. data/bundler/lib/bundler/cli/exec.rb +29 -4
  16. data/bundler/lib/bundler/cli/gem.rb +19 -33
  17. data/bundler/lib/bundler/cli/install.rb +7 -82
  18. data/bundler/lib/bundler/cli/issue.rb +2 -2
  19. data/bundler/lib/bundler/cli/list.rb +33 -2
  20. data/bundler/lib/bundler/cli/plugin.rb +5 -1
  21. data/bundler/lib/bundler/cli/show.rb +1 -1
  22. data/bundler/lib/bundler/cli/update.rb +3 -3
  23. data/bundler/lib/bundler/cli.rb +75 -83
  24. data/bundler/lib/bundler/compact_index_client.rb +0 -1
  25. data/bundler/lib/bundler/current_ruby.rb +3 -15
  26. data/bundler/lib/bundler/definition.rb +45 -35
  27. data/bundler/lib/bundler/deployment.rb +1 -64
  28. data/bundler/lib/bundler/digest.rb +1 -1
  29. data/bundler/lib/bundler/dsl.rb +13 -35
  30. data/bundler/lib/bundler/endpoint_specification.rb +0 -22
  31. data/bundler/lib/bundler/errors.rb +1 -5
  32. data/bundler/lib/bundler/feature_flag.rb +0 -33
  33. data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
  34. data/bundler/lib/bundler/friendly_errors.rb +2 -2
  35. data/bundler/lib/bundler/index.rb +0 -7
  36. data/bundler/lib/bundler/inline.rb +1 -1
  37. data/bundler/lib/bundler/installer/gem_installer.rb +0 -11
  38. data/bundler/lib/bundler/installer.rb +0 -6
  39. data/bundler/lib/bundler/lockfile_generator.rb +1 -1
  40. data/bundler/lib/bundler/lockfile_parser.rb +2 -12
  41. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle-binstubs.1 +3 -6
  43. data/bundler/lib/bundler/man/bundle-binstubs.1.ronn +4 -6
  44. data/bundler/lib/bundler/man/bundle-cache.1 +2 -14
  45. data/bundler/lib/bundler/man/bundle-cache.1.ronn +1 -14
  46. data/bundler/lib/bundler/man/bundle-check.1 +2 -5
  47. data/bundler/lib/bundler/man/bundle-check.1.ronn +0 -5
  48. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  49. data/bundler/lib/bundler/man/bundle-config.1 +6 -33
  50. data/bundler/lib/bundler/man/bundle-config.1.ronn +20 -55
  51. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  52. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  53. data/bundler/lib/bundler/man/bundle-env.1 +1 -1
  54. data/bundler/lib/bundler/man/bundle-exec.1 +2 -5
  55. data/bundler/lib/bundler/man/bundle-exec.1.ronn +1 -5
  56. data/bundler/lib/bundler/man/bundle-fund.1 +1 -1
  57. data/bundler/lib/bundler/man/bundle-gem.1 +3 -6
  58. data/bundler/lib/bundler/man/bundle-gem.1.ronn +2 -5
  59. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  60. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  61. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  62. data/bundler/lib/bundler/man/bundle-install.1 +8 -59
  63. data/bundler/lib/bundler/man/bundle-install.1.ronn +12 -107
  64. data/bundler/lib/bundler/man/bundle-issue.1 +1 -1
  65. data/bundler/lib/bundler/man/bundle-licenses.1 +1 -1
  66. data/bundler/lib/bundler/man/bundle-list.1 +6 -1
  67. data/bundler/lib/bundler/man/bundle-list.1.ronn +5 -0
  68. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  69. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  70. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  71. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  72. data/bundler/lib/bundler/man/bundle-plugin.1 +2 -9
  73. data/bundler/lib/bundler/man/bundle-plugin.1.ronn +0 -8
  74. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  75. data/bundler/lib/bundler/man/bundle-remove.1 +2 -8
  76. data/bundler/lib/bundler/man/bundle-remove.1.ronn +1 -8
  77. data/bundler/lib/bundler/man/bundle-show.1 +2 -5
  78. data/bundler/lib/bundler/man/bundle-show.1.ronn +0 -4
  79. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  80. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  81. data/bundler/lib/bundler/man/bundle.1 +1 -10
  82. data/bundler/lib/bundler/man/bundle.1.ronn +0 -9
  83. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  84. data/bundler/lib/bundler/man/index.txt +0 -2
  85. data/bundler/lib/bundler/materialization.rb +1 -1
  86. data/bundler/lib/bundler/plugin/installer.rb +0 -10
  87. data/bundler/lib/bundler/plugin/source_list.rb +1 -1
  88. data/bundler/lib/bundler/plugin.rb +1 -1
  89. data/bundler/lib/bundler/resolver.rb +1 -1
  90. data/bundler/lib/bundler/ruby_dsl.rb +2 -0
  91. data/bundler/lib/bundler/ruby_version.rb +1 -3
  92. data/bundler/lib/bundler/rubygems_ext.rb +1 -1
  93. data/bundler/lib/bundler/rubygems_gem_installer.rb +1 -1
  94. data/bundler/lib/bundler/rubygems_integration.rb +1 -5
  95. data/bundler/lib/bundler/self_manager.rb +1 -1
  96. data/bundler/lib/bundler/settings.rb +7 -26
  97. data/bundler/lib/bundler/shared_helpers.rb +8 -20
  98. data/bundler/lib/bundler/source/git/git_proxy.rb +3 -11
  99. data/bundler/lib/bundler/source/git.rb +2 -3
  100. data/bundler/lib/bundler/source/path.rb +3 -7
  101. data/bundler/lib/bundler/source/rubygems.rb +11 -17
  102. data/bundler/lib/bundler/source.rb +1 -1
  103. data/bundler/lib/bundler/source_list.rb +4 -45
  104. data/bundler/lib/bundler/source_map.rb +2 -5
  105. data/bundler/lib/bundler/spec_set.rb +6 -15
  106. data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +7 -129
  107. data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
  108. data/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
  109. data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-go.rb.tt +11 -0
  110. data/bundler/lib/bundler/templates/newgem/ext/newgem/go.mod.tt +5 -0
  111. data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem-go.c.tt +2 -0
  112. data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.go.tt +31 -0
  113. data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +6 -0
  114. data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
  115. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -1
  116. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +26 -23
  117. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  118. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +50 -6
  119. data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +57 -52
  120. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +5 -2
  121. data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +1 -1
  122. data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +57 -15
  123. data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +1 -1
  124. data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +34 -21
  125. data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +12 -0
  126. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
  127. data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +2 -2
  128. data/bundler/lib/bundler/version.rb +1 -1
  129. data/bundler/lib/bundler/vlad.rb +1 -14
  130. data/bundler/lib/bundler.rb +6 -28
  131. data/doc/MAINTAINERS.txt +0 -7
  132. data/doc/bundler/UPGRADING.md +11 -5
  133. data/doc/rubygems/CONTRIBUTING.md +1 -1
  134. data/lib/rubygems/basic_specification.rb +3 -9
  135. data/lib/rubygems/bundler_version_finder.rb +1 -0
  136. data/lib/rubygems/command.rb +1 -1
  137. data/lib/rubygems/command_manager.rb +3 -4
  138. data/lib/rubygems/commands/build_command.rb +0 -7
  139. data/lib/rubygems/commands/cert_command.rb +1 -1
  140. data/lib/rubygems/commands/install_command.rb +1 -5
  141. data/lib/rubygems/commands/setup_command.rb +5 -3
  142. data/lib/rubygems/config_file.rb +1 -1
  143. data/lib/rubygems/dependency.rb +1 -1
  144. data/lib/rubygems/dependency_installer.rb +0 -77
  145. data/lib/rubygems/dependency_list.rb +1 -2
  146. data/lib/rubygems/deprecate.rb +74 -72
  147. data/lib/rubygems/doctor.rb +1 -1
  148. data/lib/rubygems/errors.rb +1 -1
  149. data/lib/rubygems/exceptions.rb +2 -3
  150. data/lib/rubygems/ext/builder.rb +6 -2
  151. data/lib/rubygems/ext/cargo_builder.rb +2 -2
  152. data/lib/rubygems/ext/cmake_builder.rb +97 -8
  153. data/lib/rubygems/ext/configure_builder.rb +2 -2
  154. data/lib/rubygems/ext/ext_conf_builder.rb +6 -2
  155. data/lib/rubygems/ext/rake_builder.rb +2 -2
  156. data/lib/rubygems/gem_runner.rb +0 -1
  157. data/lib/rubygems/install_update_options.rb +1 -2
  158. data/lib/rubygems/installer.rb +16 -54
  159. data/lib/rubygems/name_tuple.rb +7 -1
  160. data/lib/rubygems/package/tar_header.rb +4 -4
  161. data/lib/rubygems/package/tar_reader.rb +2 -0
  162. data/lib/rubygems/package/tar_writer.rb +1 -1
  163. data/lib/rubygems/package.rb +21 -12
  164. data/lib/rubygems/platform.rb +31 -11
  165. data/lib/rubygems/remote_fetcher.rb +8 -5
  166. data/lib/rubygems/resolver/conflict.rb +1 -1
  167. data/lib/rubygems/resolver.rb +1 -1
  168. data/lib/rubygems/security/signer.rb +1 -1
  169. data/lib/rubygems/source.rb +2 -2
  170. data/lib/rubygems/spec_fetcher.rb +4 -4
  171. data/lib/rubygems/specification.rb +5 -96
  172. data/lib/rubygems/specification_policy.rb +0 -36
  173. data/lib/rubygems/specification_record.rb +1 -1
  174. data/lib/rubygems/text.rb +1 -1
  175. data/lib/rubygems/uninstaller.rb +17 -6
  176. data/lib/rubygems/user_interaction.rb +6 -9
  177. data/lib/rubygems/util.rb +0 -22
  178. data/lib/rubygems/validator.rb +1 -1
  179. data/lib/rubygems/vendor/net-http/lib/net/http/generic_request.rb +25 -9
  180. data/lib/rubygems/vendor/net-http/lib/net/http/responses.rb +2 -2
  181. data/lib/rubygems/vendor/net-http/lib/net/http.rb +14 -14
  182. data/lib/rubygems/vendor/optparse/lib/optparse.rb +82 -41
  183. data/lib/rubygems/vendor/resolv/lib/resolv.rb +1 -1
  184. data/lib/rubygems/vendor/timeout/lib/timeout.rb +4 -1
  185. data/lib/rubygems/vendor/uri/lib/uri/common.rb +57 -15
  186. data/lib/rubygems/vendor/uri/lib/uri/file.rb +1 -1
  187. data/lib/rubygems/vendor/uri/lib/uri/generic.rb +34 -21
  188. data/lib/rubygems/vendor/uri/lib/uri/http.rb +12 -0
  189. data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
  190. data/lib/rubygems/vendor/uri/lib/uri/version.rb +2 -2
  191. data/lib/rubygems/version.rb +2 -17
  192. data/lib/rubygems/win_platform.rb +31 -0
  193. data/lib/rubygems.rb +10 -38
  194. data/rubygems-update.gemspec +4 -4
  195. metadata +10 -18
  196. data/bundler/lib/bundler/cli/inject.rb +0 -60
  197. data/bundler/lib/bundler/cli/viz.rb +0 -31
  198. data/bundler/lib/bundler/graph.rb +0 -152
  199. data/bundler/lib/bundler/man/bundle-inject.1 +0 -31
  200. data/bundler/lib/bundler/man/bundle-inject.1.ronn +0 -32
  201. data/bundler/lib/bundler/man/bundle-viz.1 +0 -30
  202. data/bundler/lib/bundler/man/bundle-viz.1.ronn +0 -36
  203. data/bundler/lib/bundler/similarity_detector.rb +0 -63
  204. data/lib/rubygems/commands/query_command.rb +0 -43
  205. data/lib/rubygems/compatibility.rb +0 -41
  206. data/lib/rubygems/install_default_message.rb +0 -13
@@ -1,60 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bundler
4
- class CLI::Inject
5
- attr_reader :options, :name, :version, :group, :source, :gems
6
- def initialize(options, name, version)
7
- @options = options
8
- @name = name
9
- @version = version || last_version_number
10
- @group = options[:group].split(",") unless options[:group].nil?
11
- @source = options[:source]
12
- @gems = []
13
- end
14
-
15
- def run
16
- # The required arguments allow Thor to give useful feedback when the arguments
17
- # are incorrect. This adds those first two arguments onto the list as a whole.
18
- gems.unshift(source).unshift(group).unshift(version).unshift(name)
19
-
20
- # Build an array of Dependency objects out of the arguments
21
- deps = []
22
- # when `inject` support addition of more than one gem, then this loop will
23
- # help. Currently this loop is running once.
24
- gems.each_slice(4) do |gem_name, gem_version, gem_group, gem_source|
25
- ops = Gem::Requirement::OPS.map {|key, _val| key }
26
- has_op = ops.any? {|op| gem_version.start_with? op }
27
- gem_version = "~> #{gem_version}" unless has_op
28
- deps << Bundler::Dependency.new(gem_name, gem_version, "group" => gem_group, "source" => gem_source)
29
- end
30
-
31
- added = Injector.inject(deps, options)
32
-
33
- if added.any?
34
- Bundler.ui.confirm "Added to Gemfile:"
35
- Bundler.ui.confirm(added.map do |d|
36
- name = "'#{d.name}'"
37
- requirement = ", '#{d.requirement}'"
38
- group = ", group: #{d.groups.inspect}" if d.groups != Array(:default)
39
- source = ", source: '#{d.source}'" unless d.source.nil?
40
- %(gem #{name}#{requirement}#{group}#{source})
41
- end.join("\n"))
42
- else
43
- Bundler.ui.confirm "All gems were already present in the Gemfile"
44
- end
45
- end
46
-
47
- private
48
-
49
- def last_version_number
50
- definition = Bundler.definition(true)
51
- definition.remotely!
52
- specs = definition.index[name].sort_by(&:version)
53
- unless options[:pre]
54
- specs.delete_if {|b| b.respond_to?(:version) && b.version.prerelease? }
55
- end
56
- spec = specs.last
57
- spec.version.to_s
58
- end
59
- end
60
- end
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bundler
4
- class CLI::Viz
5
- attr_reader :options, :gem_name
6
- def initialize(options)
7
- @options = options
8
- end
9
-
10
- def run
11
- # make sure we get the right `graphviz`. There is also a `graphviz`
12
- # gem we're not built to support
13
- gem "ruby-graphviz"
14
- require "graphviz"
15
-
16
- options[:without] = options[:without].join(":").tr(" ", ":").split(":")
17
- output_file = File.expand_path(options[:file])
18
-
19
- graph = Graph.new(Bundler.load, output_file, options[:version], options[:requirements], options[:format], options[:without])
20
- graph.viz
21
- rescue LoadError => e
22
- Bundler.ui.error e.inspect
23
- Bundler.ui.warn "Make sure you have the graphviz ruby gem. You can install it with:"
24
- Bundler.ui.warn "`gem install ruby-graphviz`"
25
- rescue StandardError => e
26
- raise unless e.message.to_s.include?("GraphViz not installed or dot not in PATH")
27
- Bundler.ui.error e.message
28
- Bundler.ui.warn "Please install GraphViz. On a Mac with Homebrew, you can run `brew install graphviz`."
29
- end
30
- end
31
- end
@@ -1,152 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "set"
4
- module Bundler
5
- class Graph
6
- GRAPH_NAME = :Gemfile
7
-
8
- def initialize(env, output_file, show_version = false, show_requirements = false, output_format = "png", without = [])
9
- @env = env
10
- @output_file = output_file
11
- @show_version = show_version
12
- @show_requirements = show_requirements
13
- @output_format = output_format
14
- @without_groups = without.map(&:to_sym)
15
-
16
- @groups = []
17
- @relations = Hash.new {|h, k| h[k] = Set.new }
18
- @node_options = {}
19
- @edge_options = {}
20
-
21
- _populate_relations
22
- end
23
-
24
- attr_reader :groups, :relations, :node_options, :edge_options, :output_file, :output_format
25
-
26
- def viz
27
- GraphVizClient.new(self).run
28
- end
29
-
30
- private
31
-
32
- def _populate_relations
33
- parent_dependencies = _groups.values.to_set.flatten
34
- loop do
35
- break if parent_dependencies.empty?
36
-
37
- tmp = Set.new
38
- parent_dependencies.each do |dependency|
39
- child_dependencies = spec_for_dependency(dependency).runtime_dependencies.to_set
40
- @relations[dependency.name] += child_dependencies.map(&:name).to_set
41
- tmp += child_dependencies
42
-
43
- @node_options[dependency.name] = _make_label(dependency, :node)
44
- child_dependencies.each do |c_dependency|
45
- @edge_options["#{dependency.name}_#{c_dependency.name}"] = _make_label(c_dependency, :edge)
46
- end
47
- end
48
- parent_dependencies = tmp
49
- end
50
- end
51
-
52
- def _groups
53
- relations = Hash.new {|h, k| h[k] = Set.new }
54
- @env.current_dependencies.each do |dependency|
55
- dependency.groups.each do |group|
56
- next if @without_groups.include?(group)
57
-
58
- relations[group.to_s].add(dependency)
59
- @relations[group.to_s].add(dependency.name)
60
-
61
- @node_options[group.to_s] ||= _make_label(group, :node)
62
- @edge_options["#{group}_#{dependency.name}"] = _make_label(dependency, :edge)
63
- end
64
- end
65
- @groups = relations.keys
66
- relations
67
- end
68
-
69
- def _make_label(symbol_or_string_or_dependency, element_type)
70
- case element_type.to_sym
71
- when :node
72
- if symbol_or_string_or_dependency.is_a?(Gem::Dependency)
73
- label = symbol_or_string_or_dependency.name.dup
74
- label << "\n#{spec_for_dependency(symbol_or_string_or_dependency).version}" if @show_version
75
- else
76
- label = symbol_or_string_or_dependency.to_s
77
- end
78
- when :edge
79
- label = nil
80
- if symbol_or_string_or_dependency.respond_to?(:requirements_list) && @show_requirements
81
- tmp = symbol_or_string_or_dependency.requirements_list.join(", ")
82
- label = tmp if tmp != ">= 0"
83
- end
84
- else
85
- raise ArgumentError, "2nd argument is invalid"
86
- end
87
- label.nil? ? {} : { label: label }
88
- end
89
-
90
- def spec_for_dependency(dependency)
91
- @env.requested_specs.find {|s| s.name == dependency.name }
92
- end
93
-
94
- class GraphVizClient
95
- def initialize(graph_instance)
96
- @graph_name = graph_instance.class::GRAPH_NAME
97
- @groups = graph_instance.groups
98
- @relations = graph_instance.relations
99
- @node_options = graph_instance.node_options
100
- @edge_options = graph_instance.edge_options
101
- @output_file = graph_instance.output_file
102
- @output_format = graph_instance.output_format
103
- end
104
-
105
- def g
106
- @g ||= ::GraphViz.digraph(@graph_name, concentrate: true, normalize: true, nodesep: 0.55) do |g|
107
- g.edge[:weight] = 2
108
- g.edge[:fontname] = g.node[:fontname] = "Arial, Helvetica, SansSerif"
109
- g.edge[:fontsize] = 12
110
- end
111
- end
112
-
113
- def run
114
- @groups.each do |group|
115
- g.add_nodes(
116
- group, {
117
- style: "filled",
118
- fillcolor: "#B9B9D5",
119
- shape: "box3d",
120
- fontsize: 16,
121
- }.merge(@node_options[group])
122
- )
123
- end
124
-
125
- @relations.each do |parent, children|
126
- children.each do |child|
127
- if @groups.include?(parent)
128
- g.add_nodes(child, { style: "filled", fillcolor: "#B9B9D5" }.merge(@node_options[child]))
129
- g.add_edges(parent, child, { constraint: false }.merge(@edge_options["#{parent}_#{child}"]))
130
- else
131
- g.add_nodes(child, @node_options[child])
132
- g.add_edges(parent, child, @edge_options["#{parent}_#{child}"])
133
- end
134
- end
135
- end
136
-
137
- if @output_format.to_s == "debug"
138
- $stdout.puts g.output none: String
139
- Bundler.ui.info "debugging bundle viz..."
140
- else
141
- begin
142
- g.output @output_format.to_sym => "#{@output_file}.#{@output_format}"
143
- Bundler.ui.info "#{@output_file}.#{@output_format}"
144
- rescue ArgumentError => e
145
- warn "Unsupported output format. See Ruby-Graphviz/lib/graphviz/constants.rb"
146
- raise e
147
- end
148
- end
149
- end
150
- end
151
- end
152
- end
@@ -1,31 +0,0 @@
1
- .\" generated with Ronn-NG/v0.10.1
2
- .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INJECT" "1" "August 2025" ""
4
- .SH "NAME"
5
- \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
6
- .SH "SYNOPSIS"
7
- \fBbundle inject\fR [GEM] [VERSION] [\-\-source=SOURCE] [\-\-group=GROUP]
8
- .SH "DESCRIPTION"
9
- Adds the named gem(s) with their version requirements to the resolved [\fBGemfile(5)\fR][Gemfile(5)]\.
10
- .P
11
- This command will add the gem to both your [\fBGemfile(5)\fR][Gemfile(5)] and Gemfile\.lock if it isn't listed yet\.
12
- .P
13
- Example:
14
- .IP "" 4
15
- .nf
16
- bundle install
17
- bundle inject 'rack' '> 0'
18
- .fi
19
- .IP "" 0
20
- .P
21
- This will inject the 'rack' gem with a version greater than 0 in your [\fBGemfile(5)\fR][Gemfile(5)] and Gemfile\.lock\.
22
- .P
23
- The \fBbundle inject\fR command was deprecated in Bundler 2\.1 and will be removed in Bundler 4\.0\.
24
- .SH "OPTIONS"
25
- .TP
26
- \fB\-\-source=SOURCE\fR
27
- Install gem from the given source\.
28
- .TP
29
- \fB\-\-group=GROUP\fR
30
- Install gem into a bundler group\.
31
-
@@ -1,32 +0,0 @@
1
- bundle-inject(1) -- Add named gem(s) with version requirements to Gemfile
2
- =========================================================================
3
-
4
- ## SYNOPSIS
5
-
6
- `bundle inject` [GEM] [VERSION] [--source=SOURCE] [--group=GROUP]
7
-
8
- ## DESCRIPTION
9
-
10
- Adds the named gem(s) with their version requirements to the resolved
11
- [`Gemfile(5)`][Gemfile(5)].
12
-
13
- This command will add the gem to both your [`Gemfile(5)`][Gemfile(5)] and Gemfile.lock if it
14
- isn't listed yet.
15
-
16
- Example:
17
-
18
- bundle install
19
- bundle inject 'rack' '> 0'
20
-
21
- This will inject the 'rack' gem with a version greater than 0 in your
22
- [`Gemfile(5)`][Gemfile(5)] and Gemfile.lock.
23
-
24
- The `bundle inject` command was deprecated in Bundler 2.1 and will be removed in Bundler 4.0.
25
-
26
- ## OPTIONS
27
-
28
- * `--source=SOURCE`:
29
- Install gem from the given source.
30
-
31
- * `--group=GROUP`:
32
- Install gem into a bundler group.
@@ -1,30 +0,0 @@
1
- .\" generated with Ronn-NG/v0.10.1
2
- .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-VIZ" "1" "August 2025" ""
4
- .SH "NAME"
5
- \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
6
- .SH "SYNOPSIS"
7
- \fBbundle viz\fR [\-\-file=FILE] [\-\-format=FORMAT] [\-\-requirements] [\-\-version] [\-\-without=GROUP GROUP]
8
- .SH "DESCRIPTION"
9
- \fBviz\fR generates a PNG file of the current \fBGemfile(5)\fR as a dependency graph\. \fBviz\fR requires the ruby\-graphviz gem (and its dependencies)\.
10
- .P
11
- The associated gems must also be installed via \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR\.
12
- .P
13
- \fBviz\fR command was deprecated in Bundler 2\.2\. Use bundler\-graph plugin \fIhttps://github\.com/rubygems/bundler\-graph\fR instead\.
14
- .SH "OPTIONS"
15
- .TP
16
- \fB\-\-file=FILE\fR, \fB\-f=FILE\fR
17
- The name to use for the generated file\. See \fB\-\-format\fR option
18
- .TP
19
- \fB\-\-format=FORMAT\fR, \fB\-F=FORMAT\fR
20
- This is output format option\. Supported format is png, jpg, svg, dot \|\.\|\.\|\.
21
- .TP
22
- \fB\-\-requirements\fR, \fB\-R\fR
23
- Set to show the version of each required dependency\.
24
- .TP
25
- \fB\-\-version\fR, \fB\-v\fR
26
- Set to show each gem version\.
27
- .TP
28
- \fB\-\-without=<list>\fR, \fB\-W=<list>\fR
29
- Exclude gems that are part of the specified named group\.
30
-
@@ -1,36 +0,0 @@
1
- bundle-viz(1) -- Generates a visual dependency graph for your Gemfile
2
- =====================================================================
3
-
4
- ## SYNOPSIS
5
-
6
- `bundle viz` [--file=FILE]
7
- [--format=FORMAT]
8
- [--requirements]
9
- [--version]
10
- [--without=GROUP GROUP]
11
-
12
- ## DESCRIPTION
13
-
14
- `viz` generates a PNG file of the current `Gemfile(5)` as a dependency graph.
15
- `viz` requires the ruby-graphviz gem (and its dependencies).
16
-
17
- The associated gems must also be installed via [`bundle install(1)`](bundle-install.1.html).
18
-
19
- `viz` command was deprecated in Bundler 2.2. Use [bundler-graph plugin](https://github.com/rubygems/bundler-graph) instead.
20
-
21
- ## OPTIONS
22
-
23
- * `--file=FILE`, `-f=FILE`:
24
- The name to use for the generated file. See `--format` option
25
-
26
- * `--format=FORMAT`, `-F=FORMAT`:
27
- This is output format option. Supported format is png, jpg, svg, dot ...
28
-
29
- * `--requirements`, `-R`:
30
- Set to show the version of each required dependency.
31
-
32
- * `--version`, `-v`:
33
- Set to show each gem version.
34
-
35
- * `--without=<list>`, `-W=<list>`:
36
- Exclude gems that are part of the specified named group.
@@ -1,63 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bundler
4
- class SimilarityDetector
5
- SimilarityScore = Struct.new(:string, :distance)
6
-
7
- # initialize with an array of words to be matched against
8
- def initialize(corpus)
9
- @corpus = corpus
10
- end
11
-
12
- # return an array of words similar to 'word' from the corpus
13
- def similar_words(word, limit = 3)
14
- words_by_similarity = @corpus.map {|w| SimilarityScore.new(w, levenshtein_distance(word, w)) }
15
- words_by_similarity.select {|s| s.distance <= limit }.sort_by(&:distance).map(&:string)
16
- end
17
-
18
- # return the result of 'similar_words', concatenated into a list
19
- # (eg "a, b, or c")
20
- def similar_word_list(word, limit = 3)
21
- words = similar_words(word, limit)
22
- if words.length == 1
23
- words[0]
24
- elsif words.length > 1
25
- [words[0..-2].join(", "), words[-1]].join(" or ")
26
- end
27
- end
28
-
29
- protected
30
-
31
- # https://www.informit.com/articles/article.aspx?p=683059&seqNum=36
32
- def levenshtein_distance(this, that, ins = 2, del = 2, sub = 1)
33
- # ins, del, sub are weighted costs
34
- return nil if this.nil?
35
- return nil if that.nil?
36
- dm = [] # distance matrix
37
-
38
- # Initialize first row values
39
- dm[0] = (0..this.length).collect {|i| i * ins }
40
- fill = [0] * (this.length - 1)
41
-
42
- # Initialize first column values
43
- (1..that.length).each do |i|
44
- dm[i] = [i * del, fill.flatten]
45
- end
46
-
47
- # populate matrix
48
- (1..that.length).each do |i|
49
- (1..this.length).each do |j|
50
- # critical comparison
51
- dm[i][j] = [
52
- dm[i - 1][j - 1] + (this[j - 1] == that[i - 1] ? 0 : sub),
53
- dm[i][j - 1] + ins,
54
- dm[i - 1][j] + del,
55
- ].min
56
- end
57
- end
58
-
59
- # The last value in matrix is the Levenshtein distance between the strings
60
- dm[that.length][this.length]
61
- end
62
- end
63
- end
@@ -1,43 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "../command"
4
- require_relative "../query_utils"
5
- require_relative "../deprecate"
6
-
7
- class Gem::Commands::QueryCommand < Gem::Command
8
- extend Gem::Deprecate
9
- rubygems_deprecate_command
10
-
11
- include Gem::QueryUtils
12
-
13
- alias_method :warning_without_suggested_alternatives, :deprecation_warning
14
- def deprecation_warning
15
- warning_without_suggested_alternatives
16
-
17
- message = "It is recommended that you use `gem search` or `gem list` instead.\n"
18
- alert_warning message unless Gem::Deprecate.skip
19
- end
20
-
21
- def initialize(name = "query", summary = "Query gem information in local or remote repositories")
22
- super name, summary,
23
- domain: :local, details: false, versions: true,
24
- installed: nil, version: Gem::Requirement.default
25
-
26
- add_option("-n", "--name-matches REGEXP",
27
- "Name of gem(s) to query on matches the",
28
- "provided REGEXP") do |value, options|
29
- options[:name] = /#{value}/i
30
- end
31
-
32
- add_query_options
33
- end
34
-
35
- def description # :nodoc:
36
- <<-EOF
37
- The query command is the basis for the list and search commands.
38
-
39
- You should really use the list and search commands instead. This command
40
- is too hard to use.
41
- EOF
42
- end
43
- end
@@ -1,41 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- #--
4
- # This file contains all sorts of little compatibility hacks that we've
5
- # had to introduce over the years. Quarantining them into one file helps
6
- # us know when we can get rid of them.
7
- #
8
- # Ruby 1.9.x has introduced some things that are awkward, and we need to
9
- # support them, so we define some constants to use later.
10
- #
11
- # TODO remove at RubyGems 4
12
- #++
13
-
14
- module Gem
15
- # :stopdoc:
16
-
17
- RubyGemsVersion = VERSION
18
- deprecate_constant(:RubyGemsVersion)
19
-
20
- RbConfigPriorities = %w[
21
- MAJOR
22
- MINOR
23
- TEENY
24
- EXEEXT RUBY_SO_NAME arch bindir datadir libdir ruby_install_name
25
- ruby_version rubylibprefix sitedir sitelibdir vendordir vendorlibdir
26
- rubylibdir
27
- ].freeze
28
-
29
- if defined?(ConfigMap)
30
- RbConfigPriorities.each do |key|
31
- ConfigMap[key.to_sym] = RbConfig::CONFIG[key]
32
- end
33
- else
34
- ##
35
- # Configuration settings from ::RbConfig
36
- ConfigMap = Hash.new do |cm, key|
37
- cm[key] = RbConfig::CONFIG[key.to_s]
38
- end
39
- deprecate_constant(:ConfigMap)
40
- end
41
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "../rubygems"
4
- require_relative "user_interaction"
5
-
6
- ##
7
- # A post-install hook that displays "Successfully installed
8
- # some_gem-1.0 as a default gem"
9
-
10
- Gem.post_install do |installer|
11
- ui = Gem::DefaultUserInteraction.ui
12
- ui.say "Successfully installed #{installer.spec.full_name} as a default gem"
13
- end