Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
78 additions
and
128 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Application Conf | ||
|
||
Demonstrates how to use custom mappings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// The Typesafe repository | ||
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" | ||
|
||
addSbtPlugin("com.typesafe.sbt" %% "sbt-native-packager" % "1.0.1") | ||
addSbtPlugin("com.typesafe.sbt" %% "sbt-native-packager" % "1.0.4") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.example | ||
|
||
import collection.mutable.Stack | ||
import org.scalatest._ | ||
|
||
class ExampleSpec extends FlatSpec with Matchers { | ||
|
||
"A Stack" should "pop values in last-in-first-out order" in { | ||
val stack = new Stack[Int] | ||
stack.push(1) | ||
stack.push(2) | ||
stack.pop() should be (2) | ||
stack.pop() should be (1) | ||
} | ||
|
||
it should "throw NoSuchElementException if an empty stack is popped" in { | ||
val emptyStack = new Stack[Int] | ||
a [NoSuchElementException] should be thrownBy { | ||
emptyStack.pop() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=0.13.5 | ||
sbt.version=0.13.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// The Typesafe repository | ||
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" | ||
|
||
addSbtPlugin("com.typesafe.sbt" %% "sbt-native-packager" % "0.8.0-M1") | ||
addSbtPlugin("com.typesafe.sbt" %% "sbt-native-packager" % "1.0.4") | ||
|
||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2") | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,5 @@ | ||
package de.mukis | ||
|
||
import com.typesafe.config.ConfigFactory | ||
import java.util.concurrent.Executors | ||
import java.util.concurrent.TimeUnit | ||
import java.nio.file.Files | ||
import java.nio.charset.Charset | ||
|
||
object ConfigApp extends App { | ||
|
||
val logFile = Files.createTempFile("mukis-", ".log") | ||
|
||
// Creating an executor service to schedule the config parsing | ||
val service = Executors newScheduledThreadPool 1 | ||
service.scheduleAtFixedRate(new Runnable() { | ||
override def run() { | ||
// Loading config | ||
ConfigFactory.invalidateCaches | ||
val config = ConfigFactory load () getConfig ("mukis") | ||
|
||
// Writing the config content to the logfile | ||
val log = Files.newBufferedWriter(logFile, Charset forName "UTF-8") | ||
log write (s"User:\t${config.root render ()}") | ||
log.newLine | ||
log.close | ||
} | ||
}, 0, 5, TimeUnit.SECONDS) | ||
} | ||
object HelloWorldApp extends App { | ||
println("Hello, World!") | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
enablePlugins( | ||
JavaServerAppPackaging, | ||
SbtWeb | ||
) | ||
|
||
name := "mukis-akka-server-app" | ||
version := "1.0" | ||
|
||
val akkaVersion = "2.3.9" | ||
|
||
libraryDependencies ++= Seq( | ||
"com.typesafe.akka" %% "akka-actor" % akkaVersion | ||
) | ||
|
||
mainClass in Compile := Some("de.mukis.AkkaServerApp") | ||
|
||
maintainer := "Nepomuk Seiler <nepomuk.seiler@mukis.de>" | ||
packageSummary := "Custom application configuration" | ||
packageDescription := "Custom application configuration" | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// The Typesafe repository | ||
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" | ||
resolvers += Resolver.url("GitHub repository", url("http://shaggyyeti.github.io/releases"))(Resolver.ivyStylePatterns) | ||
|
||
// SBT web | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-web" % "1.2.1") | ||
addSbtPlugin("default" % "sbt-sass" % "0.1.9") | ||
|
||
addSbtPlugin("com.typesafe.sbt" %% "sbt-native-packager" % "1.0.2") | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.