class Aws::S3::Plugins::BucketDns
Amazon S3
requires DNS style addressing for buckets outside of the classic region when possible.
Public Class Methods
dns_compatible?(bucket_name, ssl)
click to toggle source
@param [String] bucket_name @param [Boolean] ssl @return [Boolean]
# File lib/aws-sdk-s3/plugins/bucket_dns.rb, line 68 def dns_compatible?(bucket_name, ssl) if valid_subdomain?(bucket_name) bucket_name.match(/\./) && ssl ? false : true else false end end
valid_subdomain?(bucket_name)
click to toggle source
@param [String] bucket_name @return [Boolean]
# File lib/aws-sdk-s3/plugins/bucket_dns.rb, line 78 def valid_subdomain?(bucket_name) bucket_name.size < 64 && bucket_name =~ /^[a-z0-9][a-z0-9.-]+[a-z0-9]$/ && bucket_name !~ /(\d+\.){3}\d+/ && bucket_name !~ /[.-]{2}/ end
Public Instance Methods
add_handlers(handlers, config)
click to toggle source
# File lib/aws-sdk-s3/plugins/bucket_dns.rb, line 26 def add_handlers(handlers, config) handlers.add(Handler) unless config.force_path_style end