Skip to content
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

Upgrades build #310

Merged
merged 8 commits into from
Dec 18, 2019
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ import cats.effect.IO
import github4s.Github
import github4s.Github._
import github4s.cats.effect.jvm.Implicits._
import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.matchers.should.Matchers
import org.scalatest.flatspec.AnyFlatSpec
import scalaj.http.HttpResponse

class CatsEffectJVMSpec extends FlatSpec with Matchers {
class CatsEffectJVMSpec extends AnyFlatSpec with Matchers {
val accessToken = sys.env.get("GITHUB4S_ACCESS_TOKEN")
val headerUserAgent = Map("user-agent" -> "github4s")
val validUsername = "rafaparadela"
Expand Down
2 changes: 1 addition & 1 deletion github4s/src/main/scala/github4s/api/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ import io.circe.{Json, Printer}
package object api {

def dropNullPrint(json: Json): String =
Printer.noSpaces.copy(dropNullValues = true).pretty(json)
Printer.noSpaces.copy(dropNullValues = true).print(json)

}
5 changes: 3 additions & 2 deletions github4s/src/test/scala/github4s/unit/ApiSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ package github4s.unit
import github4s.api._
import github4s.free.domain.{EditGistFile, GistFile, Pagination}
import github4s.utils.{DummyGithubUrls, MockGithubApiServer, TestUtilsJVM}
import org.scalatest._
import cats.implicits._
import scalaj.http._
import cats.Id
import github4s.jvm.ImplicitsJVM
import github4s.utils.Integration
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

class ApiSpec
extends FlatSpec
extends AnyFlatSpec
with Matchers
with TestUtilsJVM
with MockGithubApiServer
Expand Down
6 changes: 3 additions & 3 deletions github4s/src/test/scala/github4s/unit/DecodersSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
package github4s.unit

import cats.data.NonEmptyList
import cats.syntax.either._
import github4s.Decoders._
import github4s.free.domain._
import github4s.utils.FakeResponses
import io.circe.generic.auto._
import io.circe.parser._
import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

class DecodersSpec extends FlatSpec with Matchers with FakeResponses {
class DecodersSpec extends AnyFlatSpec with Matchers with FakeResponses {

"Commit decoder" should "return a list of commits when the JSON is valid" in {
decode[List[Commit]](listCommitsValidResponse).isRight shouldBe true
Expand Down
5 changes: 3 additions & 2 deletions github4s/src/test/scala/github4s/unit/EncodersSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import github4s.free.domain._
import github4s.utils.TestData
import io.circe.parser._
import io.circe.syntax._
import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.matchers.should.Matchers
import org.scalatest.flatspec.AnyFlatSpec

class EncodersSpec extends FlatSpec with Matchers with TestData {
class EncodersSpec extends AnyFlatSpec with Matchers with TestData {

"TreeData encoder" should "encode the TreeDataSha" in {
val treeData: TreeData = TreeDataSha(validFilePath, validMode, validBlobType, validCommitSha)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

package github4s.utils

import cats.syntax.either._
import github4s.GithubResponses.{GHResponse, GHResult}
import github4s.free.interpreters.{Capture, Interpreters}
import github4s.HttpRequestBuilderExtension
import org.scalatest.{Assertion, AsyncFlatSpec, Ignore, Inspectors, Matchers, Tag}
import github4s.free.interpreters.{Capture, Interpreters}
import org.scalatest.{Assertion, Ignore, Inspectors, Tag}
import org.scalatest.flatspec.AsyncFlatSpec
import org.scalatest.matchers.should.Matchers

import scala.concurrent.{ExecutionContext, Future}

Expand Down
5 changes: 3 additions & 2 deletions github4s/src/test/scala/github4s/utils/BaseSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ import io.circe.Decoder
import io.circe.parser.parse
import org.scalamock.matchers.MockParameter
import org.scalamock.scalatest.MockFactory
import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.matchers.should.Matchers
import org.scalatest.flatspec.AnyFlatSpec

trait BaseSpec extends FlatSpec with Matchers with TestData with IdInstances with MockFactory {
trait BaseSpec extends AnyFlatSpec with Matchers with TestData with IdInstances with MockFactory {

case class JsonMockParameter(json: String) extends MockParameter[String](json) {
override def equals(argument: Any): Boolean = parse(json) == parse(argument.toString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ package github4s.utils

import org.mockserver.configuration.ConfigurationProperties
import org.mockserver.integration.ClientAndServer._
import org.scalatest.{BeforeAndAfterAll, FlatSpec}
import org.scalatest.BeforeAndAfterAll
import org.scalatest.flatspec.AnyFlatSpec

trait MockServerService extends FlatSpec with BeforeAndAfterAll {
trait MockServerService extends AnyFlatSpec with BeforeAndAfterAll {

val mockServerPort = 9999

Expand Down
11 changes: 5 additions & 6 deletions project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import com.typesafe.sbt.site.jekyll.JekyllPlugin.autoImport._
import com.typesafe.sbt.site.SitePlugin.autoImport._
import microsites._
import microsites.MicrositesPlugin.autoImport._
import sbt.Keys._
import sbt._
import sbtorgpolicies.model._
import sbtorgpolicies.OrgPoliciesKeys.orgBadgeListSetting
import sbtorgpolicies.OrgPoliciesPlugin
import sbtorgpolicies.OrgPoliciesPlugin.autoImport._
Expand All @@ -25,14 +24,14 @@ object ProjectPlugin extends AutoPlugin {
val base64: String = "0.2.9"
val cats: String = "2.0.0"
val catsEffect: String = "2.0.0"
val circe: String = "0.11.2"
val circeJackson: String = "0.11.1"
val circe: String = "0.12.3"
val circeJackson: String = "0.12.1"
val paradise: String = "2.1.1"
val simulacrum: String = "0.19.0"
val scala212: String = "2.12.10"
val scalaj: String = "2.4.2"
val scalamock: String = "4.4.0"
val scalaTest: String = "3.0.8"
val scalaTest: String = "3.1.0"
}

lazy val micrositeSettings = Seq(
Expand All @@ -52,7 +51,7 @@ object ProjectPlugin extends AutoPlugin {
Map("title" -> "Changelog", "section" -> "changelog", "position" -> "2")
)
),
includeFilter in Jekyll := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.md",
includeFilter in makeSite := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.md",
scalacOptions in Tut ~= (_ filterNot Set("-Ywarn-unused-import", "-Xlint").contains)
)

Expand Down