s3_website_monadic 0.0.7 → 0.0.8
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39f140d0639eb128178c9ec33176ea0f4a842904
|
4
|
+
data.tar.gz: 95e6aae697bf30b9134180521540948f49051b15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9779e122e2d5cef1d51e8e085e2ec41882d98f277b9bccabb9afeab065d8ecdc61380a0ac39fb7eb968d03a7d8d1631f45fbbb60c0e79a1264f9c1a65d1b9a60
|
7
|
+
data.tar.gz: 5f501c7f29b0b92d7949f465d965693e3a1ec7dd863dec2135eb7d667c67cbf9a3ed3cd11543e17d61c557af1a4f968fa49f08165fe2631707b0c0142b4eabbf
|
data/s3_website.gemspec
CHANGED
@@ -139,7 +139,7 @@ object Config {
|
|
139
139
|
unsafeYaml.yamlObject.asInstanceOf[java.util.Map[String, _]].toMap get key
|
140
140
|
}
|
141
141
|
|
142
|
-
def erbEval(erbString: String): Try[String] = Try {
|
142
|
+
def erbEval(erbString: String, yamlConfigPath: String): Try[String] = Try {
|
143
143
|
val erbStringWithoutComments = erbString.replaceAll("^\\s*#.*", "")
|
144
144
|
rubyRuntime.evalScriptlet(
|
145
145
|
s"""
|
@@ -151,6 +151,9 @@ object Config {
|
|
151
151
|
|ERB.new(str).result
|
152
152
|
""".stripMargin
|
153
153
|
).asJavaString()
|
154
|
+
} match {
|
155
|
+
case Failure(err) => Failure(new RuntimeException(s"Failed to parse ERB in $yamlConfigPath:\n${err.getMessage}"))
|
156
|
+
case x => x
|
154
157
|
}
|
155
158
|
|
156
159
|
case class UnsafeYaml(yamlObject: AnyRef)
|
@@ -20,7 +20,7 @@ object Site {
|
|
20
20
|
def loadSite(yamlConfigPath: String, siteRootDirectory: String): Either[ErrorReport, Site] = {
|
21
21
|
val yamlObjectTry = for {
|
22
22
|
yamlString <- Try(fromFile(new File(yamlConfigPath)).mkString)
|
23
|
-
yamlWithErbEvaluated <- erbEval(yamlString)
|
23
|
+
yamlWithErbEvaluated <- erbEval(yamlString, yamlConfigPath)
|
24
24
|
yamlObject <- Try(new Yaml() load yamlWithErbEvaluated)
|
25
25
|
} yield yamlObject
|
26
26
|
yamlObjectTry match {
|