s3_website 2.15.0 → 2.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -5
- data/build.sbt +1 -1
- data/changelog.md +4 -0
- data/lib/s3_website/version.rb +1 -1
- data/s3_website.gemspec +1 -1
- data/src/main/scala/s3/website/model/Config.scala +2 -6
- data/src/main/scala/s3/website/model/S3Endpoint.scala +32 -13
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74e389d709a1b22628c825ed08d0b10ed70a3203
|
4
|
+
data.tar.gz: 36fe9d03a05edd81fe46d640a658adab56190d82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7e14464bf2b8a3b3ea49f475dce49fc8642f5710a6c9e2b6bd07c4d7b2522854fd6e603c0c913fd2ad899804d11d638949fc2e56eb16556e88c80828bd69df7
|
7
|
+
data.tar.gz: 7b30125db36d4bbbca1443c2455e2f71a1d38205a7e1622963a334ca634d314212c41f9e072dd5a6e51677844385f5a3e6f0cd7714bc286c406d1b735d78c712
|
data/README.md
CHANGED
@@ -205,11 +205,6 @@ s3_endpoint: ap-northeast-1
|
|
205
205
|
The valid `s3_endpoint` values consist of the [S3 location constraint
|
206
206
|
values](http://docs.amazonwebservices.com/general/latest/gr/rande.html#s3_region).
|
207
207
|
|
208
|
-
Note that at the moment s3_website does not support any region that
|
209
|
-
supports only a V4 Signature and does not support V2
|
210
|
-
(i.e. *eu-central-1*, *ap-south-1*, *ap-northeast-2*).
|
211
|
-
This support can be tracked in [issue #126](https://github.com/laurilehmijoki/s3_website/issues/126).
|
212
|
-
|
213
208
|
### Ignoring files you want to keep on AWS
|
214
209
|
|
215
210
|
Sometimes there are files or directories you want to keep on S3, but not on
|
data/build.sbt
CHANGED
@@ -18,7 +18,7 @@ libraryDependencies += "org.yaml" % "snakeyaml" % "1.13"
|
|
18
18
|
|
19
19
|
libraryDependencies += "org.jruby" % "jruby" % "1.7.11"
|
20
20
|
|
21
|
-
libraryDependencies += "com.amazonaws" % "aws-java-sdk" % "1.
|
21
|
+
libraryDependencies += "com.amazonaws" % "aws-java-sdk" % "1.11.32"
|
22
22
|
|
23
23
|
libraryDependencies += "log4j" % "log4j" % "1.2.17"
|
24
24
|
|
data/changelog.md
CHANGED
data/lib/s3_website/version.rb
CHANGED
data/s3_website.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.default_executable = %q{s3_website}
|
19
19
|
|
20
20
|
s.add_dependency 'thor', '~> 0.18'
|
21
|
-
s.add_dependency 'configure-s3-website', '= 1.7.
|
21
|
+
s.add_dependency 'configure-s3-website', '= 1.7.5'
|
22
22
|
s.add_dependency 'colored', '1.2'
|
23
23
|
s.add_dependency 'dotenv', '~> 1.0'
|
24
24
|
|
@@ -131,12 +131,8 @@ object Config {
|
|
131
131
|
|
132
132
|
|
133
133
|
def loadEndpoint(implicit unsafeYaml: UnsafeYaml): Either[ErrorReport, Option[S3Endpoint]] =
|
134
|
-
loadOptionalString("s3_endpoint").right
|
135
|
-
endpointString.map(S3Endpoint
|
136
|
-
case Some(Right(endpoint)) => Right(Some(endpoint))
|
137
|
-
case Some(Left(endpointError)) => Left(endpointError)
|
138
|
-
case None => Right(None)
|
139
|
-
}
|
134
|
+
loadOptionalString("s3_endpoint").right map { endpointString =>
|
135
|
+
endpointString.map(S3Endpoint(_))
|
140
136
|
}
|
141
137
|
|
142
138
|
def loadRedirects(s3_key_prefix: Option[String])(implicit unsafeYaml: UnsafeYaml): Either[ErrorReport, Option[Map[S3Key, String]]] = {
|
@@ -1,24 +1,43 @@
|
|
1
1
|
package s3.website.model
|
2
2
|
|
3
|
-
import s3.website.ErrorReport
|
4
|
-
|
5
3
|
case class S3Endpoint(
|
6
4
|
s3WebsiteHostname: String,
|
7
5
|
s3Hostname: String
|
8
6
|
)
|
9
7
|
|
10
8
|
object S3Endpoint {
|
11
|
-
|
9
|
+
def defaultEndpoint = S3Endpoint("us-east-1")
|
10
|
+
|
11
|
+
val oldRegions = Seq(
|
12
|
+
"us-east-1",
|
13
|
+
"us-west-1",
|
14
|
+
"us-west-2",
|
15
|
+
"ap-southeast-1",
|
16
|
+
"ap-southeast-2",
|
17
|
+
"ap-northeast-1",
|
18
|
+
"eu-west-1",
|
19
|
+
"sa-east-1"
|
20
|
+
)
|
21
|
+
|
22
|
+
def apply(region: String): S3Endpoint = {
|
23
|
+
if (region == "EU") {
|
24
|
+
return S3Endpoint("eu-west-1")
|
25
|
+
}
|
26
|
+
|
27
|
+
val isOldRegion = oldRegions.contains(region)
|
28
|
+
val s3WebsiteHostname =
|
29
|
+
if (isOldRegion)
|
30
|
+
s"s3-website-$region.amazonaws.com"
|
31
|
+
else
|
32
|
+
s"s3-website.$region.amazonaws.com"
|
33
|
+
val s3Hostname =
|
34
|
+
if (region == "us-east-1")
|
35
|
+
"s3.amazonaws.com"
|
36
|
+
else if (isOldRegion)
|
37
|
+
s"s3-$region.amazonaws.com"
|
38
|
+
else
|
39
|
+
s"s3.$region.amazonaws.com"
|
12
40
|
|
13
|
-
|
14
|
-
case "EU" | "eu-west-1" => Right(S3Endpoint("s3-website-eu-west-1.amazonaws.com", "s3-eu-west-1.amazonaws.com"))
|
15
|
-
case "us-east-1" => Right(defaultEndpoint)
|
16
|
-
case "us-west-1" => Right(S3Endpoint("s3-website-us-west-1.amazonaws.com", "s3-us-west-1.amazonaws.com"))
|
17
|
-
case "us-west-2" => Right(S3Endpoint("s3-website-us-west-2.amazonaws.com", "s3-us-west-2.amazonaws.com"))
|
18
|
-
case "ap-southeast-1" => Right(S3Endpoint("s3-website-ap-southeast-1.amazonaws.com", "s3-ap-southeast-1.amazonaws.com"))
|
19
|
-
case "ap-southeast-2" => Right(S3Endpoint("s3-website-ap-southeast-2.amazonaws.com", "s3-ap-southeast-2.amazonaws.com"))
|
20
|
-
case "ap-northeast-1" => Right(S3Endpoint("s3-website-ap-northeast-1.amazonaws.com", "s3-ap-northeast-1.amazonaws.com"))
|
21
|
-
case "sa-east-1" => Right(S3Endpoint("s3-website-sa-east-1.amazonaws.com", "s3-sa-east-1.amazonaws.com"))
|
22
|
-
case _ => Left(ErrorReport(s"Unrecognised endpoint: $locationConstraint"))
|
41
|
+
S3Endpoint(s3WebsiteHostname = s3WebsiteHostname, s3Hostname = s3Hostname)
|
23
42
|
}
|
24
43
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3_website
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.15.
|
4
|
+
version: 2.15.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: 2016-
|
11
|
+
date: 2016-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.7.
|
33
|
+
version: 1.7.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.7.
|
40
|
+
version: 1.7.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: colored
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|