Skip to content

Commit 3926ab6

Browse files
committed
Merge branch 'release/0.4.0-RC'
2 parents 99ead57 + fb0ea74 commit 3926ab6

File tree

14 files changed

+70
-61
lines changed

14 files changed

+70
-61
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ Add `scalikejdbc-async` to your dependencies.
3030

3131
```scala
3232
libraryDependencies ++= Seq(
33-
"org.scalikejdbc" %% "scalikejdbc-async" % "[0.3,)",
34-
"com.github.mauricio" %% "postgresql-async" % "0.2.11",
35-
"com.github.mauricio" %% "mysql-async" % "0.2.11",
36-
"org.slf4j" % "slf4j-simple" % "[1.7,)" // slf4j implementation
33+
"org.scalikejdbc" %% "scalikejdbc-async" % "0.3.+",
34+
"com.github.mauricio" %% "postgresql-async" % "0.2.+",
35+
"com.github.mauricio" %% "mysql-async" % "0.2.+",
36+
"org.slf4j" % "slf4j-simple" % "1.7.+" // slf4j implementation
3737
)
3838
```
3939

4040
If you're a Play2 user, use play-plugin too!
4141

4242
```scala
4343
val appDependencies = Seq(
44-
"org.scalikejdbc" %% "scalikejdbc-async" % "[0.3,)",
45-
"org.scalikejdbc" %% "scalikejdbc-async-play-plugin" % "[0.3,)",
46-
"com.github.mauricio" %% "postgresql-async" % "0.2.11"
44+
"org.scalikejdbc" %% "scalikejdbc-async" % "0.3.+",
45+
"org.scalikejdbc" %% "scalikejdbc-async-play-plugin" % "0.3.+",
46+
"com.github.mauricio" %% "postgresql-async" % "0.2.+"
4747
)
4848
```
4949

@@ -151,7 +151,7 @@ password: sa
151151
Published binary files have the following copyright:
152152

