This repository has been archived by the owner on Sep 18, 2021. It is now read-only.
forked from fizx/scala-bootstrapper
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to use scrooge, and more recent versions of all libs
- Loading branch information
Robey Pointer
committed
Nov 17, 2011
1 parent
766b9b3
commit 3c93e21
Showing
8 changed files
with
41 additions
and
28 deletions.
There are no files selected for viewing
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
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
8 changes: 6 additions & 2 deletions
8
lib/template/src/main/scala/com/twitter/birdname/Main.scala.erb
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,12 +1,16 @@ | ||
package com.twitter.birdname | ||
|
||
import com.twitter.logging.Logger | ||
import com.twitter.ostrich.admin.RuntimeEnvironment | ||
import thrift._ | ||
|
||
object Main { | ||
private val log = Logger.get(getClass) | ||
|
||
def main(args: Array[String]) { | ||
val env = RuntimeEnvironment(this, args) | ||
val service = env.loadRuntimeConfig[BirdNameServiceServer] | ||
val service = env.loadRuntimeConfig[BirdNameService.ThriftServer]() | ||
service.start() | ||
log.info("BirdName %s started.", env.jarVersion) | ||
} | ||
} | ||
|
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
10 changes: 6 additions & 4 deletions
10
lib/template/src/test/scala/com/twitter/birdname/AbstractSpec.scala.erb
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,18 +1,20 @@ | ||
package com.twitter.birdname | ||
|
||
import org.specs.Specification | ||
import com.twitter.conversions.time._ | ||
import com.twitter.ostrich.admin._ | ||
import com.twitter.util._ | ||
import com.twitter.conversions.time._ | ||
import org.specs.Specification | ||
import thrift._ | ||
|
||
abstract class AbstractSpec extends Specification { | ||
val env = RuntimeEnvironment(this, Array("-f", "config/test.scala")) | ||
|
||
lazy val birdName = { | ||
val out = env.loadRuntimeConfig[BirdNameService] | ||
val out = env.loadRuntimeConfig[BirdNameService.ThriftServer] | ||
|
||
// You don't really want the thrift server active, particularly if you | ||
// are running repetitively via ~test | ||
ServiceTracker.shutdown // all services | ||
ServiceTracker.shutdown() // all services | ||
out | ||
} | ||
} |
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