lib/berkshelf/locations/site_location.rb in berkshelf-1.4.6 vs lib/berkshelf/locations/site_location.rb in berkshelf-2.0.0.beta
- old
+ new
@@ -20,12 +20,10 @@
# be provided to initialize a SiteLocation pointing to the Opscode Community Site.
def initialize(name, version_constraint, options = {})
@name = name
@version_constraint = version_constraint
- api_uri = if options[:site].nil?
- SHORTNAMES[:opscode]
- elsif SHORTNAMES.has_key?(options[:site])
+ api_uri = if options[:site].nil? || SHORTNAMES.has_key?(options[:site])
SHORTNAMES[options[:site]]
elsif options[:site].kind_of?(Symbol)
raise InvalidSiteShortnameError.new(options[:site])
else
options[:site]