153153
```
154-
Copyright 2013 ScalikeJDBC committers
154+
Copyright 2013 - 2014 scalikejdbc.org
155155
156156
Apache License, Version 2.0
157157

core/src/main/scala/scalikejdbc/async/internal/AsyncResultSetImpl.scala

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -119,48 +119,48 @@ private[scalikejdbc] class AsyncResultSetImpl(rows: IndexedSeq[RowData])
119119
case dt: DateTime => dt
120120
case TimeInMillis(ms) => new DateTime(ms)
121121
case other => throw new UnsupportedOperationException(
122-
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #dateTime!")
122+
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #jodaDateTime!")
123123
}
124-
override def dateTime(columnIndex: Int): DateTime = anyToDateTime(any(columnIndex))
125-
override def dateTime(columnLabel: String): DateTime = anyToDateTime(any(columnLabel))
126-
override def dateTimeOpt(columnIndex: Int): Option[DateTime] = Option(dateTime(columnIndex))
127-
override def dateTimeOpt(columnLabel: String): Option[DateTime] = Option(dateTime(columnLabel))
124+
override def jodaDateTime(columnIndex: Int): DateTime = anyToDateTime(any(columnIndex))
125+
override def jodaDateTime(columnLabel: String): DateTime = anyToDateTime(any(columnLabel))
126+
override def jodaDateTimeOpt(columnIndex: Int): Option[DateTime] = Option(jodaDateTime(columnIndex))
127+
override def jodaDateTimeOpt(columnLabel: String): Option[DateTime] = Option(jodaDateTime(columnLabel))
128128

129129
private def anyToLocalDateTime(any: Any): LocalDateTime = any match {
130130
case null => null
131131
case ldt: LocalDateTime => ldt
132132
case TimeInMillis(ms) => new LocalDateTime(ms)
133133
case other => throw new UnsupportedOperationException(
134-
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #localDateTime!")
134+
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #jodaLocalDateTime!")
135135
}
136-
override def localDateTime(columnIndex: Int): LocalDateTime = anyToLocalDateTime(any(columnIndex))
137-
override def localDateTime(columnLabel: String): LocalDateTime = anyToLocalDateTime(any(columnLabel))
138-
override def localDateTimeOpt(columnIndex: Int): Option[LocalDateTime] = Option(localDateTime(columnIndex))
139-
override def localDateTimeOpt(columnLabel: String): Option[LocalDateTime] = Option(localDateTime(columnLabel))
136+
override def jodaLocalDateTime(columnIndex: Int): LocalDateTime = anyToLocalDateTime(any(columnIndex))
137+
override def jodaLocalDateTime(columnLabel: String): LocalDateTime = anyToLocalDateTime(any(columnLabel))
138+
override def jodaLocalDateTimeOpt(columnIndex: Int): Option[LocalDateTime] = Option(jodaLocalDateTime(columnIndex))
139+
override def jodaLocalDateTimeOpt(columnLabel: String): Option[LocalDateTime] = Option(jodaLocalDateTime(columnLabel))
140140

141141
private def anyToLocalDate(any: Any): LocalDate = any match {
142142
case null => null
143143
case ld: LocalDate => ld
144144
case TimeInMillis(ms) => new LocalDate(ms)
145145
case other => throw new UnsupportedOperationException(
146-
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #localDate!")
146+
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #jodaLocalDate!")
147147
}
148-
override def localDate(columnIndex: Int): LocalDate = anyToLocalDate(any(columnIndex))
149-
override def localDate(columnLabel: String): LocalDate = anyToLocalDate(any(columnLabel))
150-
override def localDateOpt(columnIndex: Int): Option[LocalDate] = Option(localDate(columnIndex))
151-
override def localDateOpt(columnLabel: String): Option[LocalDate] = Option(localDate(columnLabel))
148+
override def jodaLocalDate(columnIndex: Int): LocalDate = anyToLocalDate(any(columnIndex))
149+
override def jodaLocalDate(columnLabel: String): LocalDate = anyToLocalDate(any(columnLabel))
150+
override def jodaLocalDateOpt(columnIndex: Int): Option[LocalDate] = Option(jodaLocalDate(columnIndex))
151+
override def jodaLocalDateOpt(columnLabel: String): Option[LocalDate] = Option(jodaLocalDate(columnLabel))
152152

153153
private def anyToLocalTime(any: Any): LocalTime = any match {
154154
case null => null
155155
case lt: LocalTime => lt
156156
case TimeInMillis(ms) => new LocalTime(ms)
157157
case other => throw new UnsupportedOperationException(
158-
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #localTime!")
158+
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #jodaLocalTime!")
159159
}
160-
override def localTime(columnIndex: Int): LocalTime = anyToLocalTime(any(columnIndex))
161-
override def localTime(columnLabel: String): LocalTime = anyToLocalTime(any(columnLabel))
162-
override def localTimeOpt(columnIndex: Int): Option[LocalTime] = Option(localTime(columnIndex))
163-
override def localTimeOpt(columnLabel: String): Option[LocalTime] = Option(localTime(columnLabel))
160+
override def jodaLocalTime(columnIndex: Int): LocalTime = anyToLocalTime(any(columnIndex))
161+
override def jodaLocalTime(columnLabel: String): LocalTime = anyToLocalTime(any(columnLabel))
162+
override def jodaLocalTimeOpt(columnIndex: Int): Option[LocalTime] = Option(jodaLocalTime(columnIndex))
163+
override def jodaLocalTimeOpt(columnLabel: String): Option[LocalTime] = Option(jodaLocalTime(columnLabel))
164164

165165
private def anyToUrl(any: Any): java.net.URL = any match {
166166
case null => null

core/src/test/scala/programmerlist/Company.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ object Company extends SQLSyntaxSupport[Company] with ShortenedNames {
2424
id = rs.long(c.id),
2525
name = rs.string(c.name),
2626
url = rs.stringOpt(c.url),
27-
createdAt = rs.timestamp(c.createdAt).toDateTime,
28-
deletedAt = rs.timestampOpt(c.deletedAt).map(_.toDateTime)
27+
createdAt = rs.jodaDateTime(c.createdAt),
28+
deletedAt = rs.jodaDateTimeOpt(c.deletedAt)
2929
)
3030

3131
lazy val c = Company.syntax("c")

core/src/test/scala/programmerlist/ExampleSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import scala.concurrent._, duration._, ExecutionContext.Implicits.global
66
import org.scalatest._, matchers._
77
import unit._
88

9-
class ExampleSpec extends FlatSpec with ShouldMatchers with DBSettings with Logging {
9+
class ExampleSpec extends FlatSpec with Matchers with DBSettings with Logging {
1010

1111
val p = Programmer.syntax("p")
1212

core/src/test/scala/programmerlist/Skill.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ object Skill extends SQLSyntaxSupport[Skill] with ShortenedNames {
2222
def apply(s: ResultName[Skill])(rs: WrappedResultSet): Skill = new Skill(
2323
id = rs.long(s.id),
2424
name = rs.string(s.name),
25-
createdAt = rs.timestamp(s.createdAt).toDateTime,
26-
deletedAt = rs.timestampOpt(s.deletedAt).map(_.toDateTime)
25+
createdAt = rs.jodaDateTime(s.createdAt),
26+
deletedAt = rs.jodaDateTimeOpt(s.deletedAt)
2727
)
2828

2929
def opt(s: SyntaxProvider[Skill])(rs: WrappedResultSet): Option[Skill] = rs.longOpt(s.resultName.id).map(_ => apply(s.resultName)(rs))

core/src/test/scala/sample/MySQLSampleSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import scala.concurrent._, duration._, ExecutionContext.Implicits.global
66
import scalikejdbc._, SQLInterpolation._, async._
77
import unit._
88

9-
class MySQLSampleSpec extends FlatSpec with ShouldMatchers with DBSettings with Logging {
9+
class MySQLSampleSpec extends FlatSpec with Matchers with DBSettings with Logging {
1010

1111
val column = AsyncLover.column
1212
val createdTime = DateTime.now.withMillisOfSecond(0)

core/src/test/scala/sample/PostgreSQLSampleSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import scala.concurrent._, duration.DurationInt, ExecutionContext.Implicits.glob
77
import scalikejdbc._, SQLInterpolation._, async._
88
import unit._
99

10-
class PostgreSQLSampleSpec extends FlatSpec with ShouldMatchers with DBSettings with Logging {
10+
class PostgreSQLSampleSpec extends FlatSpec with Matchers with DBSettings with Logging {
1111

1212
val column = AsyncLover.column
1313
val createdTime = DateTime.now.withMillisOfSecond(0)

play-sample/app/models/Company.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ object Company extends SQLSyntaxSupport[Company] with ShortenedNames {
2424
id = rs.long(c.id),
2525
name = rs.string(c.name),
2626
url = rs.stringOpt(c.url),
27-
createdAt = rs.timestamp(c.createdAt).toDateTime,
28-
deletedAt = rs.timestampOpt(c.deletedAt).map(_.toDateTime)
27+
createdAt = rs.jodaDateTime(c.createdAt),
28+
deletedAt = rs.jodaDateTimeOpt(c.deletedAt)
2929
)
3030

3131
lazy val c = Company.syntax("c")

play-sample/app/models/Programmer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ object Programmer extends SQLSyntaxSupport[Programmer] with ShortenedNames {
4242
id = rs.long(p.id),
4343
name = rs.string(p.name),
4444
companyId = rs.longOpt(p.companyId),
45-
createdAt = rs.timestamp(p.createdAt).toDateTime,
46-
deletedAt = rs.timestampOpt(p.deletedAt).map(_.toDateTime)
45+
createdAt = rs.jodaDateTime(p.createdAt),
46+
deletedAt = rs.jodaDateTimeOpt(p.deletedAt)
4747
)
4848

4949
// join query with company table

play-sample/app/models/Skill.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ object Skill extends SQLSyntaxSupport[Skill] with ShortenedNames {
2222
def apply(s: ResultName[Skill])(rs: WrappedResultSet): Skill = new Skill(
2323
id = rs.long(s.id),
2424
name = rs.string(s.name),
25-
createdAt = rs.timestamp(s.createdAt).toDateTime,
26-
deletedAt = rs.timestampOpt(s.deletedAt).map(_.toDateTime)
25+
createdAt = rs.jodaDateTime(s.createdAt),
26+
deletedAt = rs.jodaDateTimeOpt(s.deletedAt)
2727
)
2828

2929
def opt(s: SyntaxProvider[Skill])(rs: WrappedResultSet): Option[Skill] = rs.longOpt(s.resultName.id).map(_ => apply(s.resultName)(rs))

project/Build.scala

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import play.Project._
44

55
object ScalikeJDBCAsyncProject extends Build {
66

7-
lazy val _version = "0.3.5"
8-
lazy val scalikejdbcVersion = "1.7.4"
9-
lazy val mauricioVersion = "0.2.11"
10-
lazy val defaultPlayVersion = "2.2.1"
7+
lazy val _version = "0.4.0-RC"
8+
lazy val scalikejdbcVersion = "2.0.0-RC3"
9+
// TODO Scala 2.11 https://github.com/mauricio/postgresql-async/pull/87
10+
lazy val mauricioVersion = "0.2.13"
11+
lazy val defaultPlayVersion = "2.2.3"
1112

1213
lazy val core = Project(
1314
id = "core",
@@ -26,13 +27,15 @@ object ScalikeJDBCAsyncProject extends Build {
2627
"org.scalikejdbc" %% "scalikejdbc-interpolation" % scalikejdbcVersion % "compile",
2728
"com.github.mauricio" %% "postgresql-async" % mauricioVersion % "provided",
2829
"com.github.mauricio" %% "mysql-async" % mauricioVersion % "provided",
29-
"org.postgresql" % "postgresql" % "9.3-1100-jdbc41" % "test",
30-
"mysql" % "mysql-connector-java" % "5.1.28" % "test",
31-
"org.scalatest" %% "scalatest" % "1.9.2" % "test",
32-
"ch.qos.logback" % "logback-classic" % "1.1.1" % "test"
30+
"org.postgresql" % "postgresql" % "9.3-1101-jdbc41" % "test",
31+
"mysql" % "mysql-connector-java" % "5.1.+" % "test",
32+
"org.scalatest" %% "scalatest" % "2.1.+" % "test",
33+
"ch.qos.logback" % "logback-classic" % "1.1.+" % "test"
3334
)
3435
},
3536
sbtPlugin := false,
37+
transitiveClassifiers in Global := Seq(Artifact.SourceClassifier),
38+
incOptions := incOptions.value.withNameHashing(true),
3639
scalacOptions ++= _scalacOptions,
3740
publishMavenStyle := true,
3841
publishArtifact in Test := false,
@@ -66,6 +69,8 @@ object ScalikeJDBCAsyncProject extends Build {
6669
publishArtifact in Test := false,
6770
pomIncludeRepository := { x => false },
6871
pomExtra := _pomExtra,
72+
transitiveClassifiers in Global := Seq(Artifact.SourceClassifier),
73+
incOptions := incOptions.value.withNameHashing(true),
6974
scalacOptions ++= _scalacOptions
7075
)
7176
) dependsOn(core)
@@ -79,11 +84,11 @@ object ScalikeJDBCAsyncProject extends Build {
7984
"org.scalikejdbc" %% "scalikejdbc-interpolation" % scalikejdbcVersion,
8085
"com.github.mauricio" %% "postgresql-async" % mauricioVersion,
8186
"com.github.mauricio" %% "mysql-async" % mauricioVersion,
82-
"org.postgresql" % "postgresql" % "9.3-1100-jdbc41",
83-
"com.github.tototoshi" %% "play-flyway" % "1.0.1",
84-
"mysql" % "mysql-connector-java" % "5.1.28",
85-
"org.json4s" %% "json4s-ext" % "3.2.6",
86-
"com.github.tototoshi" %% "play-json4s-native" % "0.2.0"
87+
"org.postgresql" % "postgresql" % "9.3-1101-jdbc41",
88+
"com.github.tototoshi" %% "play-flyway" % "1.0.+",
89+
"mysql" % "mysql-connector-java" % "5.1.+",
90+
"org.json4s" %% "json4s-ext" % "3.2.+",
91+
"com.github.tototoshi" %% "play-json4s-native" % "0.2.+"
8792
)
8893
play.Project(appName, appVersion, appDependencies, path = file("play-sample")).settings(
8994
scalaVersion in ThisBuild := "2.10.3",
@@ -119,7 +124,7 @@ object ScalikeJDBCAsyncProject extends Build {
119124
<developers>
120125
<developer>
121126
<id>seratch</id>
122-
<name>Kazuhuiro Sera</name>
127+
<name>Kazuhiro Sera</name>
123128
<url>http://seratch.net/</url>
124129
</developer>
125130
</developers>

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.2-M1
1+
sbt.version=0.13.2

project/plugins.sbt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.1")
1+
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")
22

3-
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "[0.6,)")
3+
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4")
44

55
libraryDependencies <+= (sbtVersion){ sv =>
66
sv.split('.') match { case Array("0", a, b, _@_*) =>
@@ -10,7 +10,11 @@ libraryDependencies <+= (sbtVersion){ sv =>
1010
}
1111
}
1212

13-
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")
13+
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.3")
1414

15-
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.2")
15+
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.4")
16+
17+
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")
18+
19+
addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3")
1620

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22

3-
sbt clean "project core" publish-signed "project play-plugin" publish-signed
3+
sbt clean "project core" publishSigned "project play-plugin" publishSigned
44

0 commit comments

Comments
 (0)