Skip to content

Commit

Permalink
(PUP-3277) Fix acceptance Gemfile logic for choosing gemsource
Browse files Browse the repository at this point in the history
Since there were no parentheses around the trinary, if GEM_SOURCE was
set, it would be immediately ||'d with OUTSIDE_PUPPETLABS, causing
rubygems.org to be selected as the path instead of GEM_SOURCE.  Broke
this bad logic up to make it explicit that GEM_SOURCE takes precedence,
and we only worry about a default if it is not set, then choosing
between two options based on whether the user has set the
OUTSIDE_PUPPETLABS flag.
  • Loading branch information
jpartlow committed Oct 1, 2014
1 parent c006dba commit 50829f4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions acceptance/Gemfile
@@ -1,7 +1,10 @@
gem_source = ENV['GEM_SOURCE'] ||
ENV['OUTSIDE_PUPPETLABS'] ?
'https://rubygems.org' :
'http://rubygems.delivery.puppetlabs.net'
gem_source = ENV['GEM_SOURCE']
if gem_source.nil? || gem_source.empty?
default = ENV['OUTSIDE_PUPPETLABS'] ?
'https://rubygems.org' :
'http://rubygems.delivery.puppetlabs.net'
gem_source = default
end
source gem_source

gem (ENV['BEAKER_GEM'] || "beaker"), "~> 1.17"
Expand Down

0 comments on commit 50829f4

Please sign in to comment.