Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PUP-2271) Allow yumrepo proxy attribute to be set to _none_ #2767

Merged
merged 1 commit into from Jun 18, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/puppet/type/yumrepo.rb
Expand Up @@ -277,7 +277,7 @@

newvalues(/.*/, :absent)
validate do |value|
next if value.to_s == 'absent'
next if value.to_s =~ /^(absent|_none_)$/
parsed = URI.parse(value)

unless VALID_SCHEMES.include?(parsed.scheme)
Expand Down
6 changes: 6 additions & 0 deletions spec/unit/type/yumrepo_spec.rb 100644 → 100755
Expand Up @@ -295,6 +295,12 @@

describe "proxy" do
it_behaves_like "a yumrepo parameter that can be absent", :proxy
it "accepts _none_" do
described_class.new(
:name => 'puppetlabs',
:proxy => "_none_"
)
end
it_behaves_like "a yumrepo parameter that accepts a single URL", :proxy
end

Expand Down