Skip to content

Commit

Permalink
Merge 5af088f into 3b4a578
Browse files Browse the repository at this point in the history
  • Loading branch information
lustefaniak committed Jun 22, 2017
2 parents 3b4a578 + 5af088f commit 8c1f09e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -8,6 +8,6 @@ before_script:
- tar -xvf protobuf-2.6.1.tar.gz
- cd protobuf-2.6.1 && ./configure && make && sudo make install && sudo ldconfig && cd ..
script:
- sbt clean buffered-config-test:test invalid-config-test:test coverage test coverageReport && sbt coverageAggregate
- sbt clean +buffered-config-test:test +invalid-config-test:test coverage +test +coverageReport && sbt coverageAggregate
after_success:
- sbt coveralls
17 changes: 12 additions & 5 deletions build.sbt
Expand Up @@ -4,14 +4,15 @@ import sbtprotobuf.ProtobufPlugin
val akkaVersion = "2.4.16"
val akkaHttpVersion = "10.0.1"
val sprayVersion = "1.3.4"
val kamonVersion = "0.6.3"
val kamonVersion = "0.6.7"

lazy val commonSettings = Seq(
homepage := Some(url("https://monsantoco.github.io/kamon-prometheus")),
organization := "com.monsanto.arch",
organizationHomepage := Some(url("http://engineering.monsanto.org")),
licenses := Seq("BSD New" url("http://opensource.org/licenses/BSD-3-Clause")),
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.11.8", "2.12.2"),
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
Expand Down Expand Up @@ -71,7 +72,6 @@ lazy val library = (project in file("library"))
description := "Kamon module to export metrics to Prometheus",
libraryDependencies ++= Seq(
"io.kamon" %% "kamon-core" % kamonVersion,
"io.spray" %% "spray-routing" % sprayVersion % "provided",
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion % "provided",
"com.typesafe" % "config" % "1.3.1",
Expand All @@ -82,10 +82,15 @@ lazy val library = (project in file("library"))
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion % testConfigs,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
"org.scalatest" %% "scalatest" % "3.0.1" % testConfigs,
"io.kamon" %% "kamon-akka" % kamonVersion % "test",
"io.spray" %% "spray-testkit" % sprayVersion % "test",
"io.kamon" %% "kamon-akka-2.4" % kamonVersion % "test",
"org.scalacheck" %% "scalacheck" % "1.13.4" % "test"
),
libraryDependencies ++= {
if (scalaBinaryVersion.value == "2.11") Seq(
"io.spray" %% "spray-routing" % sprayVersion % "provided",
"io.spray" %% "spray-testkit" % sprayVersion % "test"
) else Seq.empty
},
dependencyOverrides ++= Set(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"org.scala-lang" % "scala-library" % scalaVersion.value,
Expand All @@ -105,13 +110,14 @@ lazy val demo = (project in file("demo"))
.enablePlugins(DockerPlugin)
.settings(
commonSettings,
crossScalaVersions := Seq("2.11.8"),
aspectjSettings,
noPublishing,
name := "kamon-prometheus-demo",
description := "Docker image containing a demonstration of kamon-prometheus in action.",
libraryDependencies ++= Seq(
"io.kamon" %% "kamon-spray" % kamonVersion,
"io.kamon" %% "kamon-system-metrics" % kamonVersion,
"io.kamon" %% "kamon-spray" % kamonVersion,
"io.spray" %% "spray-can" % sprayVersion,
"com.monsanto.arch" %% "spray-kamon-metrics" % "0.1.3"
),
Expand Down Expand Up @@ -191,6 +197,7 @@ lazy val ghPagesSettings =
)

lazy val `kamon-prometheus` = (project in file("."))
.enablePlugins(CrossPerProjectPlugin)
.disablePlugins(sbtassembly.AssemblyPlugin)
.aggregate(library, demo)
.settings(
Expand Down
Expand Up @@ -3,7 +3,7 @@ package com.monsanto.arch.kamon.prometheus
import com.typesafe.config.{Config, ConfigFactory}
import kamon.util.ConfigTools.Syntax

import scala.collection.JavaConversions
import scala.collection.JavaConverters._
import scala.concurrent.duration.FiniteDuration

/** A settings object used for configuring how the extension should behave.
Expand All @@ -22,11 +22,10 @@ class PrometheusSettings(config: Config) {

/** The subscriptions that determine which metrics the extension will publish to Prometheus. */
val subscriptions: Map[String, List[String]] = {
import JavaConversions.asScalaBuffer

val subs: Config = prometheusConfig.getConfig("subscriptions")
subs.firstLevelKeys.map { category
category subs.getStringList(category).toList
category subs.getStringList(category).asScala.toList
}.toMap
}

Expand Down
6 changes: 4 additions & 2 deletions project/plugins.sbt
Expand Up @@ -4,11 +4,11 @@ addSbtPlugin("io.spray" % "sbt-revolver" % "0.8.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-aspectj" % "0.10.6")

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3" exclude("org.apache.maven", "maven-plugin-api"))

addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.4.0")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.5")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")

addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")

Expand All @@ -22,6 +22,8 @@ addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.1.0")

addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.3")

addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")

dependencyOverrides ++= Set(
"com.typesafe.sbt" % "sbt-site" % "0.8.2"
)

0 comments on commit 8c1f09e

Please sign in to comment.