Skip to content

Commit

Permalink
Implement api tests and fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
little-inferno committed Nov 16, 2022
1 parent e8b9a79 commit 84fc562
Show file tree
Hide file tree
Showing 56 changed files with 1,505 additions and 273 deletions.
17 changes: 10 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Created by https://www.toptal.com/developers/gitignore/api/scala,sbt,intellij+all,visualstudiocode,macos,windows
# Edit at https://www.toptal.com/developers/gitignore?templates=scala,sbt,intellij+all,visualstudiocode,macos,windows
# Created by https://www.toptal.com/developers/gitignore/api/scala,sbt,intellij+all,visualstudiocode,macos,windows,metals,bloop
# Edit at https://www.toptal.com/developers/gitignore?templates=scala,sbt,intellij+all,visualstudiocode,macos,windows,metals,bloop

### Bloop ###
.bloop/

### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
Expand Down Expand Up @@ -80,10 +83,6 @@ fabric.properties
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

.idea/*

### macOS ###
Expand Down Expand Up @@ -119,6 +118,10 @@ Temporary Items
# iCloud generated files
*.icloud

### Metals ###
.metals/
project/**/metals.sbt

### SBT ###
# Simple Build Tool
# http://www.scala-sbt.org/release/docs/Getting-Started/Directories.html#configuring-version-control
Expand Down Expand Up @@ -182,4 +185,4 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/scala,sbt,intellij+all,visualstudiocode,macos,windows
# End of https://www.toptal.com/developers/gitignore/api/scala,sbt,intellij+all,visualstudiocode,macos,windows,metals,bloop
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Muffin

[![Build](https://github.com/tinkoff/muffin/workflows/CI/badge.svg)](https://github.com/Tinkoff/muffin/actions?query=workflow%3ACI+branch%3Amaster)
----

Mattermost v4 API client for Scala 3.
Expand All @@ -24,7 +25,7 @@ libraryDependencies += "ru.tinkoff" %% "muffin-sttp-http-interop" % "latest vers
libraryDependencies += "com.softwaremill.sttp.client3" %% "async-http-client-backend-cats" % "3.7.6"
```

3. Program example
3. Full example

```scala
import java.time.{LocalDateTime, ZoneId}
Expand Down Expand Up @@ -72,14 +73,16 @@ object Application extends IOApp.Simple {
}
```

More examples [here](https://github.com/little-inferno/muffin/tree/oss/modules/examples)

# Supported integrations

## Json integrations

### [circe](https://github.com/circe/circe)

```sbt
libraryDependencies += "space.littleinferno" %% "muffin-circe-json-interop" % "latest version in badge"
libraryDependencies += "ru.tinkoff" %% "muffin-circe-json-interop" % "latest version in badge"
```

```scala
Expand All @@ -89,7 +92,7 @@ import muffin.interop.circe.codec.given
### [zio-json](https://github.com/zio/zio-json)

```sbt
libraryDependencies += "space.littleinferno" %% "muffin-zio-json-interop" % "latest version in badge"
libraryDependencies += "ru.tinkoff" %% "muffin-zio-json-interop" % "latest version in badge"
```

```scala
Expand All @@ -101,7 +104,7 @@ import muffin.interop.zio.codec.given
### [http4s](https://github.com/http4s/http4s)

```sbt
libraryDependencies += "space.littleinferno" %% "muffin-http4s-http-interop" % "latest version in badge"
libraryDependencies += "ru.tinkoff" %% "muffin-http4s-http-interop" % "latest version in badge"
```

```scala
Expand All @@ -123,7 +126,7 @@ val server = EmberServerBuilder
### [zio-http](https://github.com/dream11/zio-http)

```sbt
libraryDependencies += "space.littleinferno" %% "muffin-zio-http-interop" % "latest version in badge"
libraryDependencies += "ru.tinkoff" %% "muffin-zio-http-interop" % "latest version in badge"
```

```scala
Expand All @@ -144,7 +147,7 @@ val server = Server.start(8080, ZioServer.routes(router, codec))
### [sttp](https://github.com/softwaremill/sttp)

```sbt
libraryDependencies += "space.littleinferno" %% "muffin-sttp-http-interop" % "latest version in badge"
libraryDependencies += "ru.tinkoff" %% "muffin-sttp-http-interop" % "latest version in badge"
```

```scala
Expand Down
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ lazy val `muffin-core` = project
.settings(commonSettings)
.settings(libraryDependencies ~= (_.map(_.excludeAll(ExclusionRule(organization = "org.scala-lang.modules", name = "scala-collection-compat_2.13")))))

val TestAndCompile = config("test->test;compile->compile")

lazy val integration = modules / "integration"

lazy val `muffin-sttp-http-interop` = project
Expand All @@ -84,13 +86,12 @@ lazy val `muffin-zio-http-interop` = project
lazy val `muffin-circe-json-interop` = project
.in(integration / "circe-json-interop")
.settings(commonSettings)
.dependsOn(`muffin-core`)
.dependsOn(`muffin-core` % TestAndCompile)

lazy val `muffin-zio-json-interop` = project
.in(integration / "zio-json-interop")
.settings(commonSettings)
.dependsOn(`muffin-core`)

.dependsOn(`muffin-core` % TestAndCompile)

lazy val examples = modules / "examples"

Expand Down
14 changes: 9 additions & 5 deletions modules/core/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@


import Dependencies._



libraryDependencies ++= fs2 :: cats.core :: cats.effect :: Nil
libraryDependencies ++=
fs2 ::
cats.core ::
cats.effect ::
scalatest.core ::
scalatest.featureSpec ::
circe.core % Test ::
circe.parser % Test ::
Nil
Loading

0 comments on commit 84fc562

Please sign in to comment.