Skip to content

Commit 6ddd583

Browse files
Merge pull request #8969 from rubygems/deivid-rodriguez/completely-remove-allow-offline-setting
Remove `allow_offline_install` setting
2 parents 04f051a + 5a27f0c commit 6ddd583

7 files changed

Lines changed: 2 additions & 14 deletions

File tree

bundler/lib/bundler/feature_flag.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def self.settings_method(name, key, &default)
2727

2828
(1..10).each {|v| define_method("bundler_#{v}_mode?") { @major_version >= v } }
2929

30-
settings_flag(:allow_offline_install) { bundler_4_mode? }
3130
settings_flag(:cache_all) { bundler_4_mode? }
3231
settings_flag(:global_gem_cache) { bundler_5_mode? }
3332
settings_flag(:lockfile_checksums) { bundler_4_mode? }

bundler/lib/bundler/fetcher/compact_index.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def client_fetcher
110110
def call(path, headers)
111111
fetcher.downloader.fetch(fetcher.fetch_uri + path, headers)
112112
rescue NetworkDownError => e
113-
raise unless Bundler.feature_flag.allow_offline_install? && headers["If-None-Match"]
113+
raise unless headers["If-None-Match"]
114114
ui.warn "Using the cached data for the new index because of a network error: #{e}"
115115
Gem::Net::HTTPNotModified.new(nil, nil, nil)
116116
end

bundler/lib/bundler/man/bundle-config.1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ Any periods in the configuration keys must be replaced with two underscores when
7070
.SH "LIST OF AVAILABLE KEYS"
7171
The following is a list of all configuration keys and their purpose\. You can learn more about their operation in bundle install(1) \fIbundle\-install\.1\.html\fR\.
7272
.TP
73-
\fBallow_offline_install\fR (\fBBUNDLE_ALLOW_OFFLINE_INSTALL\fR)
74-
Allow Bundler to use cached data when installing without network access\.
75-
.TP
7673
\fBauto_install\fR (\fBBUNDLE_AUTO_INSTALL\fR)
7774
Automatically run \fBbundle install\fR when gems are missing\.
7875
.TP

bundler/lib/bundler/man/bundle-config.1.ronn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ the environment variable `BUNDLE_LOCAL__RACK`.
106106
The following is a list of all configuration keys and their purpose. You can
107107
learn more about their operation in [bundle install(1)](bundle-install.1.html).
108108

109-
* `allow_offline_install` (`BUNDLE_ALLOW_OFFLINE_INSTALL`):
110-
Allow Bundler to use cached data when installing without network access.
111109
* `auto_install` (`BUNDLE_AUTO_INSTALL`):
112110
Automatically run `bundle install` when gems are missing.
113111
* `bin` (`BUNDLE_BIN`):

bundler/lib/bundler/settings.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ class Settings
77
autoload :Validator, File.expand_path("settings/validator", __dir__)
88

99
BOOL_KEYS = %w[
10-
allow_offline_install
1110
auto_install
1211
cache_all
1312
cache_all_platforms

bundler/lib/bundler/source/git.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ def git_proxy
416416
def fetch
417417
git_proxy.checkout
418418
rescue GitError => e
419-
raise unless Bundler.feature_flag.allow_offline_install?
420419
Bundler.ui.warn "Using cached git data because of network errors:\n#{e}"
421420
end
422421

bundler/spec/install/allow_offline_install_spec.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# frozen_string_literal: true
22

3-
RSpec.describe "bundle install with :allow_offline_install" do
4-
before do
5-
bundle "config set allow_offline_install true"
6-
end
7-
3+
RSpec.describe "bundle install allows offline install" do
84
context "with no cached data locally" do
95
it "still installs" do
106
install_gemfile <<-G, artifice: "compact_index"

0 commit comments

Comments
 (0)