Skip to content

Commit 287a196

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 8f11f23 commit 287a196

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
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

+21-1
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@
5252
it 'accepts --jobs option to set job size' do
5353
output = run 'appraisal install --jobs=2'
5454

55-
expect(output).to include
55+
expect(output).to include(
5656
'bundle install --gemfile=gemfiles/1.0.0.gemfile --jobs=2'
57+
)
5758
end
5859

5960
it 'ignores --jobs option if the job size is less than or equal to 1' do
@@ -67,4 +68,23 @@
6768
'bundle install --gemfile=gemfiles/1.0.0.gemfile --jobs=1')
6869
end
6970
end
71+
72+
context "with full-index", :parallel do
73+
before do
74+
build_appraisal_file <<-APPRAISAL
75+
appraise '1.0.0' do
76+
gem 'dummy', '1.0.0'
77+
end
78+
APPRAISAL
79+
end
80+
81+
it "accepts --full-index option to pull the full RubyGems index" do
82+
output = run("appraisal install --full-index")
83+
84+
expect(output).to include(
85+
"bundle install --gemfile='gemfiles/1.0.0.gemfile' " \
86+
"--retry 1 --full-index true",
87+
)
88+
end
89+
end
7090
end

0 commit comments

Comments
 (0)