diff options
| author | Colby Swandale <me@colby.fyi> | 2018-11-22 15:43:23 +1100 |
|---|---|---|
| committer | Colby Swandale <me@colby.fyi> | 2018-11-25 07:56:11 +1100 |
| commit | 93471b02962380f46271b832b5344760e532131d (patch) | |
| tree | 9869089eabd58de2616cb8650da7080c789f62fe /lib/bundler | |
| parent | f160d15fe4e1cb25fad6a34ed9abd10b21f587f8 (diff) | |
| download | bundler-colby/git-https-default.tar.gz | |
add feature flag to use https for :git in the dslcolby/git-https-default
Diffstat (limited to 'lib/bundler')
| -rw-r--r-- | lib/bundler/dsl.rb | 2 | ||||
| -rw-r--r-- | lib/bundler/feature_flag.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 80d208e463..6707fc5893 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -305,7 +305,7 @@ module Bundler # end repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") # TODO: 2.0 upgrade this setting to the default - if Bundler.settings["github.https"] + if Bundler.feature_flag.github_https? Bundler::SharedHelpers.major_deprecation 2, "The `github.https` setting will be removed" "https://github.com/#{repo_name}.git" else diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb index 83e7ff0389..249170c4b2 100644 --- a/lib/bundler/feature_flag.rb +++ b/lib/bundler/feature_flag.rb @@ -60,6 +60,8 @@ module Bundler settings_option(:default_cli_command) { bundler_2_mode? ? :cli_help : :install } + settings_method(:github_https?, "github.https") { bundler_2_mode? } + def initialize(bundler_version) @bundler_version = Gem::Version.create(bundler_version) end |
