This file contains hidden or 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
package com.lightbend.conductr.eslite | |
import javax.inject.Named | |
import akka.NotUsed | |
import akka.actor.ActorRef | |
import akka.pattern.ask | |
import com.fasterxml.jackson.databind.node.ObjectNode | |
import com.google.inject.Inject | |
import com.lightbend.conductr.eslite.dto._ |
This file contains hidden or 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
import scala.util.Try | |
type PreRelease = Either[String, Int] | |
object SemVer { | |
val pattern = """^(\d+)\.(\d+)\.(\d+)(-(([1-9a-zA-Z][0-9a-zA-Z-]*)(\.([1-9a-zA-Z][0-9a-zA-Z-]*))))?$""".r | |
def apply(s: String): SemVer = | |
s match { | |
case pattern(major, minor, patch, _, _, preRelease1, _, preRelease2) => |
This file contains hidden or 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
def render(project: Project.Value, path: String) = EssentialAction { rh => | |
val futureAction = project match { | |
case Project.ConductR => | |
conductrDocRenderer.actorRef | |
.ask(DocRenderer.Render(path))(settings.doc.renderer.timeout) | |
.map { | |
case html: Html => Action(Ok(html))(rh) | |
case action: Action[AnyContent] => action(rh) | |
case DocRenderer.NotFound(p) => Action(NotFound(s"Cannot find $p"))(rh) | |
case DocRenderer.NotReady => Action(ServiceUnavailable("Initializing documentation. Please try again in a minute."))(rh) |
This file contains hidden or 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
/** | |
* Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> | |
*/ | |
package akka.contrib.stream | |
import akka.actor.{ ActorRef, ActorRefFactory, FSM, Props } | |
import akka.pattern.ask | |
import akka.stream.actor.ActorSubscriberMessage.{ OnComplete, OnError, OnNext } | |
import akka.stream.actor.{ ActorSubscriber, RequestStrategy, ZeroRequestStrategy } |
This file contains hidden or 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
package com.typesafe.reactiveruntime.net | |
import akka.actor.{ActorRef, Actor} | |
import akka.http.Unmarshal | |
import akka.http.model.HttpMethods._ | |
import akka.http.model.{ HttpEntity, HttpRequest, HttpResponse, MultipartFormData, StatusCodes } | |
import akka.http.unmarshalling.Unmarshalling | |
import akka.pattern.ask | |
import akka.stream.scaladsl.{ ImplicitFlowMaterializer, Flow } | |
import akka.util.{ Timeout, ByteString } |
This file contains hidden or 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
package com.typesafe.reactiveruntime.resource | |
import akka.actor.{ActorRef, Props, Actor} | |
import akka.cluster.ClusterEvent.{MemberEvent, InitialStateAsEvents, MemberRemoved, MemberUp} | |
import akka.cluster.{Member, Cluster, UniqueAddress} | |
import akka.contrib.pattern.{DistributedPubSubMediator, DistributedPubSubExtension} | |
import com.typesafe.reactiveruntime.resource.ResourceProvider.Event.ResourceOffer | |
import com.typesafe.reactiveruntime.resource.ResourceProvider.RequestResources | |
import java.util.UUID | |
import scala.collection.immutable.HashSet |
This file contains hidden or 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
case class StartBundle(bundleName: String, bundleSource: ActorRef, configName: String, configSource: Option[ActorRef]) | |
This file contains hidden or 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
package com.typesafe.sbt.rr | |
import sbt._ | |
import Keys._ | |
import complete.DefaultParsers._ | |
import com.typesafe.sbt.SbtNativePackager._ | |
import NativePackagerKeys._ | |
import sbt.complete.Parser | |
object Import { |
This file contains hidden or 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
package com.typesafe.jse | |
import java.io.{IOException, OutputStream, InputStream} | |
import java.util.concurrent.locks.{Lock, ReentrantLock} | |
import java.util.concurrent.TimeUnit | |
import scala.concurrent.duration._ | |
/** | |
* Maintains a circular buffer where an output stream is used to push data into it, and an input stream is used to | |
* pull data from it. The caller is expected to *always* close the input and output streams. |
This file contains hidden or 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
(function(sbt) { | |
var playScala = require("playScala"); | |
var playKeys = playScala.keys; | |
return sbt.project.in(sbt.cwd) | |
.addPlugins(playScala); | |
.addSettings({ | |
"name": "test-jshint", | |
"version": "1.0-SNAPSHOT", |