Skip to content

Commit 6439b89

Browse files
Remove aggregate source mentions
It's a term from times with multiple remote sources, let's move on :)
1 parent 8f9d6c5 commit 6439b89

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

bundler/lib/bundler/plugin/source_list.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def all_sources
2323

2424
private
2525

26-
def rubygems_aggregate_class
26+
def source_class
2727
Plugin::Installer::Rubygems
2828
end
2929
end

bundler/lib/bundler/source_list.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class SourceList
99
:metadata_source
1010

1111
def global_rubygems_source
12-
@global_rubygems_source ||= rubygems_aggregate_class.new("allow_local" => true)
12+
@global_rubygems_source ||= source_class.new("allow_local" => true)
1313
end
1414

1515
def initialize
@@ -191,7 +191,7 @@ def replace_path_source(replacement_sources, gemfile_source)
191191
end
192192
end
193193

194-
def rubygems_aggregate_class
194+
def source_class
195195
Source::Rubygems
196196
end
197197

bundler/spec/bundler/source_list_spec.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
subject(:source_list) { Bundler::SourceList.new }
1313

14-
let(:rubygems_aggregate) { Bundler::Source::Rubygems.new }
14+
let(:global_rubygems_source) { Bundler::Source::Rubygems.new }
1515
let(:metadata_source) { Bundler::Source::Metadata.new }
1616

1717
describe "adding sources" do
@@ -118,11 +118,11 @@
118118
describe "#add_global_rubygems_remote" do
119119
let!(:returned_source) { source_list.add_global_rubygems_remote("https://rubygems.org/") }
120120

121-
it "returns the aggregate rubygems source" do
121+
it "returns the global rubygems source" do
122122
expect(returned_source).to be_instance_of(Bundler::Source::Rubygems)
123123
end
124124

125-
it "adds the provided remote to the beginning of the aggregate source" do
125+
it "adds the provided remote to the beginning of the global source" do
126126
source_list.add_global_rubygems_remote("https://othersource.org")
127127
expect(returned_source.remotes).to eq [
128128
Gem::URI("https://othersource.org/"),
@@ -156,21 +156,21 @@
156156
end
157157

158158
describe "#all_sources" do
159-
it "includes the aggregate rubygems source when rubygems sources have been added" do
159+
it "includes the global rubygems source when rubygems sources have been added" do
160160
source_list.add_git_source("uri" => "git://host/path.git")
161161
source_list.add_rubygems_source("remotes" => ["https://rubygems.org"])
162162
source_list.add_path_source("path" => "/path/to/gem")
163163
source_list.add_plugin_source("new_source", "uri" => "https://some.url/a")
164164

165-
expect(source_list.all_sources).to include rubygems_aggregate
165+
expect(source_list.all_sources).to include global_rubygems_source
166166
end
167167

168-
it "includes the aggregate rubygems source when no rubygems sources have been added" do
168+
it "includes the global rubygems source when no rubygems sources have been added" do
169169
source_list.add_git_source("uri" => "git://host/path.git")
170170
source_list.add_path_source("path" => "/path/to/gem")
171171
source_list.add_plugin_source("new_source", "uri" => "https://some.url/a")
172172

173-
expect(source_list.all_sources).to include rubygems_aggregate
173+
expect(source_list.all_sources).to include global_rubygems_source
174174
end
175175

176176
it "returns sources of the same type in the reverse order that they were added" do
@@ -204,7 +204,7 @@
204204
Bundler::Source::Rubygems.new("remotes" => ["https://third-rubygems.org"]),
205205
Bundler::Source::Rubygems.new("remotes" => ["https://fourth-rubygems.org"]),
206206
Bundler::Source::Rubygems.new("remotes" => ["https://fifth-rubygems.org"]),
207-
rubygems_aggregate,
207+
global_rubygems_source,
208208
metadata_source,
209209
]
210210
end
@@ -297,19 +297,19 @@
297297
end
298298

299299
describe "#rubygems_sources" do
300-
it "includes the aggregate rubygems source when rubygems sources have been added" do
300+
it "includes the global rubygems source when rubygems sources have been added" do
301301
source_list.add_git_source("uri" => "git://host/path.git")
302302
source_list.add_rubygems_source("remotes" => ["https://rubygems.org"])
303303
source_list.add_path_source("path" => "/path/to/gem")
304304

305-
expect(source_list.rubygems_sources).to include rubygems_aggregate
305+
expect(source_list.rubygems_sources).to include global_rubygems_source
306306
end
307307

308-
it "returns only the aggregate rubygems source when no rubygems sources have been added" do
308+
it "returns only the global rubygems source when no rubygems sources have been added" do
309309
source_list.add_git_source("uri" => "git://host/path.git")
310310
source_list.add_path_source("path" => "/path/to/gem")
311311

312-
expect(source_list.rubygems_sources).to eq [rubygems_aggregate]
312+
expect(source_list.rubygems_sources).to eq [global_rubygems_source]
313313
end
314314

315315
it "returns rubygems sources in the reverse order that they were added" do
@@ -331,7 +331,7 @@
331331
Bundler::Source::Rubygems.new("remotes" => ["https://third-rubygems.org"]),
332332
Bundler::Source::Rubygems.new("remotes" => ["https://fourth-rubygems.org"]),
333333
Bundler::Source::Rubygems.new("remotes" => ["https://fifth-rubygems.org"]),
334-
rubygems_aggregate,
334+
global_rubygems_source,
335335
]
336336
end
337337
end

0 commit comments

Comments
 (0)