configure-s3-website 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 57823af5f276b1d5990767f66c1d091c7e3aab2f
4
- data.tar.gz: 7b5328afc20f3d96a0c8519be1a7d1d984cd8e64
3
+ metadata.gz: 0dc0c1f7e9c8a9b4178d28e76269570104b4e00f
4
+ data.tar.gz: 2db14780b5dcb4e509f5ba5491dc1461c65286f2
5
5
  SHA512:
6
- metadata.gz: 267418558c77dc6705503ed76a8dfee2367918793ce82efcdd6963bba5e9958b36725927cabf0628b8a34bfa3387049bf472ca09a1dc07c743724d7ceba666c9
7
- data.tar.gz: c12bcb19386baf65c246833154046a6b56534a96cccb2cf907b89421654cfabe9c93c7228bf7b367d3af8f2eab4e49b4990fe17c63d861421bcd5151de4ecc53
6
+ metadata.gz: 75a40ffb42b7dc31696adfd11370adb4a9a3914abff39d4bf63ee8600cb397035d454bf456d73897768ddb384357dd6243d84fe32f39985ebd29f5c0a0ac2424
7
+ data.tar.gz: b371a1b9c539484c932e1d64631285ec88540e5a4ba03ebdb2c7692dfd9ec6d19305e95aa6cca78218ee145d5a9190b59bd768eb4b4a4d497daf78751f0e2923
@@ -2,6 +2,13 @@
2
2
 
