Skip to content

Commit

Permalink
Merge branch 'release/0.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
chuwy committed Oct 18, 2017
2 parents fde976a + a3eed6d commit 9279006
Show file tree
Hide file tree
Showing 19 changed files with 502 additions and 427 deletions.
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
language: scala
scala:
- 2.10.4
- 2.11.5
- 2.10.6
- 2.11.11
jdk:
- oraclejdk7
- openjdk6
- openjdk7
- openjdk8
script:
- sbt test
deploy:
skip_cleanup: true
provider: script
script: ./.travis/deploy.sh $TRAVIS_TAG
on:
condition: '"${TRAVIS_SCALA_VERSION}" == "2.11.5" && "${TRAVIS_JDK_VERSION}" == "oraclejdk7"'
condition: '"${TRAVIS_SCALA_VERSION}" == "2.11.11" && "${TRAVIS_JDK_VERSION}" == "openjdk8"'
tags: true
env:
global:
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
Version 0.4.0 (2017-10-18)
--------------------------
Add Scala 2.12 support (#51)
Add a note in Scaladoc about queue capacity (#16)
Add stress-testing module (#60)
Allow to provide ExecutionContext for async emitters (#57)
Bump Scala 2.11 to 2.11.11 (#54)
Bump SBT to 0.13.16 (#53)
Bump sbt-bintray to 0.5.1 (#59)
Drop Scala 2.9 support (#50)
Deprecate trackUnstructEvent (#43)
Remove blocking calls (#55)
Replace Akka with scalaj-http (#49)
Update READMEs markdown in according with CommonMark (#52)

Version 0.3.0 (2016-05-14)
--------------------------
Added support for true timestamp (#28)
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Snowplow Scala Tracker

[![Build Status][travis-image]][travis]
[![Release] [release-image]][releases]
[![Release][release-image]][releases]
[![License][license-image]][license]

## Overview

Add analytics to your Scala, Akka and Play apps and servers using the **[Snowplow] [snowplow]** event tracker for **[Scala][scala]**.
Add analytics to your Scala, Akka and Play apps and servers using the **[Snowplow][snowplow]** event tracker for **[Scala][scala]**.

## Quickstart

Assuming git, **[Vagrant] [vagrant-install]** and **[VirtualBox] [virtualbox-install]** installed:
Assuming git, **[Vagrant][vagrant-install]** and **[VirtualBox][virtualbox-install]** installed:

```bash
host$ git clone https://github.com/snowplow/snowplow-scala-tracker.git
Expand All @@ -22,16 +22,16 @@ guest$ sbt test

## Find out more

| Technical Docs | Setup Guide | Roadmap | Contributing |
|---------------------------------|---------------------------|-------------------------|-----------------------------------|
| ![i1] [techdocs-image] | ![i2] [setup-image] | ![i3] [roadmap-image] | ![i4] [contributing-image] |
| **[Technical Docs] [techdocs]** | **[Setup Guide] [setup]** | **[Roadmap] [roadmap]** | **[Contributing] [contributing]** |
| Technical Docs | Setup Guide | Roadmap | Contributing |
|--------------------------------|--------------------------|------------------------|----------------------------------|
| ![i1][techdocs-image] | ![i2][setup-image] | ![i3][roadmap-image] | ![i4][contributing-image] |
| **[Technical Docs][techdocs]** | **[Setup Guide][setup]** | **[Roadmap][roadmap]** | **[Contributing][contributing]** |

## Copyright and license

The Snowplow Scala Tracker is copyright 2015-2016 Snowplow Analytics Ltd.
The Snowplow Scala Tracker is copyright 2015-2017 Snowplow Analytics Ltd.

Licensed under the **[Apache License, Version 2.0] [license]** (the "License");
Licensed under the **[Apache License, Version 2.0][license]** (the "License");
you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software
Expand All @@ -46,7 +46,7 @@ limitations under the License.
[license-image]: http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat
[license]: http://www.apache.org/licenses/LICENSE-2.0

[release-image]: http://img.shields.io/badge/release-0.3.0-blue.svg?style=flat
[release-image]: http://img.shields.io/badge/release-0.4.0-blue.svg?style=flat
[releases]: https://github.com/snowplow/snowplow-scala-tracker/releases

[snowplow]: http://snowplowanalytics.com
Expand Down
36 changes: 36 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2013-2017 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the Apache License Version 2.0 is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
*/
lazy val root = project.in(file("."))
.settings(Seq[Setting[_]](
organization := "com.snowplowanalytics",
version := "0.4.0",
description := "Scala tracker for Snowplow",
name := "snowplow-scala-tracker",
description := "Scala analytics SDK for Snowplow",
scalaVersion := "2.11.11",
crossScalaVersions := Seq("2.10.6", "2.11.11", "2.12.3"),
scalacOptions := Seq("-deprecation", "-encoding", "utf8"),
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
))
.settings(BuildSettings.buildSettings)
.settings(Seq(
shellPrompt := { _ => name.value + " > " }
))
.settings(
libraryDependencies := Seq(
Dependencies.Libraries.scalajHttp,
Dependencies.Libraries.json4sJackson,
Dependencies.Libraries.mockito,
Dependencies.Libraries.specs2,
Dependencies.Libraries.scalaCheck)
)
44 changes: 18 additions & 26 deletions project/BuildSettings.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2015 Snowplow Analytics Ltd. All rights reserved.
* Copyright (c) 2013-2017 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
Expand All @@ -12,36 +12,28 @@
*/
import bintray.BintrayPlugin._
import bintray.BintrayKeys._

import sbt._
import Keys._

object BuildSettings {

// Basic settings for our app
lazy val basicSettings = Seq[Setting[_]](
organization := "com.snowplowanalytics",
version := "0.3.0",
description := "Scala tracker for Snowplow",
scalaVersion := "2.10.6",
crossScalaVersions := Seq("2.10.6", "2.11.5"),
scalacOptions := Seq("-deprecation", "-encoding", "utf8"),
resolvers ++= Dependencies.resolutionRepos
// Makes our SBT settings available in runtime
lazy val scalifySettings = Seq(
sourceGenerators in Compile += Def.task {
val file = (sourceManaged in Compile).value / "settings.scala"
IO.write(file, """package com.snowplowanalytics.snowplow.scalatracker.generated
|object ProjectSettings {
| val version = "%s"
| val name = "%s"
| val organization = "%s"
| val scalaVersion = "%s"
|}
|""".stripMargin.format(version.value, name.value, organization.value, scalaVersion.value))
Seq(file)
}.taskValue
)

// Makes our SBT app settings available from within the ETL
lazy val scalifySettings = Seq(sourceGenerators in Compile <+= (sourceManaged in Compile, version, name, organization, scalaVersion) map { (d, v, n, o, sv) =>
val file = d / "settings.scala"
IO.write(file, """package com.snowplowanalytics.snowplow.scalatracker.generated
|object ProjectSettings {
| val version = "%s"
| val name = "%s"
| val organization = "%s"
| val scalaVersion = "%s"
|}
|""".stripMargin.format(v, n, o, sv))
Seq(file)
})

// Bintray publishing settings
lazy val publishSettings = bintraySettings ++ Seq[Setting[_]](
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0.html")),
Expand All @@ -51,7 +43,7 @@ object BuildSettings {

// Maven Central publishing settings
lazy val mavenCentralExtras = Seq[Setting[_]](
pomIncludeRepository := { x => false },
pomIncludeRepository := { _ => false },
homepage := Some(url("http://snowplowanalytics.com")),
scmInfo := Some(ScmInfo(url("https://github.com/snowplow/snowplow-scala-tracker"), "scm:[email protected]:snowplow/snowplow-scala-tracker.git")),
pomExtra := (
Expand All @@ -65,5 +57,5 @@ object BuildSettings {
</developers>)
)

lazy val buildSettings = basicSettings ++ scalifySettings ++ publishSettings ++ mavenCentralExtras
lazy val buildSettings = scalifySettings ++ publishSettings ++ mavenCentralExtras
}
73 changes: 11 additions & 62 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2015 Snowplow Analytics Ltd. All rights reserved.
* Copyright (c) 2015-2017 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
Expand All @@ -11,83 +11,32 @@
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
*/
import sbt._
import Keys._

object Dependencies {

val resolutionRepos = Seq(
// For Twitter's LRU cache
"Twitter Maven Repo" at "http://maven.twttr.com/",
"Sonatype" at "https://oss.sonatype.org/content/repositories/releases"
)

object V {
// Java
val commonsLang = "3.1"
val commonsCodec = "1.5"
val jodaTime = "2.3"
val jodaMoney = "0.9"
val jodaConvert = "1.2"
val jackson = "1.9.7"

// Scala
val json4s = "3.2.11"
val spray = "1.3.3"
val akka = "2.3.14"
object collUtil {
val _29 = "5.3.10"
val _210 = "6.3.4"
val _211 = "6.23.0"
}
val scalajHttp = "2.3.0"
val json4s = "3.2.11"

// Java (test only)
val mockito = "1.9.5"
val mockito = "1.9.5"

// Scala (test only)
object specs2 {
val _29 = "1.12.4.1"
val _210 = "2.3.13"
val _211 = "2.3.13"
}
val specs2 = "3.9.5"
val scalaCheck = "1.13.4"
}

object Libraries {
// Java
val commonsCodec = "commons-codec" % "commons-codec" % V.commonsCodec
val commonsLang = "org.apache.commons" % "commons-lang3" % V.commonsLang
val jodaTime = "joda-time" % "joda-time" % V.jodaTime
val jodaMoney = "org.joda" % "joda-money" % V.jodaMoney
val jodaConvert = "org.joda" % "joda-convert" % V.jodaConvert
val jackson = "org.codehaus.jackson" % "jackson-mapper-asl" % V.jackson

// Scala
val sprayClient = "io.spray" %% "spray-client" % V.spray
val akka = "com.typesafe.akka" %% "akka-actor" % V.akka
val json4sJackson = "org.json4s" %% "json4s-jackson" % V.json4s
object collUtil {
val _29 = "com.twitter" % "util-collection" % V.collUtil._29
val _210 = "com.twitter" %% "util-collection" % V.collUtil._210
val _211 = "com.twitter" %% "util-collection" % V.collUtil._211
}
val scalajHttp = "org.scalaj" %% "scalaj-http" % V.scalajHttp
val json4sJackson = "org.json4s" %% "json4s-jackson" % V.json4s

// Java (test only)
val mockito = "org.mockito" % "mockito-all" % V.mockito % "test"
val mockito = "org.mockito" % "mockito-all" % V.mockito % "test"

// Scala (test only)
object specs2 {
val _29 = "org.specs2" %% "specs2" % V.specs2._29 % "test"
val _210 = "org.specs2" %% "specs2" % V.specs2._210 % "test"
val _211 = "org.specs2" %% "specs2" % V.specs2._211 % "test"
}
val sprayTest = "io.spray" %% "spray-testkit" % V.spray % "test"
val specs2 = "org.specs2" %% "specs2-core" % V.specs2 % "test"
val scalaCheck = "org.scalacheck" %% "scalacheck" % V.scalaCheck % "test"
}

def onVersion[A](all: Seq[A] = Seq(), on29: => Seq[A] = Seq(), on210: => Seq[A] = Seq(), on211: => Seq[A] = Seq()) =
scalaVersion(v => all ++ (if (v.contains("2.9.")) {
on29
} else if (v.contains("2.10.")) {
on210
} else {
on211
}))
}
48 changes: 0 additions & 48 deletions project/SnowplowTrackerBuild.scala

This file was deleted.

2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.11
sbt.version=1.0.2
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.1")
Loading

0 comments on commit 9279006

Please sign in to comment.