Skip to content

Commit

Permalink
Updated supported versions to 2.9.3, 2.10.4 (fixed #22)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderdean committed Jul 14, 2014
1 parent 5c41787 commit 64e08fd
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 18 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: scala
scala:
- 2.9.3
- 2.10.0
- 2.10.4
jdk:
- oraclejdk7
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ Added support for MaxMind Netspeed lookup (#7)
Made unit tests use test databases (#11)
Parallelized lookups into various MaxMind databases (#15)
Used MaxMind library from Maven (#9)
Updated supported versions to 2.9.3, 2.10.4 (#22)
Updated publish settings to publish to local directory (#21)
Bumped SBT to 0.13.2 (#20)
Clarified and updated README (#2)
Added CHANGELOG (#4)
45 changes: 32 additions & 13 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,45 @@ import Keys._

object Dependencies {
val resolutionRepos = Seq(
ScalaToolsSnapshots,
"ScalaTools snapshots at Sonatype" at "https://oss.sonatype.org/content/repositories/snapshots/",
"Twitter Maven Repo" at "http://maven.twttr.com/" // For Twitter's util functions
)

object V {
val maxmind = "1.2.11"
val collUtilsOld = "5.3.10"
val collUtils = "6.3.4"
val specs2Old = "1.12.4.1"
val specs2 = "1.14"
val maxmind = "1.2.11"
object collUtils {
val _29 = "5.3.10"
val _210 = "6.3.4"
val _211 = "6.12.1"
}
object specs2 {
val _29 = "1.12.4.1"
val _210 = "1.14"
val _211 = "2.3.13"
}
}

object Libraries {
val collUtilsOld = "com.twitter" % "util-collection" % V.collUtilsOld
val collUtils = "com.twitter" %% "util-collection" % V.collUtils
val maxmind = "com.maxmind.geoip" % "geoip-api" % V.maxmind
val specs2Old = "org.specs2" %% "specs2" % V.specs2Old % "test"
val specs2 = "org.specs2" %% "specs2" % V.specs2 % "test"
val maxmind = "com.maxmind.geoip" % "geoip-api" % V.maxmind
object collUtils {
val _29 = "com.twitter" % "util-collection" % V.collUtils._29
val _210 = "com.twitter" %% "util-collection" % V.collUtils._210
// Not yet released
val _211 = "com.twitter" %% "util-collection" % V.collUtils._211
}
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"
}
}

def onVersion[A](all: Seq[A] = Seq(), on292: => Seq[A] = Seq(), on210: => Seq[A] = Seq()) =
scalaVersion(v => all ++ (if (v.contains("2.10")) on210 else on292))
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
}))
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import sbt._
import Keys._

object ScalaMaxMindGeoIpBuild extends Build {
object ScalaMaxmindIpLookupsBuild extends Build {

import Dependencies._
import BuildSettings._
Expand All @@ -24,12 +24,13 @@ object ScalaMaxMindGeoIpBuild extends Build {
}

// Define our project, with basic project information and library dependencies
lazy val project = Project("scala-maxmind-geoip", file("."))
lazy val project = Project("scala-maxmind-iplookups", file("."))
.settings(buildSettings: _*)
.settings(
libraryDependencies <++= Dependencies.onVersion(
on292 = Seq(Libraries.collUtilsOld, Libraries.specs2Old, Libraries.maxmind),
on210 = Seq(Libraries.collUtils, Libraries.specs2, Libraries.maxmind)
on29 = Seq(Libraries.collUtils._29, Libraries.specs2._29, Libraries.maxmind),
on210 = Seq(Libraries.collUtils._210, Libraries.specs2._210, Libraries.maxmind),
on211 = Seq(Libraries.collUtils._211, Libraries.specs2._211, Libraries.maxmind)
)
)
}

0 comments on commit 64e08fd

Please sign in to comment.