3
3
  This project uses [Semantic Versioning](http://semver.org).
4
4
 
5
+ ## 1.5.1
6
+
7
+ * Use the S3 website domain as the Cloudfront origin
8
+
9
+ Replace `S3OriginConfig` with `CustomOriginConfig`. This solves the issue
10
+ https://github.com/laurilehmijoki/configure-s3-website/issues/6.
11
+
5
12
  ## 1.5.0
6
13
 
7
14
  * Add support for custom index and error documents
@@ -36,7 +36,7 @@ http_interactions:
36
36
  body:
37
37
  encoding: US-ASCII
38
38
  string: ''
39
- http_version:
39
+ http_version:
40
40
  recorded_at: Tue, 21 May 2013 12:19:28 GMT
41
41
  - request:
42
42
  method: put
@@ -72,7 +72,7 @@ http_interactions:
72
72
  body:
73
73
  encoding: US-ASCII
74
74
  string: ''
75
- http_version:
75
+ http_version:
76
76
  recorded_at: Tue, 21 May 2013 12:19:29 GMT
77
77
  - request:
78
78
  method: get
@@ -108,9 +108,9 @@ http_interactions:
108
108
  encoding: US-ASCII
109
109
  string: ! '<?xml version="1.0"?>
110
110
 
111
- <DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2012-07-01/"><CallerReference>1369126181889</CallerReference><Aliases><Quantity>0</Quantity></Aliases><DefaultRootObject>index.json</DefaultRootObject><Origins><Quantity>1</Quantity><Items><Origin><Id>website-via-cf-S3-origin</Id><DomainName>website-via-cf.s3.amazonaws.com</DomainName><S3OriginConfig><OriginAccessIdentity></OriginAccessIdentity></S3OriginConfig></Origin></Items></Origins><DefaultCacheBehavior><TargetOriginId>website-via-cf-S3-origin</TargetOriginId><ForwardedValues><QueryString>true</QueryString><Cookies><Forward>all</Forward></Cookies></ForwardedValues><TrustedSigners><Enabled>false</Enabled><Quantity>0</Quantity></TrustedSigners><ViewerProtocolPolicy>allow-all</ViewerProtocolPolicy><MinTTL>3600</MinTTL></DefaultCacheBehavior><CacheBehaviors><Quantity>0</Quantity></CacheBehaviors><Comment>Created
111
+ <DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2012-07-01/"><CallerReference>1369126181889</CallerReference><Aliases><Quantity>0</Quantity></Aliases><DefaultRootObject>index.json</DefaultRootObject><Origins><Quantity>1</Quantity><Items><Origin><Id>website-via-cf-S3-origin</Id><DomainName>website-via-cf.s3-website-us-east-1.amazonaws.com</DomainName><CustomOriginConfig> <HTTPPort>80</HTTPPort> <HTTPSPort>443</HTTPSPort> <OriginProtocolPolicy>match-viewer</OriginProtocolPolicy> </CustomOriginConfig></Origin></Items></Origins><DefaultCacheBehavior><TargetOriginId>website-via-cf-S3-origin</TargetOriginId><ForwardedValues><QueryString>true</QueryString><Cookies><Forward>all</Forward></Cookies></ForwardedValues><TrustedSigners><Enabled>false</Enabled><Quantity>0</Quantity></TrustedSigners><ViewerProtocolPolicy>allow-all</ViewerProtocolPolicy><MinTTL>3600</MinTTL></DefaultCacheBehavior><CacheBehaviors><Quantity>0</Quantity></CacheBehaviors><Comment>Created
112
112
  by the configure-s3-website gem</Comment><Logging><Enabled>false</Enabled><IncludeCookies>false</IncludeCookies><Bucket></Bucket><Prefix></Prefix></Logging><PriceClass>PriceClass_All</PriceClass><Enabled>true</Enabled></DistributionConfig>'
113
- http_version:
113
+ http_version:
114
114
  recorded_at: Tue, 21 May 2013 12:19:29 GMT
115
115
  - request:
116
116
  method: put
@@ -119,9 +119,12 @@ http_interactions:
119
119
  encoding: US-ASCII
120
120
  string: ! "\n <DistributionConfig xmlns=\"http://cloudfront.amazonaws.com/doc/2012-07-01/\">\n
121
121
  \ <Origins>\n <Quantity>1</Quantity>\n <Items>\n <Origin>\n
122
- \ <Id>website-via-cf-S3-origin</Id>\n <DomainName>website-via-cf.s3.amazonaws.com</DomainName>\n
123
- \ <S3OriginConfig>\n <OriginAccessIdentity></OriginAccessIdentity>\n
124
- \ </S3OriginConfig>\n </Origin>\n </Items>\n
122
+ \ <Id>website-via-cf-S3-origin</Id>\n <DomainName>website-via-cf.s3-website-us-east-1.amazonaws.com</DomainName>\n
123
+ \ <CustomOriginConfig>\n
124
+ \ <HTTPPort>80</HTTPPort>\n
125
+ \ <HTTPSPort>443</HTTPSPort>\n
126
+ \ <OriginProtocolPolicy>match-viewer</OriginProtocolPolicy>\n
127
+ \ </CustomOriginConfig>\n </Origin>\n </Items>\n
125
128
  \ </Origins>\n \n<CallerReference>1369126181889</CallerReference>\n<DefaultRootObject>index.json</DefaultRootObject>\n<Logging>\n
126
129
  \ <Enabled>false</Enabled>\n <IncludeCookies>false</IncludeCookies>\n <Bucket></Bucket>\n
127
130
  \ <Prefix></Prefix></Logging>\n<Enabled>true</Enabled>\n<Comment>Updated by
@@ -162,8 +165,8 @@ http_interactions:
162
165
  encoding: US-ASCII
163
166
  string: ! '<?xml version="1.0"?>
164
167
 
165
- <Distribution xmlns="http://cloudfront.amazonaws.com/doc/2012-07-01/"><Id>E13NX4HCPUP9BP</Id><Status>InProgress</Status><LastModifiedTime>2013-05-21T12:19:35.353Z</LastModifiedTime><InProgressInvalidationBatches>0</InProgressInvalidationBatches><DomainName>d2u7lu18vsudvw.cloudfront.net</DomainName><ActiveTrustedSigners><Enabled>false</Enabled><Quantity>0</Quantity></ActiveTrustedSigners><DistributionConfig><CallerReference>1369126181889</CallerReference><Aliases><Quantity>0</Quantity></Aliases><DefaultRootObject>index.json</DefaultRootObject><Origins><Quantity>1</Quantity><Items><Origin><Id>website-via-cf-S3-origin</Id><DomainName>website-via-cf.s3.amazonaws.com</DomainName><S3OriginConfig><OriginAccessIdentity></OriginAccessIdentity></S3OriginConfig></Origin></Items></Origins><DefaultCacheBehavior><TargetOriginId>website-via-cf-S3-origin</TargetOriginId><ForwardedValues><QueryString>true</QueryString><Cookies><Forward>all</Forward></Cookies></ForwardedValues><TrustedSigners><Enabled>false</Enabled><Quantity>0</Quantity></TrustedSigners><ViewerProtocolPolicy>allow-all</ViewerProtocolPolicy><MinTTL>3600</MinTTL></DefaultCacheBehavior><CacheBehaviors><Quantity>0</Quantity></CacheBehaviors><Comment>Updated
168
+ <Distribution xmlns="http://cloudfront.amazonaws.com/doc/2012-07-01/"><Id>E13NX4HCPUP9BP</Id><Status>InProgress</Status><LastModifiedTime>2013-05-21T12:19:35.353Z</LastModifiedTime><InProgressInvalidationBatches>0</InProgressInvalidationBatches><DomainName>d2u7lu18vsudvw.cloudfront.net</DomainName><ActiveTrustedSigners><Enabled>false</Enabled><Quantity>0</Quantity></ActiveTrustedSigners><DistributionConfig><CallerReference>1369126181889</CallerReference><Aliases><Quantity>0</Quantity></Aliases><DefaultRootObject>index.json</DefaultRootObject><Origins><Quantity>1</Quantity><Items><Origin><Id>website-via-cf-S3-origin</Id><DomainName>website-via-cf.s3-website-us-east-1.amazonaws.com</DomainName><CustomOriginConfig> <HTTPPort>80</HTTPPort> <HTTPSPort>443</HTTPSPort> <OriginProtocolPolicy>match-viewer</OriginProtocolPolicy> </CustomOriginConfig></Origin></Items></Origins><DefaultCacheBehavior><TargetOriginId>website-via-cf-S3-origin</TargetOriginId><ForwardedValues><QueryString>true</QueryString><Cookies><Forward>all</Forward></Cookies></ForwardedValues><TrustedSigners><Enabled>false</Enabled><Quantity>0</Quantity></TrustedSigners><ViewerProtocolPolicy>allow-all</ViewerProtocolPolicy><MinTTL>3600</MinTTL></DefaultCacheBehavior><CacheBehaviors><Quantity>0</Quantity></CacheBehaviors><Comment>Updated
166
169
  by the configure-s3-website gem</Comment><Logging><Enabled>false</Enabled><IncludeCookies>false</IncludeCookies><Bucket></Bucket><Prefix></Prefix></Logging><PriceClass>PriceClass_All</PriceClass><Enabled>true</Enabled></DistributionConfig></Distribution>'
167
- http_version:
170
+ http_version:
168
171
  recorded_at: Tue, 21 May 2013 12:19:30 GMT
169
172
  recorded_with: VCR 2.3.0
@@ -82,9 +82,12 @@ http_interactions:
82
82
  string: ! "\n <DistributionConfig xmlns=\"http://cloudfront.amazonaws.com/doc/2012-07-01/\">\n
83
83
  \ <Origins>\n <Quantity>1</Quantity>\n <Items>\n
84
84
  \ <Origin>\n <Id>website-via-cf-S3-origin</Id>\n
85
- \ <DomainName>website-via-cf.s3.amazonaws.com</DomainName>\n
86
- \ <S3OriginConfig>\n <OriginAccessIdentity></OriginAccessIdentity>\n
87
- \ </S3OriginConfig>\n </Origin>\n </Items>\n
85
+ \ <DomainName>website-via-cf.s3-website-us-east-1.amazonaws.com</DomainName>\n
86
+ \ <CustomOriginConfig>\n
87
+ \ <HTTPPort>80</HTTPPort>\n
88
+ \ <HTTPSPort>443</HTTPSPort>\n
89
+ \ <OriginProtocolPolicy>match-viewer</OriginProtocolPolicy>\n
90
+ \ </CustomOriginConfig>\n </Origin>\n </Items>\n
88
91
  \ </Origins>\n \n<CallerReference>configure-s3-website gem
89
92
  2013-05-18 23:07:56 +0300</CallerReference>\n<DefaultRootObject>index.html</DefaultRootObject>\n<Logging>\n
90
93
  \ <Enabled>false</Enabled>\n <IncludeCookies>false</IncludeCookies>\n <Bucket></Bucket>\n
@@ -127,7 +130,7 @@ http_interactions:
127
130
  string: ! '<?xml version="1.0"?>
128
131
 
129
132
  <Distribution xmlns="http://cloudfront.amazonaws.com/doc/2012-07-01/"><Id>E45H2VN49KPDU</Id><Status>InProgress</Status><LastModifiedTime>2013-05-18T20:08:00.350Z</LastModifiedTime><InProgressInvalidationBatches>0</InProgressInvalidationBatches><DomainName>d3feoe9t5ufu01.cloudfront.net</DomainName><ActiveTrustedSigners><Enabled>false</Enabled><Quantity>0</Quantity></ActiveTrustedSigners><DistributionConfig><CallerReference>configure-s3-website
130
- gem 2013-05-18 23:07:56 +0300</CallerReference><Aliases><Quantity>0</Quantity></Aliases><DefaultRootObject>index.html</DefaultRootObject><Origins><Quantity>1</Quantity><Items><Origin><Id>website-via-cf-S3-origin</Id><DomainName>website-via-cf.s3.amazonaws.com</DomainName><S3OriginConfig><OriginAccessIdentity></OriginAccessIdentity></S3OriginConfig></Origin></Items></Origins><DefaultCacheBehavior><TargetOriginId>website-via-cf-S3-origin</TargetOriginId><ForwardedValues><QueryString>true</QueryString><Cookies><Forward>all</Forward></Cookies></ForwardedValues><TrustedSigners><Enabled>false</Enabled><Quantity>0</Quantity></TrustedSigners><ViewerProtocolPolicy>allow-all</ViewerProtocolPolicy><MinTTL>86400</MinTTL></DefaultCacheBehavior><CacheBehaviors><Quantity>0</Quantity></CacheBehaviors><Comment>Created
133
+ gem 2013-05-18 23:07:56 +0300</CallerReference><Aliases><Quantity>0</Quantity></Aliases><DefaultRootObject>index.html</DefaultRootObject><Origins><Quantity>1</Quantity><Items><Origin><Id>website-via-cf-S3-origin</Id><DomainName>website-via-cf.s3-website-us-east-1.amazonaws.com</DomainName><CustomOriginConfig> <HTTPPort>80</HTTPPort> <HTTPSPort>443</HTTPSPort> <OriginProtocolPolicy>match-viewer</OriginProtocolPolicy> </CustomOriginConfig></Origin></Items></Origins><DefaultCacheBehavior><TargetOriginId>website-via-cf-S3-origin</TargetOriginId><ForwardedValues><QueryString>true</QueryString><Cookies><Forward>all</Forward></Cookies></ForwardedValues><TrustedSigners><Enabled>false</Enabled><Quantity>0</Quantity></TrustedSigners><ViewerProtocolPolicy>allow-all</ViewerProtocolPolicy><MinTTL>86400</MinTTL></DefaultCacheBehavior><CacheBehaviors><Quantity>0</Quantity></CacheBehaviors><Comment>Created
131
134
  by the configure-s3-website gem</Comment><Logging><Enabled>false</Enabled><IncludeCookies>false</IncludeCookies><Bucket></Bucket><Prefix></Prefix></Logging><PriceClass>PriceClass_All</PriceClass><Enabled>true</Enabled></DistributionConfig></Distribution>'
132
135
  http_version:
133
136
  recorded_at: Sat, 18 May 2013 20:07:57 GMT
@@ -12,7 +12,7 @@ Feature: Create a CloudFront distribution
12
12
  Bucket website-via-cf is now readable to the whole world
13
13
  No redirects to configure for website-via-cf bucket
14
14
  Do you want to deliver your website via CloudFront, the CDN of Amazon? [y/N]
15
- The distribution E45H2VN49KPDU at d3feoe9t5ufu01.cloudfront.net now delivers the bucket website-via-cf
15
+ The distribution E45H2VN49KPDU at d3feoe9t5ufu01.cloudfront.net now delivers the origin website-via-cf.s3-website-us-east-1.amazonaws.com
16
16
  Please allow up to 15 minutes for the distribution to initialise
17
17
  For more information on the distribution, see https://console.aws.amazon.com/cloudfront
18
18
  Added setting 'cloudfront_distribution_id: E45H2VN49KPDU' into features/support/sample_config_files/create_cf_dist.yml
@@ -32,7 +32,7 @@ Feature: Create a CloudFront distribution
32
32
  Bucket website-via-cf is now readable to the whole world
33
33
  No redirects to configure for website-via-cf bucket
34
34
  Do you want to deliver your website via CloudFront, the CDN of Amazon? [y/N]
35
- The distribution E45H2VN49KPDU at d3feoe9t5ufu01.cloudfront.net now delivers the bucket website-via-cf
35
+ The distribution E45H2VN49KPDU at d3feoe9t5ufu01.cloudfront.net now delivers the origin website-via-cf.s3-website-us-east-1.amazonaws.com
36
36
  Please allow up to 15 minutes for the distribution to initialise
37
37
  For more information on the distribution, see https://console.aws.amazon.com/cloudfront
38
38
  Added setting 'cloudfront_distribution_id: E45H2VN49KPDU' into features/support/sample_config_files/create_cf_dist_with_custom_configs.yml
@@ -57,7 +57,7 @@ Feature: Create a CloudFront distribution
57
57
  Bucket website-via-cf is now readable to the whole world
58
58
  No redirects to configure for website-via-cf bucket
59
59
  Do you want to deliver your website via CloudFront, the CDN of Amazon? [y/N]
60
- The distribution E45H2VN49KPDU at d3feoe9t5ufu01.cloudfront.net now delivers the bucket website-via-cf
60
+ The distribution E45H2VN49KPDU at d3feoe9t5ufu01.cloudfront.net now delivers the origin website-via-cf.s3-website-us-east-1.amazonaws.com
61
61
  Please allow up to 15 minutes for the distribution to initialise
62
62
  For more information on the distribution, see https://console.aws.amazon.com/cloudfront
63
63
  Below is the response from the CloudFront API:
@@ -108,11 +108,19 @@ Feature: Create a CloudFront distribution
108
108
  website-via-cf-S3-origin
109
109
  </Id>
110
110
  <DomainName>
111
- website-via-cf.s3.amazonaws.com
111
+ website-via-cf.s3-website-us-east-1.amazonaws.com
112
112
  </DomainName>
113
- <S3OriginConfig>
114
- <OriginAccessIdentity/>
115
- </S3OriginConfig>
113
+ <CustomOriginConfig>
114
+ <HTTPPort>
115
+ 80
116
+ </HTTPPort>
117
+ <HTTPSPort>
118
+ 443
119
+ </HTTPSPort>
120
+ <OriginProtocolPolicy>
121
+ match-viewer
122
+ </OriginProtocolPolicy>
123
+ </CustomOriginConfig>
116
124
  </Origin>
117
125
  </Items>
118
126
  </Origins>
@@ -64,7 +64,7 @@ module ConfigureS3Website
64
64
  ).body
