Skip to content

Commit 5445dee

Browse files
committed
Allow passing through of the full-index option.
Bundler provides an option to fetch the full RubyGems index. This is useful in the case of really old dependencies (like Rails 3 in 2018) which still work, but are not returned normally. This allows passing that through to `bundle install`.
1 parent 8382afa commit 5445dee

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

lib/appraisal/cli.rb

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ def self.exit_on_failure?
4646
method_option "without", :banner => "GROUP_NAMES",
4747
:desc => "A space-separated list of groups referencing gems to skip " +
4848
"during installation. Bundler will remember this option."
49+
method_option "full-index", :type => :boolean,
50+
:desc => "Run bundle install with the " \
51+
"full-index argument."
4952
def install
5053
invoke :generate, [], {}
5154

spec/acceptance/cli/install_spec.rb

+20-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@
6060
it 'ignores --jobs option if the job size is less than or equal to 1' do
6161
output = run 'appraisal install --jobs=0'
6262

63-
expect(output).
64-
to include(
63+
expect(output).to include(
6564
"bundle install --gemfile='#{file('gemfiles/1.0.0.gemfile')}'"
6665
)
6766
expect(output).not_to include(
@@ -72,4 +71,23 @@
7271
)
7372
end
7473
end
74+
75+
context "with full-index", :parallel do
76+
before do
77+
build_appraisal_file <<-APPRAISAL
78+
appraise '1.0.0' do
79+
gem 'dummy', '1.0.0'
80+
end
81+
APPRAISAL
82+
end
83+
84+
it "accepts --full-index option to pull the full RubyGems index" do
85+
output = run("appraisal install --full-index")
86+
87+
expect(output).to include(
88+
"bundle install --gemfile='#{file('gemfiles/1.0.0.gemfile')}' " \
89+
"--retry 1 --full-index true"
90+
)
91+
end
92+
end
7593
end

0 commit comments

Comments
 (0)