I hereby claim:
- I am cacoco on github.
- I am cacoco (https://keybase.io/cacoco) on keybase.
- I have a public key ASAPB5sfRnetgJ-AzzBsVVrvIF3Hsiz_irbWcVOgkJsHigo
To claim this, I am signing this object:
import com.twitter.finagle.Http | |
import com.twitter.inject.server.{EmbeddedTwitterServer, FeatureTest} | |
import java.net.InetAddress | |
class MyTwitterServerFeatureTest extends FeatureTest { | |
override protected val server = | |
new EmbeddedTwitterServer(new MyTwitterServer) | |
lazy val client = |
import com.twitter.inject.server.{EmbeddedTwitterServer, FeatureTest} | |
class MyTwitterServerFeatureTest extends FeatureTest { | |
override protected val server = | |
new EmbeddedTwitterServer( | |
twitterServer = new MyTwitterServer, | |
flags = Map( | |
“dtab.add” -> “/$/inet=>/$/nil;/zk=>/$/nil”) | |
) | |
import com.twitter.inject.server.{EmbeddedTwitterServer, FeatureTest} | |
class MyTwitterServerFeatureTest extends FeatureTest { | |
override protected val server = | |
new EmbeddedTwitterServer(new MyTwitterServer) | |
override protected def beforeAll(): Unit = { | |
server.start() | |
} |
import com.twitter.inject.server.{EmbeddedTwitterServer, FeatureTest} | |
class MyTwitterServerFeatureTest extends FeatureTest { | |
override protected val server = | |
new EmbeddedTwitterServer(new MyTwitterServer) | |
test("MyTwitterServer#starts") { | |
server.isHealthy | |
} |
import com.twitter.finagle.{Http, ListeningServer, Service} | |
import com.twitter.finagle.http.{Status, Response, Request} | |
import com.twitter.server.TwitterServer | |
import com.twitter.util.{Await, Future} | |
class MyTwitterServer extends TwitterServer { | |
val defaultHttpPortValue: String = ":8888" | |
private val httpPortFlag = | |
flag("http.port", defaultHttpPortValue, "External HTTP server port") | |
private def responseString: String = "Hello, world!" |
function onOpen() { | |
var ui = DocumentApp.getUi(); | |
ui.createMenu('Convert to .RST') | |
.addItem('Convert to .RST and email me the result', 'ConvertToRestructuredText') | |
.addToUi(); | |
} | |
// Adopted from https://github.com/mangini/gdocs2md by Renato Mangini | |
// License: Apache License Version 2.0 | |
String.prototype.repeat = String.prototype.repeat || function(num) { |
I hereby claim:
To claim this, I am signing this object:
class SmallyController @Inject()( | |
@Flag("secure") secure: Boolean, | |
urlShortenerService: RedisUrlShortenerService, | |
response: ResponseBuilder) | |
extends Controller | |
with Logging { | |
post("/url") { request: PostUrlRequest => | |
val url = new URL(request.url) | |
val path = urlShortenerService.create(url) |
object SmallyServerMain extends SmallyServer | |
class SmallyServer extends HttpServer { | |
override def modules = Seq( | |
LogbackModule, | |
new JedisClientModule, | |
new SmallyModule) | |
override def configureHttp(router: HttpRouter) { | |
router. |
[Tue May 12 11:33:31 ccoco@horus finatra-hello-world (master)]$ ../../sbt clean test | |
downloading sbt-launch.jar from http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar | |
[info] Loading project definition from /Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/project | |
[info] Updating {file:/Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/project/}finatra-hello-world-build... | |
[info] Resolving org.fusesource.jansi#jansi;1.4 ... | |
[info] Done updating. | |
[info] Set current project to finatraHelloWorld (in build file:/Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/) | |
[success] Total time: 0 s, completed May 12, 2015 11:34:00 AM | |
[info] Updating {file:/Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/}finatraHelloWorld... | |
[info] Resolving jline#jline;2.12.1 ... |