65
65
  )
66
66
  dist_id = REXML::XPath.first(response_xml, '/Distribution/Id').get_text
67
- print_report_on_new_dist response_xml, dist_id, options
67
+ print_report_on_new_dist response_xml, dist_id, options, config_source
68
68
  config_source.cloudfront_distribution_id = dist_id.to_s
69
69
  puts " Added setting 'cloudfront_distribution_id: #{dist_id}' into #{config_source.description}"
70
70
  unless custom_distribution_config.empty?
@@ -81,10 +81,14 @@ module ConfigureS3Website
81
81
  gsub(/^/, padding(left_padding))
82
82
  end
83
83
 
84
- def self.print_report_on_new_dist(response_xml, dist_id, options)
84
+ def self.print_report_on_new_dist(response_xml, dist_id, options, config_source)
85
85
  config_source = options[:config_source]
86
- domain_name = REXML::XPath.first(response_xml, '/Distribution/DomainName').get_text
87
- puts " The distribution #{dist_id} at #{domain_name} now delivers the bucket #{config_source.s3_bucket_name}"
86
+ dist_domain_name = REXML::XPath.first(response_xml, '/Distribution/DomainName').get_text
87
+ s3_website_domain_name = REXML::XPath.first(
88
+ response_xml,
89
+ '/Distribution/DistributionConfig/Origins/Items/Origin/DomainName'
90
+ ).get_text
91
+ puts " The distribution #{dist_id} at #{dist_domain_name} now delivers the origin #{s3_website_domain_name}"
88
92
  puts ' Please allow up to 15 minutes for the distribution to initialise'
