summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKoichi ITO <koic.ito@gmail.com>2017-05-04 06:02:46 +0900
committerKoichi ITO <koic.ito@gmail.com>2017-05-04 08:49:57 +0900
commit7c3d103932fe2b4c35a32b823722c3418130e7f1 (patch)
tree5985e7d8bff89b19b5e7d5dc53864f84a18d612f /lib
parentaf277266db3fac8c0dd52c8bb0bd2ba63ae78131 (diff)
downloadbundler-7c3d103932fe2b4c35a32b823722c3418130e7f1.tar.gz
Unify the notation of RubyGems
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler.rb8
-rw-r--r--lib/bundler/cli.rb2
-rw-r--r--lib/bundler/cli/binstubs.rb2
-rw-r--r--lib/bundler/cli/install.rb2
-rw-r--r--lib/bundler/definition.rb10
-rw-r--r--lib/bundler/env.rb2
-rw-r--r--lib/bundler/gem_helper.rb4
-rw-r--r--lib/bundler/installer.rb4
-rw-r--r--lib/bundler/rubygems_ext.rb4
-rw-r--r--lib/bundler/rubygems_integration.rb38
-rw-r--r--lib/bundler/source/path.rb2
-rw-r--r--lib/bundler/templates/newgem/newgem.gemspec.tt2
12 files changed, 40 insertions, 40 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 88822f8f1a..4285e3ae20 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -313,9 +313,9 @@ EOF
end
def system_bindir
- # Gem.bindir doesn't always return the location that Rubygems will install
- # system binaries. If you put '-n foo' in your .gemrc, Rubygems will
- # install binstubs there instead. Unfortunately, Rubygems doesn't expose
+ # Gem.bindir doesn't always return the location that RubyGems will install
+ # system binaries. If you put '-n foo' in your .gemrc, RubyGems will
+ # install binstubs there instead. Unfortunately, RubyGems doesn't expose
# that directory at all, so rather than parse .gemrc ourselves, we allow
# the directory to be set as well, via `bundle config bindir foo`.
Bundler.settings[:system_bindir] || Bundler.rubygems.gem_bindir
@@ -327,7 +327,7 @@ EOF
sudo_present = which "sudo" if settings.allow_sudo?
if sudo_present
- # the bundle path and subdirectories need to be writable for Rubygems
+ # the bundle path and subdirectories need to be writable for RubyGems
# to be able to unpack and install gems without exploding
path = bundle_path
path = path.parent until path.exist?
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 694c89441b..554c24d3a3 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -352,7 +352,7 @@ module Bundler
long_desc <<-D
Exec runs a command, providing it access to the gems in the bundle. While using
bundle exec you can require and call the bundled gems as if they were installed
- into the system wide Rubygems repository.
+ into the system wide RubyGems repository.
D
map "e" => "exec"
def exec(*args)
diff --git a/lib/bundler/cli/binstubs.rb b/lib/bundler/cli/binstubs.rb
index 95103b7dd8..82815062d3 100644
--- a/lib/bundler/cli/binstubs.rb
+++ b/lib/bundler/cli/binstubs.rb
@@ -29,7 +29,7 @@ module Bundler
end
if spec.name == "bundler"
- Bundler.ui.warn "Sorry, Bundler can only be run via Rubygems."
+ Bundler.ui.warn "Sorry, Bundler can only be run via RubyGems."
elsif options[:standalone]
installer.generate_standalone_bundler_executable_stubs(spec)
else
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 752c5e9c55..a6132751db 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -163,7 +163,7 @@ module Bundler
def check_trust_policy
if options["trust-policy"]
unless Bundler.rubygems.security_policies.keys.include?(options["trust-policy"])
- Bundler.ui.error "Rubygems doesn't know about trust policy '#{options["trust-policy"]}'. " \
+ Bundler.ui.error "RubyGems doesn't know about trust policy '#{options["trust-policy"]}'. " \
"The known policies are: #{Bundler.rubygems.security_policies.keys.join(", ")}."
exit 1
end
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 3e5b1bc447..4b75b39065 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -635,12 +635,12 @@ module Bundler
def converge_sources
changes = false
- # Get the Rubygems sources from the Gemfile.lock
+ # Get the RubyGems sources from the Gemfile.lock
locked_gem_sources = @locked_sources.select {|s| s.is_a?(Source::Rubygems) }
- # Get the Rubygems remotes from the Gemfile
+ # Get the RubyGems remotes from the Gemfile
actual_remotes = sources.rubygems_remotes
- # If there is a Rubygems source in both
+ # If there is a RubyGems source in both
if !locked_gem_sources.empty? && !actual_remotes.empty?
locked_gem_sources.each do |locked_gem|
# Merge the remotes from the Gemfile into the Gemfile.lock
@@ -746,7 +746,7 @@ module Bundler
s.source = (dep && dep.source) || sources.get(s.source)
# Don't add a spec to the list if its source is expired. For example,
- # if you change a Git gem to Rubygems.
+ # if you change a Git gem to RubyGems.
next if s.source.nil?
next if @unlock[:sources].include?(s.source.name)
@@ -885,7 +885,7 @@ module Bundler
specs.each do |s|
# TODO: when two sources without blocks is an error, we can change
# this check to !s.source.is_a?(Source::LocalRubygems). For now,
- # we need to ask every Rubygems for every gem name.
+ # we need to ask every RubyGems for every gem name.
if s.source.is_a?(Source::Git) || s.source.is_a?(Source::Path)
names << s.name
end
diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb
index 3790210351..5e0800889e 100644
--- a/lib/bundler/env.rb
+++ b/lib/bundler/env.rb
@@ -14,7 +14,7 @@ module Bundler
out = String.new("## Environment\n\n```\n")
out << "Bundler #{Bundler::VERSION}\n"
- out << "Rubygems #{Gem::VERSION}\n"
+ out << "RubyGems #{Gem::VERSION}\n"
out << "Ruby #{ruby_version}"
out << "GEM_HOME #{ENV["GEM_HOME"]}\n" unless ENV["GEM_HOME"].nil? || ENV["GEM_HOME"].empty?
out << "GEM_PATH #{ENV["GEM_PATH"]}\n" unless ENV["GEM_PATH"] == ENV["GEM_HOME"]
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 936d1361fa..b6a0c0024f 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -50,8 +50,8 @@ module Bundler
install_gem(built_gem_path, :local)
end
- desc "Create tag #{version_tag} and build and push #{name}-#{version}.gem to Rubygems\n" \
- "To prevent publishing in Rubygems use `gem_push=no rake release`"
+ desc "Create tag #{version_tag} and build and push #{name}-#{version}.gem to RubyGems\n" \
+ "To prevent publishing in RubyGems use `gem_push=no rake release`"
task "release", [:remote] => ["build", "release:guard_clean",
"release:source_control_push", "release:rubygem_push"] do
end
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index cbfdddeaf7..8127e40410 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -188,8 +188,8 @@ module Bundler
if Bundler.rubygems.provides?(">= 2.1.0")
true
else
- Bundler.ui.warn "Rubygems #{Gem::VERSION} is not threadsafe, so your "\
- "gems will be installed one at a time. Upgrade to Rubygems 2.1.0 " \
+ Bundler.ui.warn "RubyGems #{Gem::VERSION} is not threadsafe, so your "\
+ "gems will be installed one at a time. Upgrade to RubyGems 2.1.0 " \
"or higher to enable parallel gem installation."
false
end
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index a0f8fa848b..74a80c923b 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -14,7 +14,7 @@ begin
# shouldn't be deferred.
require "rubygems/source"
rescue LoadError
- # Not available before Rubygems 2.0.0, ignore
+ # Not available before RubyGems 2.0.0, ignore
nil
end
@@ -158,7 +158,7 @@ module Gem
out
end
- # Backport of performance enhancement added to Rubygems 1.4
+ # Backport of performance enhancement added to RubyGems 1.4
def matches_spec?(spec)
# name can be a Regexp, so use ===
return false unless name === spec.name
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 7283a326dd..693f4dd086 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -165,7 +165,7 @@ module Bundler
def spec_cache_dirs
@spec_cache_dirs ||= begin
dirs = gem_path.map {|dir| File.join(dir, "specifications") }
- dirs << Gem.spec_cache_dir if Gem.respond_to?(:spec_cache_dir) # Not in Rubygems 2.0.3 or earlier
+ dirs << Gem.spec_cache_dir if Gem.respond_to?(:spec_cache_dir) # Not in RubyGems 2.0.3 or earlier
dirs.uniq.select {|dir| File.directory? dir }
end
end
@@ -191,7 +191,7 @@ module Bundler
end
def preserve_paths
- # this is a no-op outside of Rubygems 1.8
+ # this is a no-op outside of RubyGems 1.8
yield
end
@@ -233,9 +233,9 @@ module Bundler
{} # if we can't download them, there aren't any
end
- # TODO: This is for older versions of Rubygems... should we support the
+ # TODO: This is for older versions of RubyGems... should we support the
# X-Gemfile-Source header on these old versions?
- # Maybe the newer implementation will work on older Rubygems?
+ # Maybe the newer implementation will work on older RubyGems?
# It seems difficult to keep this implementation and still send the header.
def fetch_all_remote_specs(remote)
old_sources = Bundler.rubygems.sources
@@ -476,7 +476,7 @@ module Bundler
redefine_method(gem_class, :refresh) {}
end
- # Replace or hook into Rubygems to provide a bundlerized view
+ # Replace or hook into RubyGems to provide a bundlerized view
# of the world.
def replace_entrypoints(specs)
specs_by_name = specs.reduce({}) do |h, s|
@@ -492,8 +492,8 @@ module Bundler
Gem.clear_paths
end
- # This backports the correct segment generation code from Rubygems 1.4+
- # by monkeypatching it into the method in Rubygems 1.3.6 and 1.3.7.
+ # This backports the correct segment generation code from RubyGems 1.4+
+ # by monkeypatching it into the method in RubyGems 1.3.6 and 1.3.7.
def backport_segment_generation
redefine_method(Gem::Version, :segments) do
@segments ||= @version.scan(/[0-9]+|[a-z]+/i).map do |s|
@@ -512,7 +512,7 @@ module Bundler
end
# This backports base_dir which replaces installation path
- # Rubygems 1.8+
+ # RubyGems 1.8+
def backport_base_dir
redefine_method(Gem::Specification, :base_dir) do
return Gem.dir unless loaded_from
@@ -581,7 +581,7 @@ module Bundler
end
end
- # Rubygems 1.4 through 1.6
+ # RubyGems 1.4 through 1.6
class Legacy < RubygemsIntegration
def initialize
super
@@ -592,7 +592,7 @@ module Bundler
end
def stub_rubygems(specs)
- # Rubygems versions lower than 1.7 use SourceIndex#from_gems_in
+ # RubyGems versions lower than 1.7 use SourceIndex#from_gems_in
source_index_class = (class << Gem::SourceIndex; self; end)
redefine_method(source_index_class, :from_gems_in) do |*args|
Gem::SourceIndex.new.tap do |source_index|
@@ -624,7 +624,7 @@ module Bundler
end
end
- # Rubygems versions 1.3.6 and 1.3.7
+ # RubyGems versions 1.3.6 and 1.3.7
class Ancient < Legacy
def initialize
super
@@ -632,7 +632,7 @@ module Bundler
end
end
- # Rubygems 1.7
+ # RubyGems 1.7
class Transitional < Legacy
def stub_rubygems(specs)
stub_source_index(specs)
@@ -646,7 +646,7 @@ module Bundler
end
end
- # Rubygems 1.8.5-1.8.19
+ # RubyGems 1.8.5-1.8.19
class Modern < RubygemsIntegration
def stub_rubygems(specs)
Gem::Specification.all = specs
@@ -667,9 +667,9 @@ module Bundler
end
end
- # Rubygems 1.8.0 to 1.8.4
+ # RubyGems 1.8.0 to 1.8.4
class AlmostModern < Modern
- # Rubygems [>= 1.8.0, < 1.8.5] has a bug that changes Gem.dir whenever
+ # RubyGems [>= 1.8.0, < 1.8.5] has a bug that changes Gem.dir whenever
# you call Gem::Installer#install with an :install_dir set. We have to
# change it back for our sudo mode to work.
def preserve_paths
@@ -680,9 +680,9 @@ module Bundler
end
end
- # Rubygems 1.8.20+
+ # RubyGems 1.8.20+
class MoreModern < Modern
- # Rubygems 1.8.20 and adds the skip_validation parameter, so that's
+ # RubyGems 1.8.20 and adds the skip_validation parameter, so that's
# when we start passing it through.
def build(spec, skip_validation = false)
require "rubygems/builder"
@@ -690,7 +690,7 @@ module Bundler
end
end
- # Rubygems 2.0
+ # RubyGems 2.0
class Future < RubygemsIntegration
def stub_rubygems(specs)
Gem::Specification.all = specs
@@ -848,7 +848,7 @@ module Bundler
RubygemsIntegration::Transitional.new
elsif RubygemsIntegration.provides?(">= 1.4.0")
RubygemsIntegration::Legacy.new
- else # Rubygems 1.3.6 and 1.3.7
+ else # RubyGems 1.3.6 and 1.3.7
RubygemsIntegration::Ancient.new
end
end
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index 0ad0a029f0..82f987fdd8 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -238,7 +238,7 @@ module Bundler
"to modify their .gemspec so it can work with `gem build`."
end
- Bundler.ui.warn "The validation message from Rubygems was:\n #{e.message}"
+ Bundler.ui.warn "The validation message from RubyGems was:\n #{e.message}"
end
end
end
diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt
index caea7fe7be..a7b7e5a9ee 100644
--- a/lib/bundler/templates/newgem/newgem.gemspec.tt
+++ b/lib/bundler/templates/newgem/newgem.gemspec.tt
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
spec.authors = [<%= config[:author].inspect %>]
spec.email = [<%= config[:email].inspect %>]
- spec.summary = %q{TODO: Write a short summary, because Rubygems requires one.}
+ spec.summary = %q{TODO: Write a short summary, because RubyGems requires one.}
spec.description = %q{TODO: Write a longer description or delete this line.}
spec.homepage = "TODO: Put your gem's website or public repo URL here."
<%- if config[:mit] -%>