s3_website 2.11.0 → 2.11.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/changelog.md +6 -0
- data/lib/s3_website/version.rb +1 -1
- data/src/main/scala/s3/website/model/push.scala +3 -3
- data/src/main/scala/s3/website/model/ssg.scala +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a112c263f78b49f6ef03c49c2bcbd1a87781153
|
4
|
+
data.tar.gz: 8358ef0acf575f7c06877725eabbc377673b3cc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5efa714adc8a6f6432f8791224b336dc763d3526d566e678c6f8d36add56777f5f0df097bfbe38189a622e1f4a69a107899b45a6014dc525ceec243095e25f1c
|
7
|
+
data.tar.gz: 06307dd8c0ef1dd324ca207f4d22eba8452a1101ccb16349e0c672d4ae344aa96d314775c6985bd49217aab2eb2d7b74a2d344df434ffc13193e605d1b5f794d
|
data/changelog.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
This project uses [Semantic Versioning](http://semver.org).
|
4
4
|
|
5
|
+
## 2.11.1
|
6
|
+
|
7
|
+
* Prevent runaway recursion in file listing
|
8
|
+
|
9
|
+
See <https://github.com/laurilehmijoki/s3_website/issues/181> for discussion
|
10
|
+
|
5
11
|
## 2.11.0
|
6
12
|
|
7
13
|
* Add the `s3_key_prefix` setting
|
data/lib/s3_website/version.rb
CHANGED
@@ -119,10 +119,10 @@ object Upload {
|
|
119
119
|
}
|
120
120
|
|
121
121
|
object Files {
|
122
|
-
def recursiveListFiles(f: File): Seq[File] = {
|
122
|
+
def recursiveListFiles(maxDepth: Int = Integer.MAX_VALUE)(f: File): Seq[File] = {
|
123
123
|
val these = f.listFiles
|
124
124
|
if (these != null)
|
125
|
-
these ++ these.filter(_.isDirectory).flatMap(recursiveListFiles)
|
125
|
+
these ++ these.filter(_.isDirectory).flatMap(recursiveListFiles(maxDepth - 1))
|
126
126
|
else
|
127
127
|
Nil
|
128
128
|
}
|
@@ -137,7 +137,7 @@ object Files {
|
|
137
137
|
if (doNotUpload) logger.debug(s"Excluded $s3Key from upload")
|
138
138
|
doNotUpload
|
139
139
|
}
|
140
|
-
recursiveListFiles(site.rootDirectory)
|
140
|
+
recursiveListFiles()(site.rootDirectory)
|
141
141
|
.filterNot(_.isDirectory)
|
142
142
|
.filterNot(f => excludeFromUpload(site.resolveS3Key(f)))
|
143
143
|
}
|
@@ -11,8 +11,10 @@ trait Ssg {
|
|
11
11
|
object Ssg {
|
12
12
|
val automaticallySupportedSiteGenerators = Jekyll :: Nanoc :: Nil
|
13
13
|
|
14
|
+
val maxAutodetectDepth = automaticallySupportedSiteGenerators.map(_.outputDirectory).map(_.split(File.separatorChar).length).max
|
15
|
+
|
14
16
|
def autodetectSiteDir(workingDirectory: File): Option[File] =
|
15
|
-
recursiveListFiles(workingDirectory).find { file =>
|
17
|
+
recursiveListFiles(maxAutodetectDepth)(workingDirectory).find { file =>
|
16
18
|
file.isDirectory && automaticallySupportedSiteGenerators.exists(ssg => file.getAbsolutePath.endsWith(ssg.outputDirectory))
|
17
19
|
}
|
18
20
|
}
|
@@ -22,5 +24,5 @@ case object Jekyll extends Ssg {
|
|
22
24
|
}
|
23
25
|
|
24
26
|
case object Nanoc extends Ssg {
|
25
|
-
def outputDirectory = "public
|
27
|
+
def outputDirectory = s"public${File.separatorChar}output"
|
26
28
|
}
|
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.11.
|
4
|
+
version: 2.11.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: 2015-
|
11
|
+
date: 2015-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|