Merge pull request #4738 from robkinyon/skip_default_sources
Added a --plugin-clean-sources parameter
This commit is contained in:
commit
946d2fe154
|
@ -1,6 +1,10 @@
|
|||
# OS-specific
|
||||
.DS_Store
|
||||
|
||||
# Editor swapfiles
|
||||
.*.sw?
|
||||
*~
|
||||
|
||||
# Vagrant stuff
|
||||
acceptance_config.yml
|
||||
boxes/*
|
||||
|
|
|
@ -178,11 +178,6 @@ module Vagrant
|
|||
|
||||
f = File.open(Tempfile.new("vagrant").path + "2", "w+")
|
||||
f.tap do |gemfile|
|
||||
if !sources.include?("http://rubygems.org")
|
||||
gemfile.puts(%Q[source "https://rubygems.org"])
|
||||
end
|
||||
|
||||
gemfile.puts(%Q[source "http://gems.hashicorp.com"])
|
||||
sources.each do |source|
|
||||
next if source == ""
|
||||
gemfile.puts(%Q[source "#{source}"])
|
||||
|
|
|
@ -3,6 +3,11 @@ module VagrantPlugins
|
|||
module Command
|
||||
module MixinInstallOpts
|
||||
def build_install_opts(o, options)
|
||||
options[:plugin_sources] = [
|
||||
"https://rubygems.org",
|
||||
"http://gems.hashicorp.com",
|
||||
]
|
||||
|
||||
o.on("--entry-point NAME", String,
|
||||
"The name of the entry point file for loading the plugin.") do |entry_point|
|
||||
options[:entry_point] = entry_point
|
||||
|
@ -17,9 +22,13 @@ module VagrantPlugins
|
|||
puts
|
||||
end
|
||||
|
||||
o.on("--plugin-clean-sources", String,
|
||||
"Remove all plugin sources defined so far (including defaults)") do
|
||||
options[:plugin_sources] = []
|
||||
end
|
||||
|
||||
o.on("--plugin-source PLUGIN_SOURCE", String,
|
||||
"Add a RubyGems repository source") do |plugin_source|
|
||||
options[:plugin_sources] ||= []
|
||||
options[:plugin_sources] << plugin_source
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue