Sha256: 24f2f59a709a3e8026225992d2eb4adbc0c9faca6cf1a47a2d91adf81ef98970

Contents?: true

Size: 502 Bytes

Versions: 9

Compression:

Stored size: 502 Bytes

Contents

module ConfigureS3Website
  class EndpointHelper
    def self.s3_website_hostname(region)
      if old_regions.include?(region)
        "s3-website-#{region}.amazonaws.com"
      else
        "s3-website.#{region}.amazonaws.com"
      end
    end

    private

    def self.old_regions
      [
        'us-east-1',
        'us-west-1',
        'us-west-2',
        'ap-southeast-1',
        'ap-southeast-2',
        'ap-northeast-1',
        'eu-west-1',
        'sa-east-1'
      ]
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
configure-s3-website-ng-3.0.0 lib/configure-s3-website/endpoint_helper.rb
configure-s3-website-2.3.0 lib/configure-s3-website/endpoint_helper.rb
configure-s3-website-2.2.0 lib/configure-s3-website/endpoint_helper.rb
configure-s3-website-2.1.0 lib/configure-s3-website/endpoint_helper.rb
configure-s3-website-2.0.0 lib/configure-s3-website/endpoint_helper.rb
configure-s3-website-2.0.0.pre.RC2 lib/configure-s3-website/endpoint_helper.rb
configure-s3-website-2.0.0.pre.RC1 lib/configure-s3-website/endpoint_helper.rb
configure-s3-website-1.7.5 lib/configure-s3-website/endpoint_helper.rb
configure-s3-website-1.7.4 lib/configure-s3-website/endpoint_helper.rb