Module: Gemvault::AddVaultSourceOption
- Defined in:
- lib/rubygems_plugin.rb
Overview
Skips the trailing-slash append for .gemv source URLs.
Instance Method Summary collapse
Instance Method Details
#add_source_option ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/rubygems_plugin.rb', line 49 def add_source_option accept_uri_http add_option(:"Local/Remote", "-s", "--source URL", Gem::URI::HTTP, "Append URL to list of remote gem sources") do |source, | source << "/" unless source.end_with?("/", ".gemv") if .delete :sources_cleared Gem.sources = [source] else Gem.sources << source unless Gem.sources.include?(source) end end end |