89
93
  puts ' For more information on the distribution, see https://console.aws.amazon.com/cloudfront'
90
94
  if options[:verbose]
@@ -102,6 +106,7 @@ module ConfigureS3Website
102
106
  end
103
107
 
104
108
  def self.distribution_config_xml(config_source, custom_cf_settings)
109
+ domain_name = "#{config_source.s3_bucket_name}.#{Endpoint.by_config_source(config_source).website_hostname}"
105
110
  %|
106
111
  <DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2012-07-01/">
107
112
  <Origins>
@@ -109,10 +114,12 @@ module ConfigureS3Website
109
114
  <Items>
110
115
  <Origin>
111
116
  <Id>#{origin_id config_source}</Id>
112
- <DomainName>#{config_source.s3_bucket_name}.#{Endpoint.by_config_source(config_source).hostname}</DomainName>
113
- <S3OriginConfig>
114
- <OriginAccessIdentity></OriginAccessIdentity>
115
- </S3OriginConfig>
117
+ <DomainName>#{domain_name}</DomainName>
118
+ <CustomOriginConfig>
119
+ <HTTPPort>80</HTTPPort>
120
+ <HTTPSPort>443</HTTPSPort>
121
+ <OriginProtocolPolicy>match-viewer</OriginProtocolPolicy>
122
+ </CustomOriginConfig>
116
123
  </Origin>
117
124
  </Items>
118
125
  </Origins>
@@ -130,27 +130,28 @@ private
130
130
 
131
131
  module ConfigureS3Website
132
132
  class Endpoint
133
- attr_reader :region, :location_constraint, :hostname
133
+ attr_reader :region, :location_constraint, :hostname, :website_hostname
134
134
 
135
135
  def initialize(location_constraint)
136
136
  raise InvalidS3LocationConstraintError unless
137
137
  location_constraints.has_key?location_constraint
138
138
  @region = location_constraints.fetch(location_constraint)[:region]
139
139
  @hostname = location_constraints.fetch(location_constraint)[:endpoint]
140
+ @website_hostname = location_constraints.fetch(location_constraint)[:website_endpoint]
140
141
  @location_constraint = location_constraint
141
142
  end
142
143
 
143
144
  # http://docs.amazonwebservices.com/general/latest/gr/rande.html#s3_region
144
145
  def location_constraints
145
146
  {
146
- '' => { :region => 'US Standard', :endpoint => 's3.amazonaws.com' },
147
- 'us-west-2' => { :region => 'US West (Oregon)', :endpoint => 's3-us-west-2.amazonaws.com' },
148
- 'us-west-1' => { :region => 'US West (Northern California)', :endpoint => 's3-us-west-1.amazonaws.com' },
149
- 'EU' => { :region => 'EU (Ireland)', :endpoint => 's3-eu-west-1.amazonaws.com' },
150
- 'ap-southeast-1' => { :region => 'Asia Pacific (Singapore)', :endpoint => 's3-ap-southeast-1.amazonaws.com' },
151
- 'ap-southeast-2' => { :region => 'Asia Pacific (Sydney)', :endpoint => 's3-ap-southeast-2.amazonaws.com' },
152
- 'ap-northeast-1' => { :region => 'Asia Pacific (Tokyo)', :endpoint => 's3-ap-northeast-1.amazonaws.com' },
153
- 'sa-east-1' => { :region => 'South America (Sao Paulo)', :endpoint => 's3-sa-east-1.amazonaws.com' }
147
+ '' => { :region => 'US Standard', :endpoint => 's3.amazonaws.com', :website_endpoint => 's3-website-us-east-1.amazonaws.com' },
148
+ 'us-west-2' => { :region => 'US West (Oregon)', :endpoint => 's3-us-west-2.amazonaws.com', :website_endpoint => 's3-website-us-west-2.amazonaws.com' },
149
+ 'us-west-1' => { :region => 'US West (Northern California)', :endpoint => 's3-us-west-1.amazonaws.com', :website_endpoint => 's3-website-us-west-1.amazonaws.com' },
150
+ 'EU' => { :region => 'EU (Ireland)', :endpoint => 's3-eu-west-1.amazonaws.com', :website_endpoint => 's3-website-eu-west-1.amazonaws.com' },
151
+ 'ap-southeast-1' => { :region => 'Asia Pacific (Singapore)', :endpoint => 's3-ap-southeast-1.amazonaws.com', :website_endpoint => 's3-website-ap-southeast-1.amazonaws.com' },
152
+ 'ap-southeast-2' => { :region => 'Asia Pacific (Sydney)', :endpoint => 's3-ap-southeast-2.amazonaws.com', :website_endpoint => 's3-website-ap-southeast-2.amazonaws.com' },
153
+ 'ap-northeast-1' => { :region => 'Asia Pacific (Tokyo)', :endpoint => 's3-ap-northeast-1.amazonaws.com', :website_endpoint => 's3-website-ap-northeast-1.amazonaws.com' },
154
+ 'sa-east-1' => { :region => 'South America (Sao Paulo)', :endpoint => 's3-sa-east-1.amazonaws.com', :website_endpoint => 's3-website-sa-east-1.amazonaws.com' }
154
155
  }
155
156
  end
156
157
 
@@ -1,3 +1,3 @@
1
1
  module ConfigureS3Website
2
- VERSION = '1.5.0'
2
+ VERSION = '1.5.1'
3
3
  end
@@ -60,11 +60,11 @@ describe ConfigureS3Website::CloudFrontClient do
60
60
  )
61
61
  }
62
62
 
63
- it 'honors the endpoint of the S3 bucket' do
63
+ it 'honors the endpoint of the S3 website' do
64
64
  REXML::XPath.first(
65
65
  distribution_config_xml,
66
66
  '/DistributionConfig/Origins/Items/Origin/DomainName'
67
- ).get_text.to_s.should eq('test-bucket.s3-us-west-1.amazonaws.com')
67
+ ).get_text.to_s.should eq('test-bucket.s3-website-us-west-1.amazonaws.com')
68
68
  end
69
69
  end
70
70
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configure-s3-website
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lauri Lehmijoki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-11 00:00:00.000000000 Z
11
+ date: 2013-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge