Skip to content

Add Scala 2.13.0 to build #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
language: scala

scala:
- 2.10.6
- 2.11.11
- 2.12.2
- 2.10.7
- 2.11.12
- 2.12.8
- 2.13.0

script:
- sbt ++$TRAVIS_SCALA_VERSION test:compile
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name := """github-api"""

version := "0.2.1-SNAPSHOT"

scalaVersion := "2.11.11"
scalaVersion := "2.12.8"

crossScalaVersions := Seq("2.10.6", scalaVersion.value, "2.12.1")
crossScalaVersions := Seq("2.10.7", "2.11.12", scalaVersion.value, "2.13.0")

description := "The GitHub API from Scala with Async HTTP Client (Netty)"

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/codecheck/github/api/GitHubAPI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class GitHubAPI(token: String, client: Transport, tokenType: String = "token", d
deferred.success(result)
}
}
def onThrowable(t: Throwable) {
def onThrowable(t: Throwable): Unit = {
deferred.failure(t)
}
})
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/codecheck/github/api/OAuthAPI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class OAuthAPI(clientId: String, clientSecret: String, redirectUri: String, clie
case None => deferred.success(AccessToken(json))
}
}
def onThrowable(t: Throwable) {
def onThrowable(t: Throwable): Unit = {
deferred.failure(t)
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class MilestoneCommand(val api: GitHubAPI) extends Command {
List(
m.number,
m.title,
m.open_issues + "/" + (m.open_issues + m.closed_issues),
s"${m.open_issues}/${m.open_issues + m.closed_issues}",
m.due_on.map(_.toString("yyyy-MM-dd")).getOrElse("")
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AsyncHttp19Request(request: AsyncHttpClient#BoundRequestBuilder) extends R
handler.onCompleted(new AsyncHttp19Response(res))
res
}
override def onThrowable(t: Throwable) {
override def onThrowable(t: Throwable): Unit = {
handler.onThrowable(t)
super.onThrowable(t)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AsyncHttp20Request(request: BoundRequestBuilder) extends Request {
handler.onCompleted(new AsyncHttp20Response(res))
res
}
override def onThrowable(t: Throwable) {
override def onThrowable(t: Throwable): Unit = {
handler.onThrowable(t)
super.onThrowable(t)
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/PullRequestOpSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PullRequestOpSpec extends FunSpec with api.Constants {
describe("getPullRequest") {
it("with open PR should succeed") {
val pr = Await.result(api.getPullRequest(otherUser, otherUserRepo, 21L), TIMEOUT)
assert(pr.size >= 0)
assert(pr.nonEmpty)
assert(pr.exists(_.state == IssueState.closed))
assert(pr.exists(_.mergeable == Some(false)))
assert(pr.exists(_.merge_commit_sha.size == shaSize))
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/PullRequestReviewOpSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PullRequestReviewOpSpec extends FunSpec with api.Constants {
describe("getPullRequestReview") {
it("with valid repo should succeed") {
val review = Await.result(api.getPullRequestReview(otherUser, otherUserRepo, 47, 32477105), TIMEOUT)
assert(review.size >= 0)
assert(review.nonEmpty)
assert(review.exists(_.id >= 0))
assert(review.exists(_.state == PullRequestReviewState.approved))
assert(review.exists(_.commit_id.size == shaSize))
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/UserOpSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UserOpSpec extends FunSpec
{
val origin = Await.result(api.getAuthenticatedUser, TIMEOUT)

override def afterAll() {
override def afterAll(): Unit = {
val input = UserInput(
origin.name.orElse(Some("")),
origin.email.orElse(Some("")),
Expand Down
14 changes: 7 additions & 7 deletions src/test/scala/events/GitHubEventSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class GitHubEventSpec extends FunSpec with Matchers with Inside
describe("Issue") {
val issue = e.issue
it("should have a number") {
assert(issue.number === 2l)
assert(issue.number === 2L)
}
it("should have a title") {
assert(issue.title === "Spelling error in the README file")
Expand Down Expand Up @@ -135,7 +135,7 @@ class GitHubEventSpec extends FunSpec with Matchers with Inside
assert(name === "pull_request")
}
it("should have a number") {
assert(e.number === 1l)
assert(e.number === 1L)
}
it("should have an action") {
assert(e.action === models.PullRequestAction.opened)
Expand All @@ -146,7 +146,7 @@ class GitHubEventSpec extends FunSpec with Matchers with Inside
describe("PullRequest") {
val pr = e.pull_request
it("should have a number") {
assert(pr.number === 1l)
assert(pr.number === 1L)
}
it("should have a title") {
assert(pr.title === "Update the README with new information")
Expand Down Expand Up @@ -208,7 +208,7 @@ class GitHubEventSpec extends FunSpec with Matchers with Inside
describe("PullRequestReview") {
val review = e.review
it("should have an id") {
assert(review.id === 2626884l)
assert(review.id === 2626884L)
}
it("should have a state") {
assert(review.state === models.PullRequestReviewState.approved)
Expand All @@ -224,7 +224,7 @@ class GitHubEventSpec extends FunSpec with Matchers with Inside
describe("PullRequest") {
val pr = e.pull_request
it("should have a number") {
assert(pr.number === 8l)
assert(pr.number === 8L)
}
it("should have a title") {
assert(pr.title === "Add a README description")
Expand Down Expand Up @@ -267,7 +267,7 @@ class GitHubEventSpec extends FunSpec with Matchers with Inside
describe("Repository") {
val repo = e.repository
it("should have an id") {
assert(repo.id === 35129377l)
assert(repo.id === 35129377L)
}
it("should have a name") {
assert(repo.name === "public-repo")
Expand All @@ -285,7 +285,7 @@ class GitHubEventSpec extends FunSpec with Matchers with Inside
describe("User") {
val user = e.sender
it("should have an id") {
assert(user.id === 6752317l)
assert(user.id === 6752317L)
}
it("should have a login") {
assert(user.login === "baxterthehacker")
Expand Down