Skip to content

Commit

Permalink
PR sous-chefs#67 - Add skip_if_unvailable repository option
Browse files Browse the repository at this point in the history
Signed-off-by: Sean OMeara <[email protected]>
  • Loading branch information
Douglas Mendizabal authored and Sean OMeara committed Feb 12, 2014
1 parent 0f13b33 commit b51d060
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
attribute :proxy_password, :kind_of => String, :regex => /.*/, :default => nil
attribute :report_instanceid, :kind_of => [TrueClass, FalseClass], :default => nil
attribute :repositoryid, :kind_of => String, :regex => /.*/, :name_attribute => true
attribute :skip_if_unavailable, :kind_of => [TrueClass, FalseClass], :default => nil
attribute :sslcacert, :kind_of => String, :regex => /.*/, :default => nil
attribute :sslclientcert, :kind_of => String, :regex => /.*/, :default => nil
attribute :sslclientkey, :kind_of => String, :regex => /.*/, :default => nil
Expand Down
1 change: 1 addition & 0 deletions spec/unit/test_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
proxy_username=kermit
proxy_password=dafrog
retries=10
skip_if_unavailable=1
sslcacert=/path/to/directory
sslclientcert=/path/to/client/cert
sslclientkey=/path/to/client/key
Expand Down
3 changes: 3 additions & 0 deletions templates/default/repo.erb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ retries=<%= @config.max_retries %>
<% if @config.report_instanceid %>
report_instanceid=<%= @config.report_instanceid %>
<% end %>
<% if @config.skip_if_unavailable %>
skip_if_unavailable=1
<% end %>
<% if @config.sslcacert %>
sslcacert=<%= @config.sslcacert %>
<% end %>
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/cookbooks/yum_test/recipes/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
proxy_password 'dafrog'
report_instanceid false
repositoryid 'unit-test-2'
skip_if_unavailable true
sslcacert '/path/to/directory'
sslclientcert '/path/to/client/cert'
sslclientkey '/path/to/client/key'
Expand Down

0 comments on commit b51d060

Please sign in to comment.