src/main/scala/s3/website/package.scala in s3_website-2.4.0 vs src/main/scala/s3/website/package.scala in s3_website-2.5.0
- old
+ new
@@ -38,23 +38,31 @@
trait RetrySetting {
def retryTimeUnit: TimeUnit
}
- trait PushMode {
+ trait PushOptions {
+ /**
+ * @return true if the CLI option --dry-run is on
+ */
def dryRun: Boolean
+
+ /**
+ * @return true if the CLI option --force is on
+ */
+ def force: Boolean
}
type S3Key = String
type UploadDuration = Long
trait PushAction {
def actionName = getClass.getSimpleName.replace("$", "") // case object class names contain the '$' char
- def renderVerb(implicit pushMode: PushMode): String =
- if (pushMode.dryRun)
+ def renderVerb(implicit pushOptions: PushOptions): String =
+ if (pushOptions.dryRun)
s"Would have ${actionName.toLowerCase}"
else
s"$actionName"
}
case object Created extends PushAction
@@ -63,18 +71,18 @@
case object Deleted extends PushAction
case object Transferred extends PushAction
case object Invalidated extends PushAction
case object Applied extends PushAction
case object PushNothing extends PushAction {
- override def renderVerb(implicit pushMode: PushMode) =
- if (pushMode.dryRun)
+ override def renderVerb(implicit pushOptions: PushOptions) =
+ if (pushOptions.dryRun)
s"Would have pushed nothing"
else
s"There was nothing to push"
}
case object Deploy extends PushAction {
- override def renderVerb(implicit pushMode: PushMode) =
- if (pushMode.dryRun)
+ override def renderVerb(implicit pushOptions: PushOptions) =
+ if (pushOptions.dryRun)
s"Simulating the deployment of"
else
s"Deploying"
}