Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge latest from appoxy repo

  • Loading branch information...
commit 28e0d8b006196e234426bba8d54d9e48737f72d5 1 parent f27c470
Rob Kischuk authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/acf/right_acf_interface.rb
View
5 lib/acf/right_acf_interface.rb
@@ -216,14 +216,12 @@ def list_streaming_distributions
# :caller_reference => "200809102100536497863003"}
#
def create_distribution(origin, comment='', enabled=true, cnames=[], caller_reference=nil)
- caller_reference ||= generate_call_reference
body = distribution_config_for(origin, comment, enabled, cnames, caller_reference, false)
request_hash = generate_request('POST', 'distribution', body.strip)
merge_headers(request_info(request_hash, AcfDistributionParser.new))
end
def create_streaming_distribution(origin, comment='', enabled=true, cnames=[], caller_reference=nil)
- caller_reference ||= generate_call_reference
body = distribution_config_for(origin, comment, enabled, cnames, caller_reference, true)
request_hash = generate_request('POST', 'streaming-distribution', body.strip)
merge_headers(request_info(request_hash, AcfDistributionParser.new))
@@ -236,6 +234,8 @@ def distribution_config_for(origin, comment='', enabled=true, cnames=[], caller_
unless cnames.blank?
cnames.to_a.each { |cname| cnames_str += "\n <CNAME>#{cname}</CNAME>" }
end
+ caller_reference ||= generate_call_reference
+ root_ob = config[:default_root_object] ? "<DefaultRootObject>#{config[:default_root_object]}</DefaultRootObject>" : ""
body = <<-EOXML
<?xml version="1.0" encoding="UTF-8"?>
<#{rootElement} xmlns=#{xmlns}>
@@ -244,6 +244,7 @@ def distribution_config_for(origin, comment='', enabled=true, cnames=[], caller_
#{cnames_str.lstrip}
<Comment>#{AcfInterface::escape(comment.to_s)}</Comment>
<Enabled>#{enabled}</Enabled>
+ #{root_ob}
</#{rootElement}>
EOXML
end
Please sign in to comment.
Something went wrong with that request. Please try again.