Skip to content

Commit

Permalink
Merge pull request #23 from delimobil/dev
Browse files Browse the repository at this point in the history
0.1.0
  • Loading branch information
nikiforo authored Oct 10, 2021
2 parents 136008a + c48e278 commit 6660692
Show file tree
Hide file tree
Showing 31 changed files with 50 additions and 49 deletions.
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.8
6 changes: 3 additions & 3 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabbit
=============

[![Latest version](https://img.shields.io/badge/cabbit-0.0.17-orange.svg)](https://github.com/delimobil/cabbit)
[![Latest version](https://img.shields.io/badge/cabbit-0.1.0-orange.svg)](https://github.com/delimobil/cabbit)

A [cabbit] is a fictional hybrid between a cat and a rabbit.

Expand All @@ -25,12 +25,12 @@ Thus, you can choose from these artifacts:

For ce3 versions add this instruction to your build.sbt:
```sbt
libraryDependencies += "ru.delimobil" %% "cabbit" % "0.0.17"
libraryDependencies += "ru.delimobil" %% "cabbit" % "0.1.0"
```
For ce2 versions replace `cabbit` with `cabbit_ce2`.
To use circe encoders add this artifact to your build.sbt:
```sbt
libraryDependencies += "ru.delimobil" %% "cabbit-circe" % "0.0.17"
libraryDependencies += "ru.delimobil" %% "cabbit-circe" % "0.1.0"
```

## Teaser
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ val publishSettings = Seq(
)

val commonSettings = Seq(
version := "0.0.17",
version := "0.1.0",
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Seq("-source:3.0-migration")
case Some((2,13)) =>
Seq("-deprecation", "-Xfatal-warnings", "-target:jvm-1.8")
Seq("-deprecation", "-Xfatal-warnings")
case _ =>
Seq("-target:jvm-1.8")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ru.delimobil.cabbit
import cats.effect.kernel.Async
import com.rabbitmq.client.{ConnectionFactory => JConnectionFactory}
import javax.net.ssl.SSLContext
import ru.delimobil.cabbit.algebra.ConnectionFactory
import ru.delimobil.cabbit.api.ConnectionFactory
import ru.delimobil.cabbit.client.RabbitClientConnectionFactory
import ru.delimobil.cabbit.model.CabbitConfig

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

trait Channel[F[_]] extends ChannelDeclaration[F] with ChannelPublisher[F] with ChannelConsumer[F]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

import fs2.Stream

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

import cats.effect.Resource

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

import cats.effect.Resource
import com.rabbitmq.client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package ru.delimobil.cabbit.client

import cats.FlatMap
import fs2.Stream
import ru.delimobil.cabbit.algebra.Channel
import ru.delimobil.cabbit.algebra.ChannelOnPool
import ru.delimobil.cabbit.api.Channel
import ru.delimobil.cabbit.api.ChannelOnPool
import ru.delimobil.cabbit.client.poly.RabbitClientConsumerProvider

private[client] final class RabbitClientChannel[F[_]: FlatMap](
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import cats.effect.Resource
import cats.effect.kernel.Async
import com.rabbitmq.client
import fs2.Stream
import ru.delimobil.cabbit.algebra.Channel
import ru.delimobil.cabbit.algebra.ChannelConsumer
import ru.delimobil.cabbit.algebra.ChannelDeclaration
import ru.delimobil.cabbit.algebra.ChannelPublisher
import ru.delimobil.cabbit.algebra.Connection
import ru.delimobil.cabbit.api.Channel
import ru.delimobil.cabbit.api.ChannelConsumer
import ru.delimobil.cabbit.api.ChannelDeclaration
import ru.delimobil.cabbit.api.ChannelPublisher
import ru.delimobil.cabbit.api.Connection
import ru.delimobil.cabbit.ce.impl._
import ru.delimobil.cabbit.client.poly.RabbitClientConsumerProvider

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import cats.effect.kernel.Sync
import cats.syntax.functor._
import com.rabbitmq.client
import ru.delimobil.cabbit.CollectionConverters._
import ru.delimobil.cabbit.algebra.Connection
import ru.delimobil.cabbit.algebra.ConnectionFactory
import ru.delimobil.cabbit.api.Connection
import ru.delimobil.cabbit.api.ConnectionFactory
import ru.delimobil.cabbit.client.consumer.ChannelDeferredConsumerProvider

private[cabbit] final class RabbitClientConnectionFactory[F[_]: Async](
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

import ru.delimobil.cabbit.model.DeliveryTag

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

import com.rabbitmq.client.AMQP.Exchange
import com.rabbitmq.client.AMQP.Queue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

import com.rabbitmq.client

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

import com.rabbitmq.client.AMQP.BasicProperties
import ru.delimobil.cabbit.algebra.ChannelPublisher.MandatoryArgument
import ru.delimobil.cabbit.api.ChannelPublisher.MandatoryArgument
import ru.delimobil.cabbit.encoder.BodyEncoder
import ru.delimobil.cabbit.model.ExchangeName
import ru.delimobil.cabbit.model.QueueName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

trait ShutdownNotifier[F[_]] {
def isOpen: F[Boolean]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ru.delimobil.cabbit.algebra.poly
package ru.delimobil.cabbit.api.poly

import com.rabbitmq.client
import ru.delimobil.cabbit.algebra.ChannelAcker
import ru.delimobil.cabbit.api.ChannelAcker
import ru.delimobil.cabbit.model.ConsumerTag
import ru.delimobil.cabbit.model.QueueName

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ru.delimobil.cabbit.client
import cats.Functor
import cats.syntax.functor._
import com.rabbitmq.client
import ru.delimobil.cabbit.algebra.ChannelOnPool
import ru.delimobil.cabbit.api.ChannelOnPool
import ru.delimobil.cabbit.ce.api.Blocker
import ru.delimobil.cabbit.ce.api.Semaphore
import ru.delimobil.cabbit.ce.api.SemaphoreMake
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import cats.Monad
import cats.syntax.flatMap._
import cats.syntax.functor._
import com.rabbitmq.client
import ru.delimobil.cabbit.algebra.ChannelOnPool
import ru.delimobil.cabbit.api.ChannelOnPool
import ru.delimobil.cabbit.ce.api.Blocker
import ru.delimobil.cabbit.ce.api.SemaphoreMake

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import com.rabbitmq.client.AMQP.Exchange
import com.rabbitmq.client.AMQP.Queue
import com.rabbitmq.client.Method
import ru.delimobil.cabbit.CollectionConverters._
import ru.delimobil.cabbit.algebra.ChannelPublisher.MandatoryArgument
import ru.delimobil.cabbit.algebra._
import ru.delimobil.cabbit.algebra.poly.ChannelConsumer
import ru.delimobil.cabbit.api.ChannelPublisher.MandatoryArgument
import ru.delimobil.cabbit.api._
import ru.delimobil.cabbit.api.poly.ChannelConsumer
import ru.delimobil.cabbit.encoder.BodyEncoder
import ru.delimobil.cabbit.model.ConsumerTag
import ru.delimobil.cabbit.model.DeliveryTag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cats.effect.ConcurrentEffect
import cats.effect.ContextShift
import com.rabbitmq.client.{ConnectionFactory => JConnectionFactory}
import javax.net.ssl.SSLContext
import ru.delimobil.cabbit.algebra.ConnectionFactory
import ru.delimobil.cabbit.api.ConnectionFactory
import ru.delimobil.cabbit.client.RabbitClientConnectionFactory
import ru.delimobil.cabbit.model.CabbitConfig

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

trait Channel[F[_]] extends ChannelDeclaration[F] with ChannelPublisher[F] with ChannelConsumer[F]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

import fs2.Stream

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

import cats.effect.Resource

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.delimobil.cabbit.algebra
package ru.delimobil.cabbit.api

import cats.effect.Resource
import com.rabbitmq.client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package ru.delimobil.cabbit.client

import cats.FlatMap
import fs2.Stream
import ru.delimobil.cabbit.algebra.Channel
import ru.delimobil.cabbit.algebra.ChannelOnPool
import ru.delimobil.cabbit.api.Channel
import ru.delimobil.cabbit.api.ChannelOnPool
import ru.delimobil.cabbit.client.poly.RabbitClientConsumerProvider

private[client] final class RabbitClientChannel[F[_]: FlatMap](
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import cats.effect.Resource
import cats.effect.{Blocker => BlockerCE2}
import com.rabbitmq.client
import fs2.Stream
import ru.delimobil.cabbit.algebra.Channel
import ru.delimobil.cabbit.algebra.ChannelConsumer
import ru.delimobil.cabbit.algebra.ChannelDeclaration
import ru.delimobil.cabbit.algebra.ChannelPublisher
import ru.delimobil.cabbit.algebra.Connection
import ru.delimobil.cabbit.api.Channel
import ru.delimobil.cabbit.api.ChannelConsumer
import ru.delimobil.cabbit.api.ChannelDeclaration
import ru.delimobil.cabbit.api.ChannelPublisher
import ru.delimobil.cabbit.api.Connection
import ru.delimobil.cabbit.ce.impl._
import ru.delimobil.cabbit.client.poly.RabbitClientConsumerProvider

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import cats.effect.Resource
import cats.syntax.functor._
import com.rabbitmq.client
import fs2.Stream
import ru.delimobil.cabbit.algebra.Connection
import ru.delimobil.cabbit.algebra.ConnectionFactory
import ru.delimobil.cabbit.api.Connection
import ru.delimobil.cabbit.api.ConnectionFactory
import ru.delimobil.cabbit.client.consumer.QueueDeferredConsumerProvider
import ru.delimobil.cabbit.client.poly.RabbitClientConsumerProvider

Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/ru/delimobil/cabbit/CabbitSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import fs2.Stream
import org.scalatest.BeforeAndAfterAll
import org.scalatest.funsuite.AnyFunSuite
import ru.delimobil.cabbit.CollectionConverters._
import ru.delimobil.cabbit.algebra._
import ru.delimobil.cabbit.api._
import ru.delimobil.cabbit.model.ContentEncoding._
import ru.delimobil.cabbit.model.ExchangeName
import ru.delimobil.cabbit.model.QueueName
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/ru/delimobil/cabbit/RabbitContainer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import cats.effect.Resource
import cats.effect.Sync
import cats.syntax.functor._
import com.dimafeng.testcontainers.RabbitMQContainer
import ru.delimobil.cabbit.algebra.Connection
import ru.delimobil.cabbit.api.Connection
import ru.delimobil.cabbit.model.CabbitConfig.Host
import ru.delimobil.cabbit.model.CabbitConfig.Port
import ru.delimobil.cabbit.model.CabbitConfig
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/ru/delimobil/cabbit/RabbitUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import com.rabbitmq.client.AMQP.Queue
import com.rabbitmq.client.BuiltinExchangeType
import com.rabbitmq.client.Delivery
import fs2.Stream
import ru.delimobil.cabbit.algebra._
import ru.delimobil.cabbit.api._
import ru.delimobil.cabbit.model.ConsumerTag
import ru.delimobil.cabbit.model.ContentEncoding.decodeUtf8
import ru.delimobil.cabbit.model.ExchangeName
Expand Down

0 comments on commit 6660692

Please sign in to comment.