Skip to content

Commit

Permalink
Fix Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherDavenport committed Sep 20, 2018
1 parent bc96eec commit dd3c71c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -28,8 +28,8 @@ script:
- sbt ++$TRAVIS_SCALA_VERSION docs/makeMicrosite

after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && test $TRAVIS_REPO_SLUG == "ChristopherDavenport/fuuid" && sbt ++$TRAVIS_SCALA_VERSION publish
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && test $TRAVIS_REPO_SLUG == "ChristopherDavenport/fuuid" && test $TRAVIS_SCALA_VERSION == "2.12.6" && sbt docs/publishMicrosite
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "series/0.2" && test $TRAVIS_REPO_SLUG == "ChristopherDavenport/fuuid" && sbt ++$TRAVIS_SCALA_VERSION publish
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "series/0.2" && test $TRAVIS_REPO_SLUG == "ChristopherDavenport/fuuid" && test $TRAVIS_SCALA_VERSION == "2.12.6" && sbt docs/publishMicrosite

cache:
directories:
Expand Down
24 changes: 12 additions & 12 deletions build.sbt
Expand Up @@ -55,18 +55,18 @@ lazy val http4s = project.in(file("modules/http4s"))
)
.dependsOn(coreJVM % "compile->compile;test->test")

// lazy val docs = project.in(file("modules/docs"))
// .settings(commonSettings, skipOnPublishSettings, micrositeSettings)
// .settings(
// libraryDependencies ++= Seq(
// "org.http4s" %% "http4s-dsl" % http4sV,
// "org.tpolecat" %% "doobie-postgres" % doobieV,
// "org.tpolecat" %% "doobie-h2" % doobieV
// )
// )
// .enablePlugins(MicrositesPlugin)
// .enablePlugins(TutPlugin)
// .dependsOn(coreJVM, http4s, doobie, circeJVM)
lazy val docs = project.in(file("modules/docs"))
.settings(commonSettings, skipOnPublishSettings, micrositeSettings)
.settings(
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-dsl" % http4sV
// "org.tpolecat" %% "doobie-postgres" % doobieV,
// "org.tpolecat" %% "doobie-h2" % doobieV
)
)
.enablePlugins(MicrositesPlugin)
.enablePlugins(TutPlugin)
.dependsOn(coreJVM, http4s, /*doobie,*/ circeJVM)

val catsV = "1.4.0"
val catsEffectV = "1.0.0"
Expand Down
12 changes: 6 additions & 6 deletions modules/docs/src/main/tut/index.md
Expand Up @@ -30,9 +30,9 @@ import cats.effect.IO
// We place it in IO because this requires a Sync constraint
val create: IO[FUUID] = FUUID.randomFUUID[IO]
val fromString : Either[IllegalArgumentException, FUUID] = FUUID.fromString("d6faceab-4193-4508-86ca-e1561d38fea6")
val fromString : Either[Throwable, FUUID] = FUUID.fromString("d6faceab-4193-4508-86ca-e1561d38fea6")
val failsReferentiallyTransparently : Either[IllegalArgumentException, FUUID] = FUUID.fromString("Not a UUID")
val failsReferentiallyTransparently : Either[Throwable, FUUID] = FUUID.fromString("Not a UUID")
// For some syntax improvements
import cats.implicits._
Expand Down Expand Up @@ -101,7 +101,7 @@ val service: HttpService[IO] =
}
```

## Doobie Integration
## Doobie Integration - Not Implemented Now

To use fuuid to store UUID's using doobie, add to your `build.sbt`:

Expand All @@ -112,7 +112,7 @@ libraryDependencies += "io.chrisdavenport" %% "fuuid-doobie" % "<version>"
This dependency will provide a `Meta[FUUID]` which depends on `Meta[UUID]` to provide support for `FUUID`.
You will need to provide the instance of `Meta[UUID]` in scope. Firstly, we import:

```tut:book
```scala
import doobie._
import doobie.implicits._
import io.chrisdavenport.fuuid.doobie.implicits._
Expand All @@ -122,7 +122,7 @@ import io.chrisdavenport.fuuid.doobie.implicits._

An example of a query and an insert using this integration in Postgres.

```tut:book
```scala
// This importe will provide `Meta[UUID]` support for postgres
import doobie.postgres.implicits._

Expand All @@ -147,7 +147,7 @@ def insertId(fuuid: FUUID): Update0 = {

An example of a query and an insert using this integration in H2:

```tut:book
```scala
// This importe will provide `Meta[UUID]` support for h2
import doobie.h2.implicits._

Expand Down

0 comments on commit dd3c71c

Please sign in to comment.