<commit_before>name := "constructr-cassandra"

libraryDependencies ++= List(
  Library.akkaActor,
  Library.akkaSlf4j,
  Library.cassandraAll % "provided",
  Library.akkaTestkit  % "test",
  Library.scalaTest    % "test"
)

initialCommands := """|import de.heikoseeberger.constructr.cassandra._""".stripMargin

publishArtifact := false

assemblyMergeStrategy.in(assembly) := {
  case "LICENSE" => MergeStrategy.concat
  case other     => assemblyMergeStrategy.in(assembly).value(other)
}

docker                := docker.dependsOn(assembly).value
imageNames.in(docker) := List(ImageName(s"constructr/cassandra-${Version.Cassandra}:${version.in(docker).value}"))
dockerfile.in(docker) := {
  val fatJar = assemblyOutputPath.in(assembly).value
  val fatJarTargetPath = s"/${fatJar.name}"
  new Dockerfile {
    from(s"hseeberger/cassandra:${Version.Cassandra}")
    add(fatJar, fatJarTargetPath)
    env(
      "CASSANDRA_SEED_PROVIDER" -> "de.heikoseeberger.constructr.cassandra.ConstructrSeedProvider",
      "CLASSPATH" -> fatJarTargetPath
    )
  }
}<commit_msg>Use official cassandra image (closes #57)<commit_after>name := "constructr-cassandra"

libraryDependencies ++= List(
  Library.akkaActor,
  Library.akkaSlf4j,
  Library.cassandraAll % "provided",
  Library.akkaTestkit  % "test",
  Library.scalaTest    % "test"
)

initialCommands := """|import de.heikoseeberger.constructr.cassandra._""".stripMargin

publishArtifact := false

assemblyMergeStrategy.in(assembly) := {
  case "LICENSE" => MergeStrategy.concat
  case other     => assemblyMergeStrategy.in(assembly).value(other)
}

docker                := docker.dependsOn(assembly).value
imageNames.in(docker) := List(ImageName(s"constructr/cassandra-${Version.Cassandra}:${version.in(docker).value}"))
dockerfile.in(docker) := {
  val fatJar = assemblyOutputPath.in(assembly).value
  val fatJarTargetPath = s"/${fatJar.name}"
  new Dockerfile {
    from(s"cassandra:${Version.Cassandra}")
    copy(fatJar, fatJarTargetPath)
    env("CLASSPATH" -> fatJarTargetPath)
    run("/bin/bash",
        "-c",
        """|head -n 28 docker-entrypoint.sh > d && \
           |echo $'\t'sed -ri \'s/\(- class_name:\) org.apache.cassandra.locator.SimpleSeedProvider/\\1 de.heikoseeberger.constructr.cassandra.ConstructrSeedProvider/\' \"$CASSANDRA_CONFIG/cassandra.yaml\" >> d && \
           |tail -n +30 docker-entrypoint.sh >> d && \
           |chmod --reference docker-entrypoint.sh d && \
           |mv d docker-entrypoint.sh""".stripMargin
      )
  }
}
{'fraction_non_alphanumeric': 0.15087579617834396, 'fraction_numerical': 0.0035828025477707007, 'mean_word_length': 4.036072144288577, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3602895', 'n_tokens_mistral': 889, 'n_tokens_neox': 856, 'n_words': 120}