diff --git a/.scalafix.conf b/.scalafix.conf index 396315c6..a5198ed7 100644 --- a/.scalafix.conf +++ b/.scalafix.conf @@ -5,7 +5,7 @@ OrganizeImports { expandRelative = false groupExplicitlyImportedImplicitsSeparately = false groupedImports = AggressiveMerge - groups = ["re:javax?\\.", "scala.", "*", "com.velocidi."] + groups = ["re:javax?\\.", "scala.", "*", "com.kevel."] importSelectorsOrder = Ascii importsOrder = Ascii removeUnused = false diff --git a/README.md b/README.md index e7a79316..78d0fb39 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ The `LazyConfigFactory` object provides static methods for creating `Config` ins Apso provides a tiny wrapper for [Dispatch](http://dispatch.databinder.net/) with synchronous operations. It's called `W`, and the following shows some sample usage: ```scala -import com.velocidi.apso.http.W +import com.kevel.apso.http.W W.get("http://www.google.com/").getStatus // res0: Int = 302 @@ -110,7 +110,7 @@ The POST and PUT methods can also receive the body as `JSON` (of [circe](https:/ The `Geo` object provides methods to compute distances in kilometers between two points on the planet Earth, calculated using the spherical [law of cosines](https://en.wikipedia.org/wiki/Great-circle_distance#Formulas). Coordinates are represented by a pair of `Double` for latitude and longitude. ```scala -import com.velocidi.apso.Geo +import com.kevel.apso.Geo Geo.distance((41.1617609, -8.6024716), (41.1763745, -8.5964861)) // res2: Double = 1.7004440788845807 @@ -134,7 +134,7 @@ distFromOffice((38.7223032, -9.1414664)) Apso provides implicit conversions from `String`, `Seq[_]`, `Map[_, _]`, `Seq[Map[_, _]]` and `AutoCloseable` to extended types that come packed with extended features. ```scala -import com.velocidi.apso.Implicits._ +import com.kevel.apso.Implicits._ Seq(1, 3, 5).mergeSorted(Seq(2, 4)) // res6: Array[Int] = Array(1, 2, 3, 4, 5) @@ -179,7 +179,7 @@ rand.chooseN((0 to 15).toSeq, 4) The JreVersionHelper object provides helper methods to check the two most significant parts of the JRE version at runtime: ```scala -import com.velocidi.apso.JreVersionHelper +import com.kevel.apso.JreVersionHelper JreVersionHelper.jreVersion // res0: (Int, Int) = (1, 8) @@ -190,7 +190,7 @@ JreVersionHelper.jreVersion The `ProgressBar` represents a widget to print a dynamic progress bar in a console. ```scala -import com.velocidi.apso.ProgressBar +import com.kevel.apso.ProgressBar val progress = ProgressBar(100) @@ -218,17 +218,17 @@ progress.tick(30) The `Reflect` object contains helpers for reflection-related tasks, namely to create an instance of a given class given its fully qualified name and also to access singleton objects: ```scala -scala> import com.velocidi.apso.Reflect -import com.velocidi.apso.Reflect +scala> import com.kevel.apso.Reflect +import com.kevel.apso.Reflect -scala> import com.velocidi.apso.collection._ -import com.velocidi.apso.collection._ +scala> import com.kevel.apso.collection._ +import com.kevel.apso.collection._ -scala> Reflect.newInstance[HMap[Nothing]]("com.velocidi.apso.collection.HMap") -res0: com.velocidi.apso.collection.HMap[Nothing] = HMap() +scala> Reflect.newInstance[HMap[Nothing]]("com.kevel.apso.collection.HMap") +res0: com.kevel.apso.collection.HMap[Nothing] = HMap() -scala> Reflect.companion[Reflect.type]("com.velocidi.apso.Reflect") -res1: com.velocidi.apso.Reflect.type = com.velocidi.apso.Reflect$@3b1dbca +scala> Reflect.companion[Reflect.type]("com.kevel.apso.Reflect") +res1: com.kevel.apso.Reflect.type = com.kevel.apso.Reflect$@3b1dbca ``` ### Retry @@ -240,7 +240,7 @@ import scala.concurrent._ import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global -import com.velocidi.apso.Retry +import com.kevel.apso.Retry import java.util.concurrent.atomic.AtomicInteger @@ -315,7 +315,7 @@ libraryDependencies += "com.velocidi" %% "apso-aws" % "0.18.8" The `ConfigCredentialsProvider` is an `AWSCredentialsProvider` (from AWS SDK for Java) that retrieves credentials from a typesafe configuration, allowing customization of its `Config` object, as well as the access key and secret key paths: ```scala -import com.velocidi.apso.aws._ +import com.kevel.apso.aws._ import com.typesafe.config._ @@ -368,7 +368,7 @@ import scala.concurrent.ExecutionContext.Implicits.global import java.util.concurrent.atomic.AtomicInteger -import com.velocidi.apso.caching._ +import com.kevel.apso.caching._ val x = new AtomicInteger(0) // x: AtomicInteger = 2 @@ -416,7 +416,7 @@ libraryDependencies += "com.velocidi" %% "apso-collections" % "0.18.8" The `Trie` class is an implementation of an immutable trie. An example usage follows: ```scala -import com.velocidi.apso.collection._ +import com.kevel.apso.collection._ val t = Trie[Char, Int]() // t: Trie[Char, Int] = Trie(value = None, nodes = Map()) @@ -488,7 +488,7 @@ nt.get("five") The `TypedMap` is a map that associates types with values. It can be used as follows: ```scala -import com.velocidi.apso.collection._ +import com.kevel.apso.collection._ val m = TypedMap("one", 2, 3L) // m: TypedMap[Any] = Map(java.lang.String -> one, Int -> 2, Long -> 3) @@ -524,7 +524,7 @@ Apso provides some utility iterators. The `CircularIterator` is an iterator that iterates over its elements in a circular way. See the following for sample usage: ```scala -import com.velocidi.apso.iterator.CircularIterator +import com.kevel.apso.iterator.CircularIterator val circularIterator = CircularIterator(List(1, 2, 3).iterator) // circularIterator: CircularIterator[Int] = non-empty iterator @@ -538,7 +538,7 @@ circularIterator.take(10).toList The `MergedBufferedIterator` is a collection of sorted `BufferedIterators` that allows traversing them in order, while also providing a `mergeSorted` method to merge with another sorted `BufferedIterator`. See the following for sample usage: ```scala -import com.velocidi.apso.iterator.MergedBufferedIterator +import com.kevel.apso.iterator.MergedBufferedIterator val it1 = MergedBufferedIterator(List( (0 to 3).iterator.buffered, @@ -617,7 +617,7 @@ by loading a `KeyStore` file holding a symmetric key, and its use to encrypt and decrypt data: ```scala -import com.velocidi.apso.encryption._ +import com.kevel.apso.encryption._ val encryptor = Encryptor("AES", getClass.getResourceAsStream("/keystoreFile.jceks"), "keystorePass", "keyAlias", "keyPass") @@ -638,7 +638,7 @@ libraryDependencies += "com.velocidi" %% "apso-hashing" % "0.18.8" ``` ```scala -import com.velocidi.apso.hashing.Implicits._ +import com.kevel.apso.hashing.Implicits._ "abcd".md5 // res50: String = "e2fc714c4727ee9395f324cd2e7f331f" @@ -670,8 +670,8 @@ Apso introduces the concept of a `FileDescriptor`: a representation of a file st The `ResourceUtil` object provides methods to access files available through Java's runtime environment classpath: ```scala -import com.velocidi.apso.io.ResourceUtil -// import com.velocidi.apso.io.ResourceUtil +import com.kevel.apso.io.ResourceUtil +// import com.kevel.apso.io.ResourceUtil ResourceUtil.getResourceURL("reference.conf") // res0: String = /Users/jcazevedo/work/apso/apso/target/scala-2.11/classes/reference.conf @@ -712,7 +712,7 @@ The `ExtraJsonProtocol` object combines three traits that provide extra `Encoder The `json` package provides some implicits around [circe](https://circe.github.io/circe/)'s `Json` to unwrap JSON values, merge two `Json` and create `Json` from a sequence of dot-separated paths with the corresponding leaf values. It also provides methods to access and delete fields on the `Json` object. See the following for sample usage: ```scala -import com.velocidi.apso.circe.Implicits._ +import com.kevel.apso.circe.Implicits._ import io.circe.syntax._ import io.circe.Json @@ -790,7 +790,7 @@ js1.deleteField("x") The `JsonConvert` object contains helpers for converting between JSON values and other structures. See the following for sample usage: ```scala -import com.velocidi.apso.circe._ +import com.kevel.apso.circe._ JsonConvert.toJson("abcd") // res65: io.circe.Json = JString(value = "abcd") @@ -835,9 +835,9 @@ See the following sample usages: ```scala import com.github.nscala_time.time.Imports._ -import com.velocidi.apso.time._ +import com.kevel.apso.time._ -import com.velocidi.apso.time.Implicits._ +import com.kevel.apso.time.Implicits._ (new DateTime("2012-01-01") to new DateTime("2012-01-01")).toList // res69: List[DateTime] = List(2012-01-01T00:00:00.000Z) diff --git a/akka-http/src/main/scala/com/velocidi/apso/akka/http/ClientIPDirectives.scala b/akka-http/src/main/scala/com/velocidi/apso/akka/http/ClientIPDirectives.scala index 4cb811dd..363c3405 100644 --- a/akka-http/src/main/scala/com/velocidi/apso/akka/http/ClientIPDirectives.scala +++ b/akka-http/src/main/scala/com/velocidi/apso/akka/http/ClientIPDirectives.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.akka.http +package com.kevel.apso.akka.http import akka.http.scaladsl.model.RemoteAddress import akka.http.scaladsl.server.Directive1 diff --git a/akka-http/src/main/scala/com/velocidi/apso/akka/http/ExtraMiscDirectives.scala b/akka-http/src/main/scala/com/velocidi/apso/akka/http/ExtraMiscDirectives.scala index 1111158c..b42019c7 100644 --- a/akka-http/src/main/scala/com/velocidi/apso/akka/http/ExtraMiscDirectives.scala +++ b/akka-http/src/main/scala/com/velocidi/apso/akka/http/ExtraMiscDirectives.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.akka.http +package com.kevel.apso.akka.http import java.net.URI diff --git a/akka-http/src/main/scala/com/velocidi/apso/akka/http/ProxySupport.scala b/akka-http/src/main/scala/com/velocidi/apso/akka/http/ProxySupport.scala index e0a328f9..b3fbdfb2 100644 --- a/akka-http/src/main/scala/com/velocidi/apso/akka/http/ProxySupport.scala +++ b/akka-http/src/main/scala/com/velocidi/apso/akka/http/ProxySupport.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.akka.http +package com.kevel.apso.akka.http import scala.concurrent.duration.FiniteDuration import scala.concurrent.{Future, Promise} diff --git a/akka-http/src/test/scala/com/velocidi/apso/akka/http/ExtraMiscDirectivesSpec.scala b/akka-http/src/test/scala/com/velocidi/apso/akka/http/ExtraMiscDirectivesSpec.scala index aac34682..49d059e0 100644 --- a/akka-http/src/test/scala/com/velocidi/apso/akka/http/ExtraMiscDirectivesSpec.scala +++ b/akka-http/src/test/scala/com/velocidi/apso/akka/http/ExtraMiscDirectivesSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.akka.http +package com.kevel.apso.akka.http import scala.concurrent.duration._ diff --git a/akka-http/src/test/scala/com/velocidi/apso/akka/http/ProxySupportSpec.scala b/akka-http/src/test/scala/com/velocidi/apso/akka/http/ProxySupportSpec.scala index 14ef5dc2..fc82b31b 100644 --- a/akka-http/src/test/scala/com/velocidi/apso/akka/http/ProxySupportSpec.scala +++ b/akka-http/src/test/scala/com/velocidi/apso/akka/http/ProxySupportSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.akka.http +package com.kevel.apso.akka.http import java.net.InetAddress @@ -20,7 +20,7 @@ import org.specs2.concurrent.ExecutionEnv import org.specs2.mutable.Specification import org.specs2.specification.Scope -import com.velocidi.apso.NetUtils._ +import com.kevel.apso.NetUtils._ class ProxySupportSpec(implicit ee: ExecutionEnv) extends Specification with Specs2RouteTest with ProxySupport { diff --git a/akka/src/main/scala/com/velocidi/apso/NamedActorLogging.scala b/akka/src/main/scala/com/velocidi/apso/NamedActorLogging.scala index 97bcacac..3673e845 100644 --- a/akka/src/main/scala/com/velocidi/apso/NamedActorLogging.scala +++ b/akka/src/main/scala/com/velocidi/apso/NamedActorLogging.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import akka.actor.{Actor, ActorLogging} import akka.event.Logging diff --git a/aws/src/main/scala/com/velocidi/apso/aws/ConfigCredentialsProvider.scala b/aws/src/main/scala/com/velocidi/apso/aws/ConfigCredentialsProvider.scala index 6e20fa9a..eced4174 100644 --- a/aws/src/main/scala/com/velocidi/apso/aws/ConfigCredentialsProvider.scala +++ b/aws/src/main/scala/com/velocidi/apso/aws/ConfigCredentialsProvider.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.aws +package com.kevel.apso.aws import com.amazonaws.auth._ import com.typesafe.config.{Config, ConfigFactory} diff --git a/aws/src/main/scala/com/velocidi/apso/aws/CredentialStore.scala b/aws/src/main/scala/com/velocidi/apso/aws/CredentialStore.scala index 85990e7b..b2dbe9c6 100644 --- a/aws/src/main/scala/com/velocidi/apso/aws/CredentialStore.scala +++ b/aws/src/main/scala/com/velocidi/apso/aws/CredentialStore.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.aws +package com.kevel.apso.aws import com.amazonaws.auth._ diff --git a/aws/src/main/scala/com/velocidi/apso/aws/S3Bucket.scala b/aws/src/main/scala/com/velocidi/apso/aws/S3Bucket.scala index 84b91a9f..33fda8c8 100644 --- a/aws/src/main/scala/com/velocidi/apso/aws/S3Bucket.scala +++ b/aws/src/main/scala/com/velocidi/apso/aws/S3Bucket.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.aws +package com.kevel.apso.aws import java.io._ import java.util.concurrent.{Executors, ThreadFactory} @@ -15,7 +15,7 @@ import com.amazonaws.{AmazonClientException, AmazonServiceException, ClientConfi import com.typesafe.config.ConfigFactory import com.typesafe.scalalogging.LazyLogging -import com.velocidi.apso.aws.S3Bucket.S3ObjectDownloader +import com.kevel.apso.aws.S3Bucket.S3ObjectDownloader /** A representation of an Amazon's S3 bucket. This class wraps an `AmazonS3Client` and provides a higher level * interface for pushing and pulling files to and from a bucket. diff --git a/aws/src/main/scala/com/velocidi/apso/aws/SerializableAWSCredentials.scala b/aws/src/main/scala/com/velocidi/apso/aws/SerializableAWSCredentials.scala index 1f19d903..a02e2388 100644 --- a/aws/src/main/scala/com/velocidi/apso/aws/SerializableAWSCredentials.scala +++ b/aws/src/main/scala/com/velocidi/apso/aws/SerializableAWSCredentials.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.aws +package com.kevel.apso.aws import com.amazonaws.auth.{AWSCredentials, BasicAWSCredentials} diff --git a/aws/src/main/scala/com/velocidi/apso/aws/package.scala b/aws/src/main/scala/com/velocidi/apso/aws/package.scala index 8561c8bd..b07338e4 100644 --- a/aws/src/main/scala/com/velocidi/apso/aws/package.scala +++ b/aws/src/main/scala/com/velocidi/apso/aws/package.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso /** Wrappers around the AWS Java client libraries providing higher level interfaces. */ diff --git a/caching/src/main/boilerplate/com/velocidi/apso/caching/CachedFunctionsExtras.scala.template b/caching/src/main/boilerplate/com/velocidi/apso/caching/CachedFunctionsExtras.scala.template index 5f7345d2..75a8504e 100644 --- a/caching/src/main/boilerplate/com/velocidi/apso/caching/CachedFunctionsExtras.scala.template +++ b/caching/src/main/boilerplate/com/velocidi/apso/caching/CachedFunctionsExtras.scala.template @@ -1,4 +1,4 @@ -package com.velocidi.apso.caching +package com.kevel.apso.caching import scalacache.Id diff --git a/caching/src/main/boilerplate/com/velocidi/apso/caching/MemoizeFn.scala.template b/caching/src/main/boilerplate/com/velocidi/apso/caching/MemoizeFn.scala.template index 5a9de6fa..00020d19 100644 --- a/caching/src/main/boilerplate/com/velocidi/apso/caching/MemoizeFn.scala.template +++ b/caching/src/main/boilerplate/com/velocidi/apso/caching/MemoizeFn.scala.template @@ -1,4 +1,4 @@ -package com.velocidi.apso.caching +package com.kevel.apso.caching import scalacache._ import scalacache.memoization._ diff --git a/caching/src/main/scala/com/velocidi/apso/caching/Cache.scala b/caching/src/main/scala/com/velocidi/apso/caching/Cache.scala index 0cb9a721..91825400 100644 --- a/caching/src/main/scala/com/velocidi/apso/caching/Cache.scala +++ b/caching/src/main/scala/com/velocidi/apso/caching/Cache.scala @@ -17,7 +17,7 @@ // Copied from https://github.com/spray/spray/blob/master/spray-caching/src/main/scala/spray/caching/Cache.scala in // order to be compiled against Scala 2.12. -package com.velocidi.apso.caching +package com.kevel.apso.caching import scala.concurrent.{ExecutionContext, Future, Promise} import scala.util.Try diff --git a/caching/src/main/scala/com/velocidi/apso/caching/LruCache.scala b/caching/src/main/scala/com/velocidi/apso/caching/LruCache.scala index c24b0528..f00472ab 100644 --- a/caching/src/main/scala/com/velocidi/apso/caching/LruCache.scala +++ b/caching/src/main/scala/com/velocidi/apso/caching/LruCache.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.velocidi.apso.caching +package com.kevel.apso.caching import scala.annotation.tailrec import scala.concurrent.duration.Duration diff --git a/caching/src/main/scala/com/velocidi/apso/caching/ModeImpl.scala b/caching/src/main/scala/com/velocidi/apso/caching/ModeImpl.scala index 5ea9e992..fb49f9fd 100644 --- a/caching/src/main/scala/com/velocidi/apso/caching/ModeImpl.scala +++ b/caching/src/main/scala/com/velocidi/apso/caching/ModeImpl.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.caching +package com.kevel.apso.caching import scala.concurrent.{ExecutionContext, Future} diff --git a/caching/src/main/scala/com/velocidi/apso/caching/Timestamp.scala b/caching/src/main/scala/com/velocidi/apso/caching/Timestamp.scala index 7a2ac03c..9225a407 100644 --- a/caching/src/main/scala/com/velocidi/apso/caching/Timestamp.scala +++ b/caching/src/main/scala/com/velocidi/apso/caching/Timestamp.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.caching +package com.kevel.apso.caching import scala.concurrent.duration._ diff --git a/caching/src/main/scala/com/velocidi/apso/caching/config/Cache.scala b/caching/src/main/scala/com/velocidi/apso/caching/config/Cache.scala index fa6e3445..7afbc9bb 100644 --- a/caching/src/main/scala/com/velocidi/apso/caching/config/Cache.scala +++ b/caching/src/main/scala/com/velocidi/apso/caching/config/Cache.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.caching.config +package com.kevel.apso.caching.config import scala.concurrent.duration.FiniteDuration diff --git a/caching/src/main/scala/com/velocidi/apso/caching/package.scala b/caching/src/main/scala/com/velocidi/apso/caching/package.scala index a5e23bf8..edc56548 100644 --- a/caching/src/main/scala/com/velocidi/apso/caching/package.scala +++ b/caching/src/main/scala/com/velocidi/apso/caching/package.scala @@ -1,3 +1,3 @@ -package com.velocidi.apso +package com.kevel.apso package object caching extends CachedFunctionsExtras diff --git a/caching/src/test/boilerplate/com/velocidi/apso/caching/BaseMemoizeFnSpec.scala.template b/caching/src/test/boilerplate/com/velocidi/apso/caching/BaseMemoizeFnSpec.scala.template index 03923ebe..246235fd 100644 --- a/caching/src/test/boilerplate/com/velocidi/apso/caching/BaseMemoizeFnSpec.scala.template +++ b/caching/src/test/boilerplate/com/velocidi/apso/caching/BaseMemoizeFnSpec.scala.template @@ -1,4 +1,4 @@ -package com.velocidi.apso.caching +package com.kevel.apso.caching import java.util.concurrent.atomic.{AtomicBoolean, AtomicInteger} diff --git a/caching/src/test/scala/com/velocidi/apso/caching/ExpiringLruCacheSpec.scala b/caching/src/test/scala/com/velocidi/apso/caching/ExpiringLruCacheSpec.scala index 40e4025f..8fa21e2f 100644 --- a/caching/src/test/scala/com/velocidi/apso/caching/ExpiringLruCacheSpec.scala +++ b/caching/src/test/scala/com/velocidi/apso/caching/ExpiringLruCacheSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.velocidi.apso.caching +package com.kevel.apso.caching import java.util.Random import java.util.concurrent.CountDownLatch diff --git a/caching/src/test/scala/com/velocidi/apso/caching/SimpleLruCacheSpec.scala b/caching/src/test/scala/com/velocidi/apso/caching/SimpleLruCacheSpec.scala index 694fa060..6a231b65 100644 --- a/caching/src/test/scala/com/velocidi/apso/caching/SimpleLruCacheSpec.scala +++ b/caching/src/test/scala/com/velocidi/apso/caching/SimpleLruCacheSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.velocidi.apso.caching +package com.kevel.apso.caching import org.specs2.concurrent.ExecutionEnv import org.specs2.mutable.Specification diff --git a/circe/src/main/scala/com/velocidi/apso/circe/ExtraJsonProtocol.scala b/circe/src/main/scala/com/velocidi/apso/circe/ExtraJsonProtocol.scala index 612ee2f4..f1ce3bfc 100644 --- a/circe/src/main/scala/com/velocidi/apso/circe/ExtraJsonProtocol.scala +++ b/circe/src/main/scala/com/velocidi/apso/circe/ExtraJsonProtocol.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.circe +package com.kevel.apso.circe import java.net.URI @@ -13,7 +13,7 @@ import org.joda.time.format.ISODateTimeFormat import org.joda.time.{Duration => _, _} import squants.market.{Currency, MoneyContext} -import com.velocidi.apso.circe.syntax._ +import com.kevel.apso.circe.syntax._ /** Provides Encoders and Decoders for some relevant types. */ diff --git a/circe/src/main/scala/com/velocidi/apso/circe/Implicits.scala b/circe/src/main/scala/com/velocidi/apso/circe/Implicits.scala index 0af96392..79699b18 100644 --- a/circe/src/main/scala/com/velocidi/apso/circe/Implicits.scala +++ b/circe/src/main/scala/com/velocidi/apso/circe/Implicits.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.circe +package com.kevel.apso.circe import scala.util.Try diff --git a/circe/src/main/scala/com/velocidi/apso/circe/JsonConvert.scala b/circe/src/main/scala/com/velocidi/apso/circe/JsonConvert.scala index a86001e8..7922f131 100644 --- a/circe/src/main/scala/com/velocidi/apso/circe/JsonConvert.scala +++ b/circe/src/main/scala/com/velocidi/apso/circe/JsonConvert.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.circe +package com.kevel.apso.circe import scala.collection.compat._ import scala.jdk.CollectionConverters._ diff --git a/circe/src/main/scala/com/velocidi/apso/circe/package.scala b/circe/src/main/scala/com/velocidi/apso/circe/package.scala index 449d2d7f..9e629e09 100644 --- a/circe/src/main/scala/com/velocidi/apso/circe/package.scala +++ b/circe/src/main/scala/com/velocidi/apso/circe/package.scala @@ -1,4 +1,4 @@ -package com.velocidi.circe +package com.kevel.circe /** Provides utility classes and methods related to [[io.circe.Json]] handling. */ diff --git a/circe/src/main/scala/com/velocidi/apso/circe/syntax/package.scala b/circe/src/main/scala/com/velocidi/apso/circe/syntax/package.scala index 9ef46c9e..d7a13fbe 100644 --- a/circe/src/main/scala/com/velocidi/apso/circe/syntax/package.scala +++ b/circe/src/main/scala/com/velocidi/apso/circe/syntax/package.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.circe +package com.kevel.apso.circe import scala.util.Try diff --git a/circe/src/test/scala/com/velocidi/apso/circe/ExtraJsonProtocolSpec.scala b/circe/src/test/scala/com/velocidi/apso/circe/ExtraJsonProtocolSpec.scala index 67897653..b85c08fc 100644 --- a/circe/src/test/scala/com/velocidi/apso/circe/ExtraJsonProtocolSpec.scala +++ b/circe/src/test/scala/com/velocidi/apso/circe/ExtraJsonProtocolSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.circe +package com.kevel.apso.circe import java.net.URI diff --git a/circe/src/test/scala/com/velocidi/apso/circe/ImplicitsSpec.scala b/circe/src/test/scala/com/velocidi/apso/circe/ImplicitsSpec.scala index 2a9e26d5..254efea7 100644 --- a/circe/src/test/scala/com/velocidi/apso/circe/ImplicitsSpec.scala +++ b/circe/src/test/scala/com/velocidi/apso/circe/ImplicitsSpec.scala @@ -1,11 +1,11 @@ -package com.velocidi.apso.circe +package com.kevel.apso.circe import io.circe.generic.semiauto._ import io.circe.literal._ import io.circe.syntax._ import org.specs2.mutable.Specification -import com.velocidi.apso.circe.Implicits._ +import com.kevel.apso.circe.Implicits._ class ImplicitsSpec extends Specification { "The Apso Json Implicits should" should { diff --git a/circe/src/test/scala/com/velocidi/apso/circe/JsonConvertSpec.scala b/circe/src/test/scala/com/velocidi/apso/circe/JsonConvertSpec.scala index d373dd1c..1dd421a8 100644 --- a/circe/src/test/scala/com/velocidi/apso/circe/JsonConvertSpec.scala +++ b/circe/src/test/scala/com/velocidi/apso/circe/JsonConvertSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.circe +package com.kevel.apso.circe import scala.jdk.CollectionConverters._ diff --git a/circe/src/test/scala/com/velocidi/apso/circe/syntax/ExtensionMethodsSpec.scala b/circe/src/test/scala/com/velocidi/apso/circe/syntax/ExtensionMethodsSpec.scala index ee3da518..4a009241 100644 --- a/circe/src/test/scala/com/velocidi/apso/circe/syntax/ExtensionMethodsSpec.scala +++ b/circe/src/test/scala/com/velocidi/apso/circe/syntax/ExtensionMethodsSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.circe.syntax +package com.kevel.apso.circe.syntax import scala.util.{Failure, Success} diff --git a/collections/src/main/scala/com/velocidi/apso/collection/DeboxMap.scala b/collections/src/main/scala/com/velocidi/apso/collection/DeboxMap.scala index 5d4ca642..6c7b452a 100644 --- a/collections/src/main/scala/com/velocidi/apso/collection/DeboxMap.scala +++ b/collections/src/main/scala/com/velocidi/apso/collection/DeboxMap.scala @@ -17,7 +17,7 @@ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.velocidi.apso.collection +package com.kevel.apso.collection import scala.annotation.tailrec import scala.reflect.ClassTag diff --git a/collections/src/main/scala/com/velocidi/apso/collection/Trie.scala b/collections/src/main/scala/com/velocidi/apso/collection/Trie.scala index 99b7d29f..87072bd6 100644 --- a/collections/src/main/scala/com/velocidi/apso/collection/Trie.scala +++ b/collections/src/main/scala/com/velocidi/apso/collection/Trie.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.collection +package com.kevel.apso.collection /** An immutable implementation of a Trie (https://en.wikipedia.org/wiki/Trie). * diff --git a/collections/src/main/scala/com/velocidi/apso/collection/TypedMap.scala b/collections/src/main/scala/com/velocidi/apso/collection/TypedMap.scala index a5164e5e..0d2bdc1d 100644 --- a/collections/src/main/scala/com/velocidi/apso/collection/TypedMap.scala +++ b/collections/src/main/scala/com/velocidi/apso/collection/TypedMap.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.collection +package com.kevel.apso.collection import scala.reflect.ClassTag diff --git a/collections/src/main/scala/com/velocidi/apso/collection/package.scala b/collections/src/main/scala/com/velocidi/apso/collection/package.scala index c68e6e2c..b54a2a5e 100644 --- a/collections/src/main/scala/com/velocidi/apso/collection/package.scala +++ b/collections/src/main/scala/com/velocidi/apso/collection/package.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso /** Provides new types of collections and utility classes and methods for handling and extending existing ones. */ diff --git a/collections/src/main/scala/com/velocidi/apso/iterator/CircularIterator.scala b/collections/src/main/scala/com/velocidi/apso/iterator/CircularIterator.scala index 765272f0..3cecd52f 100644 --- a/collections/src/main/scala/com/velocidi/apso/iterator/CircularIterator.scala +++ b/collections/src/main/scala/com/velocidi/apso/iterator/CircularIterator.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.iterator +package com.kevel.apso.iterator /** A wrapper around an iterator that iterates over its elements in a circular way. * @param it diff --git a/collections/src/main/scala/com/velocidi/apso/iterator/CompositeIterator.scala b/collections/src/main/scala/com/velocidi/apso/iterator/CompositeIterator.scala index 38f5513e..fadfadab 100644 --- a/collections/src/main/scala/com/velocidi/apso/iterator/CompositeIterator.scala +++ b/collections/src/main/scala/com/velocidi/apso/iterator/CompositeIterator.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.iterator +package com.kevel.apso.iterator import scala.collection.{AbstractIterator, BufferedIterator, Iterator} diff --git a/collections/src/main/scala/com/velocidi/apso/iterator/Implicits.scala b/collections/src/main/scala/com/velocidi/apso/iterator/Implicits.scala index ff7ea5d5..76dda7c1 100644 --- a/collections/src/main/scala/com/velocidi/apso/iterator/Implicits.scala +++ b/collections/src/main/scala/com/velocidi/apso/iterator/Implicits.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.iterator +package com.kevel.apso.iterator import scala.collection.BufferedIterator diff --git a/collections/src/main/scala/com/velocidi/apso/iterator/MergedBufferedIterator.scala b/collections/src/main/scala/com/velocidi/apso/iterator/MergedBufferedIterator.scala index a2f73b90..4c86c075 100644 --- a/collections/src/main/scala/com/velocidi/apso/iterator/MergedBufferedIterator.scala +++ b/collections/src/main/scala/com/velocidi/apso/iterator/MergedBufferedIterator.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.iterator +package com.kevel.apso.iterator import scala.collection.BufferedIterator import scala.collection.mutable.PriorityQueue diff --git a/collections/src/main/scala/com/velocidi/apso/iterator/package.scala b/collections/src/main/scala/com/velocidi/apso/iterator/package.scala index fb590297..8f693c46 100644 --- a/collections/src/main/scala/com/velocidi/apso/iterator/package.scala +++ b/collections/src/main/scala/com/velocidi/apso/iterator/package.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso /** Provides new types of iterators and utility classes and methods for handling and extending existing ones. */ diff --git a/collections/src/test/scala/com/velocidi/apso/collection/DeboxMapSpec.scala b/collections/src/test/scala/com/velocidi/apso/collection/DeboxMapSpec.scala index 631e9a1c..5bff133e 100644 --- a/collections/src/test/scala/com/velocidi/apso/collection/DeboxMapSpec.scala +++ b/collections/src/test/scala/com/velocidi/apso/collection/DeboxMapSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.collection +package com.kevel.apso.collection import scala.reflect.ClassTag diff --git a/collections/src/test/scala/com/velocidi/apso/collection/TrieSpec.scala b/collections/src/test/scala/com/velocidi/apso/collection/TrieSpec.scala index 93b630e7..81e9e7ba 100644 --- a/collections/src/test/scala/com/velocidi/apso/collection/TrieSpec.scala +++ b/collections/src/test/scala/com/velocidi/apso/collection/TrieSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.collection +package com.kevel.apso.collection import org.specs2.matcher.MatchResult import org.specs2.mutable._ diff --git a/collections/src/test/scala/com/velocidi/apso/collection/TypedMapSpec.scala b/collections/src/test/scala/com/velocidi/apso/collection/TypedMapSpec.scala index b13e8067..dd56ab40 100644 --- a/collections/src/test/scala/com/velocidi/apso/collection/TypedMapSpec.scala +++ b/collections/src/test/scala/com/velocidi/apso/collection/TypedMapSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.collection +package com.kevel.apso.collection import org.specs2.matcher.Matcher import org.specs2.mutable._ diff --git a/collections/src/test/scala/com/velocidi/apso/iterator/CircularIteratorSpec.scala b/collections/src/test/scala/com/velocidi/apso/iterator/CircularIteratorSpec.scala index cd014f98..225f1518 100644 --- a/collections/src/test/scala/com/velocidi/apso/iterator/CircularIteratorSpec.scala +++ b/collections/src/test/scala/com/velocidi/apso/iterator/CircularIteratorSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.iterator +package com.kevel.apso.iterator import org.specs2.mutable._ diff --git a/collections/src/test/scala/com/velocidi/apso/iterator/CompositeIteratorSpec.scala b/collections/src/test/scala/com/velocidi/apso/iterator/CompositeIteratorSpec.scala index c9366333..f4fff3f5 100644 --- a/collections/src/test/scala/com/velocidi/apso/iterator/CompositeIteratorSpec.scala +++ b/collections/src/test/scala/com/velocidi/apso/iterator/CompositeIteratorSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.iterator +package com.kevel.apso.iterator import org.specs2.mutable._ diff --git a/collections/src/test/scala/com/velocidi/apso/iterator/ImplicitsSpec.scala b/collections/src/test/scala/com/velocidi/apso/iterator/ImplicitsSpec.scala index f6580bda..a37f8f79 100644 --- a/collections/src/test/scala/com/velocidi/apso/iterator/ImplicitsSpec.scala +++ b/collections/src/test/scala/com/velocidi/apso/iterator/ImplicitsSpec.scala @@ -1,10 +1,10 @@ -package com.velocidi.apso.iterator +package com.kevel.apso.iterator import scala.collection.compat.immutable.LazyList import org.specs2.mutable._ -import com.velocidi.apso.iterator.Implicits._ +import com.kevel.apso.iterator.Implicits._ class ImplicitsSpec extends Specification { "An ApsoBufferedIterator" should { diff --git a/core/src/main/scala/com/velocidi/apso/Geo.scala b/core/src/main/scala/com/velocidi/apso/Geo.scala index 9ef3ffb1..670a0b8c 100644 --- a/core/src/main/scala/com/velocidi/apso/Geo.scala +++ b/core/src/main/scala/com/velocidi/apso/Geo.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import scala.math.{abs, acos, cos, sin, toRadians} diff --git a/core/src/main/scala/com/velocidi/apso/Implicits.scala b/core/src/main/scala/com/velocidi/apso/Implicits.scala index b7b76b38..f1fa49ad 100644 --- a/core/src/main/scala/com/velocidi/apso/Implicits.scala +++ b/core/src/main/scala/com/velocidi/apso/Implicits.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import scala.annotation.tailrec import scala.collection.compat._ diff --git a/core/src/main/scala/com/velocidi/apso/JreVersionHelper.scala b/core/src/main/scala/com/velocidi/apso/JreVersionHelper.scala index bd08f7b9..5f81fe25 100644 --- a/core/src/main/scala/com/velocidi/apso/JreVersionHelper.scala +++ b/core/src/main/scala/com/velocidi/apso/JreVersionHelper.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import JreVersionHelper._ diff --git a/core/src/main/scala/com/velocidi/apso/NetUtils.scala b/core/src/main/scala/com/velocidi/apso/NetUtils.scala index cca04285..c1c44f98 100644 --- a/core/src/main/scala/com/velocidi/apso/NetUtils.scala +++ b/core/src/main/scala/com/velocidi/apso/NetUtils.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import java.net.ServerSocket diff --git a/core/src/main/scala/com/velocidi/apso/ProgressBar.scala b/core/src/main/scala/com/velocidi/apso/ProgressBar.scala index 59427d4a..d26a25aa 100644 --- a/core/src/main/scala/com/velocidi/apso/ProgressBar.scala +++ b/core/src/main/scala/com/velocidi/apso/ProgressBar.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso /** A widget for printing a dynamic progress bar in a console. * @param total diff --git a/core/src/main/scala/com/velocidi/apso/Reflect.scala b/core/src/main/scala/com/velocidi/apso/Reflect.scala index 844cb207..111504df 100644 --- a/core/src/main/scala/com/velocidi/apso/Reflect.scala +++ b/core/src/main/scala/com/velocidi/apso/Reflect.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso /** Object containing reflection-related helpers. */ diff --git a/core/src/main/scala/com/velocidi/apso/Retry.scala b/core/src/main/scala/com/velocidi/apso/Retry.scala index 3e26c922..d3570d74 100644 --- a/core/src/main/scala/com/velocidi/apso/Retry.scala +++ b/core/src/main/scala/com/velocidi/apso/Retry.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import scala.concurrent.duration._ import scala.concurrent.{ExecutionContext, Future, blocking} diff --git a/core/src/main/scala/com/velocidi/apso/config/LazyConfigFactory.scala b/core/src/main/scala/com/velocidi/apso/config/LazyConfigFactory.scala index d883a927..df0ce16e 100644 --- a/core/src/main/scala/com/velocidi/apso/config/LazyConfigFactory.scala +++ b/core/src/main/scala/com/velocidi/apso/config/LazyConfigFactory.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.config +package com.kevel.apso.config import java.io.File import java.net.{MalformedURLException, URI} diff --git a/core/src/main/scala/com/velocidi/apso/http/W.scala b/core/src/main/scala/com/velocidi/apso/http/W.scala index 62cef9d5..6fabe7a8 100644 --- a/core/src/main/scala/com/velocidi/apso/http/W.scala +++ b/core/src/main/scala/com/velocidi/apso/http/W.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.http +package com.kevel.apso.http import scala.concurrent.duration._ diff --git a/core/src/main/scala/com/velocidi/apso/package.scala b/core/src/main/scala/com/velocidi/apso/package.scala index 2567b854..dcd08751 100644 --- a/core/src/main/scala/com/velocidi/apso/package.scala +++ b/core/src/main/scala/com/velocidi/apso/package.scala @@ -1,4 +1,4 @@ -package com.velocidi +package com.kevel /** Contains ShiftForward's general-purpose utility classes and methods, as well as extensions of existing ones. */ diff --git a/core/src/test/scala/com/velocidi/apso/GeoSpec.scala b/core/src/test/scala/com/velocidi/apso/GeoSpec.scala index 3d416a99..8e2bc341 100644 --- a/core/src/test/scala/com/velocidi/apso/GeoSpec.scala +++ b/core/src/test/scala/com/velocidi/apso/GeoSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import org.specs2.mutable.Specification diff --git a/core/src/test/scala/com/velocidi/apso/ImplicitsSpec.scala b/core/src/test/scala/com/velocidi/apso/ImplicitsSpec.scala index 6f225e2c..1b827d2b 100644 --- a/core/src/test/scala/com/velocidi/apso/ImplicitsSpec.scala +++ b/core/src/test/scala/com/velocidi/apso/ImplicitsSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import scala.collection.compat._ import scala.util.Random @@ -6,7 +6,7 @@ import scala.util.Random import org.specs2.ScalaCheck import org.specs2.mutable._ -import com.velocidi.apso.Implicits._ +import com.kevel.apso.Implicits._ class ImplicitsSpec extends Specification with ScalaCheck with FutureExtraMatchers { diff --git a/core/src/test/scala/com/velocidi/apso/JreVersionHelperSpec.scala b/core/src/test/scala/com/velocidi/apso/JreVersionHelperSpec.scala index 3466106c..65bb78a6 100644 --- a/core/src/test/scala/com/velocidi/apso/JreVersionHelperSpec.scala +++ b/core/src/test/scala/com/velocidi/apso/JreVersionHelperSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import org.specs2.matcher.ResultMatchers import org.specs2.mutable.Specification diff --git a/core/src/test/scala/com/velocidi/apso/RetrySpec.scala b/core/src/test/scala/com/velocidi/apso/RetrySpec.scala index ba114572..f320cd29 100644 --- a/core/src/test/scala/com/velocidi/apso/RetrySpec.scala +++ b/core/src/test/scala/com/velocidi/apso/RetrySpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import scala.concurrent.Future import scala.util.Failure diff --git a/core/src/test/scala/com/velocidi/apso/config/LazyConfigFactorySpec.scala b/core/src/test/scala/com/velocidi/apso/config/LazyConfigFactorySpec.scala index 900ea9d7..b546050e 100644 --- a/core/src/test/scala/com/velocidi/apso/config/LazyConfigFactorySpec.scala +++ b/core/src/test/scala/com/velocidi/apso/config/LazyConfigFactorySpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.config +package com.kevel.apso.config import org.specs2.mutable.Specification diff --git a/docs/README.md b/docs/README.md index 2448ef88..53e74ee5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -85,7 +85,7 @@ The `LazyConfigFactory` object provides static methods for creating `Config` ins Apso provides a tiny wrapper for [Dispatch](http://dispatch.databinder.net/) with synchronous operations. It's called `W`, and the following shows some sample usage: ```scala mdoc:compile-only -import com.velocidi.apso.http.W +import com.kevel.apso.http.W W.get("http://www.google.com/").getStatus // res0: Int = 302 @@ -110,7 +110,7 @@ The POST and PUT methods can also receive the body as `JSON` (of [circe](https:/ The `Geo` object provides methods to compute distances in kilometers between two points on the planet Earth, calculated using the spherical [law of cosines](https://en.wikipedia.org/wiki/Great-circle_distance#Formulas). Coordinates are represented by a pair of `Double` for latitude and longitude. ```scala mdoc:reset -import com.velocidi.apso.Geo +import com.kevel.apso.Geo Geo.distance((41.1617609, -8.6024716), (41.1763745, -8.5964861)) ``` @@ -131,7 +131,7 @@ distFromOffice((38.7223032, -9.1414664)) Apso provides implicit conversions from `String`, `Seq[_]`, `Map[_, _]`, `Seq[Map[_, _]]` and `AutoCloseable` to extended types that come packed with extended features. ```scala mdoc:reset -import com.velocidi.apso.Implicits._ +import com.kevel.apso.Implicits._ Seq(1, 3, 5).mergeSorted(Seq(2, 4)) @@ -166,7 +166,7 @@ rand.chooseN((0 to 15).toSeq, 4) The JreVersionHelper object provides helper methods to check the two most significant parts of the JRE version at runtime: ```scala mdoc:compile-only -import com.velocidi.apso.JreVersionHelper +import com.kevel.apso.JreVersionHelper JreVersionHelper.jreVersion // res0: (Int, Int) = (1, 8) @@ -177,7 +177,7 @@ JreVersionHelper.jreVersion The `ProgressBar` represents a widget to print a dynamic progress bar in a console. ```scala mdoc:compile-only -import com.velocidi.apso.ProgressBar +import com.kevel.apso.ProgressBar val progress = ProgressBar(100) @@ -205,17 +205,17 @@ progress.tick(30) The `Reflect` object contains helpers for reflection-related tasks, namely to create an instance of a given class given its fully qualified name and also to access singleton objects: ```scala -scala> import com.velocidi.apso.Reflect -import com.velocidi.apso.Reflect +scala> import com.kevel.apso.Reflect +import com.kevel.apso.Reflect -scala> import com.velocidi.apso.collection._ -import com.velocidi.apso.collection._ +scala> import com.kevel.apso.collection._ +import com.kevel.apso.collection._ -scala> Reflect.newInstance[HMap[Nothing]]("com.velocidi.apso.collection.HMap") -res0: com.velocidi.apso.collection.HMap[Nothing] = HMap() +scala> Reflect.newInstance[HMap[Nothing]]("com.kevel.apso.collection.HMap") +res0: com.kevel.apso.collection.HMap[Nothing] = HMap() -scala> Reflect.companion[Reflect.type]("com.velocidi.apso.Reflect") -res1: com.velocidi.apso.Reflect.type = com.velocidi.apso.Reflect$@3b1dbca +scala> Reflect.companion[Reflect.type]("com.kevel.apso.Reflect") +res1: com.kevel.apso.Reflect.type = com.kevel.apso.Reflect$@3b1dbca ``` ### Retry @@ -227,7 +227,7 @@ import scala.concurrent._ import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global -import com.velocidi.apso.Retry +import com.kevel.apso.Retry import java.util.concurrent.atomic.AtomicInteger @@ -298,7 +298,7 @@ libraryDependencies += "com.velocidi" %% "apso-aws" % "@VERSION@" The `ConfigCredentialsProvider` is an `AWSCredentialsProvider` (from AWS SDK for Java) that retrieves credentials from a typesafe configuration, allowing customization of its `Config` object, as well as the access key and secret key paths: ```scala mdoc:silent -import com.velocidi.apso.aws._ +import com.kevel.apso.aws._ import com.typesafe.config._ @@ -351,7 +351,7 @@ import scala.concurrent.ExecutionContext.Implicits.global import java.util.concurrent.atomic.AtomicInteger -import com.velocidi.apso.caching._ +import com.kevel.apso.caching._ val x = new AtomicInteger(0) @@ -389,7 +389,7 @@ libraryDependencies += "com.velocidi" %% "apso-collections" % "@VERSION@" The `Trie` class is an implementation of an immutable trie. An example usage follows: ```scala mdoc:reset -import com.velocidi.apso.collection._ +import com.kevel.apso.collection._ val t = Trie[Char, Int]() @@ -407,7 +407,7 @@ nt.get("five") The `TypedMap` is a map that associates types with values. It can be used as follows: ```scala mdoc:reset -import com.velocidi.apso.collection._ +import com.kevel.apso.collection._ val m = TypedMap("one", 2, 3L) @@ -435,7 +435,7 @@ Apso provides some utility iterators. The `CircularIterator` is an iterator that iterates over its elements in a circular way. See the following for sample usage: ```scala mdoc:reset -import com.velocidi.apso.iterator.CircularIterator +import com.kevel.apso.iterator.CircularIterator val circularIterator = CircularIterator(List(1, 2, 3).iterator) @@ -447,7 +447,7 @@ circularIterator.take(10).toList The `MergedBufferedIterator` is a collection of sorted `BufferedIterators` that allows traversing them in order, while also providing a `mergeSorted` method to merge with another sorted `BufferedIterator`. See the following for sample usage: ```scala mdoc:reset -import com.velocidi.apso.iterator.MergedBufferedIterator +import com.kevel.apso.iterator.MergedBufferedIterator val it1 = MergedBufferedIterator(List( (0 to 3).iterator.buffered, @@ -480,7 +480,7 @@ by loading a `KeyStore` file holding a symmetric key, and its use to encrypt and decrypt data: ```scala mdoc:compile-only -import com.velocidi.apso.encryption._ +import com.kevel.apso.encryption._ val encryptor = Encryptor("AES", getClass.getResourceAsStream("/keystoreFile.jceks"), "keystorePass", "keyAlias", "keyPass") @@ -502,7 +502,7 @@ libraryDependencies += "com.velocidi" %% "apso-hashing" % "@VERSION@" ``` ```scala mdoc:reset -import com.velocidi.apso.hashing.Implicits._ +import com.kevel.apso.hashing.Implicits._ "abcd".md5 @@ -532,8 +532,8 @@ Apso introduces the concept of a `FileDescriptor`: a representation of a file st The `ResourceUtil` object provides methods to access files available through Java's runtime environment classpath: ```scala mdoc:compile-only -import com.velocidi.apso.io.ResourceUtil -// import com.velocidi.apso.io.ResourceUtil +import com.kevel.apso.io.ResourceUtil +// import com.kevel.apso.io.ResourceUtil ResourceUtil.getResourceURL("reference.conf") // res0: String = /Users/jcazevedo/work/apso/apso/target/scala-2.11/classes/reference.conf @@ -574,7 +574,7 @@ The `ExtraJsonProtocol` object combines three traits that provide extra `Encoder The `json` package provides some implicits around [circe](https://circe.github.io/circe/)'s `Json` to unwrap JSON values, merge two `Json` and create `Json` from a sequence of dot-separated paths with the corresponding leaf values. It also provides methods to access and delete fields on the `Json` object. See the following for sample usage: ```scala mdoc:reset:silent -import com.velocidi.apso.circe.Implicits._ +import com.kevel.apso.circe.Implicits._ import io.circe.syntax._ import io.circe.Json @@ -612,7 +612,7 @@ js1.deleteField("x") The `JsonConvert` object contains helpers for converting between JSON values and other structures. See the following for sample usage: ```scala mdoc:reset -import com.velocidi.apso.circe._ +import com.kevel.apso.circe._ JsonConvert.toJson("abcd") @@ -654,9 +654,9 @@ See the following sample usages: ```scala mdoc:reset import com.github.nscala_time.time.Imports._ -import com.velocidi.apso.time._ +import com.kevel.apso.time._ -import com.velocidi.apso.time.Implicits._ +import com.kevel.apso.time.Implicits._ (new DateTime("2012-01-01") to new DateTime("2012-01-01")).toList diff --git a/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchBulkInserter.scala b/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchBulkInserter.scala index 9693493e..a5c71f25 100644 --- a/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchBulkInserter.scala +++ b/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchBulkInserter.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.elasticsearch.pekko +package com.kevel.apso.elasticsearch.pekko import scala.collection.mutable import scala.concurrent.duration._ diff --git a/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchUtil.scala b/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchUtil.scala index 5593e7b6..45e20665 100644 --- a/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchUtil.scala +++ b/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchUtil.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.elasticsearch.pekko +package com.kevel.apso.elasticsearch.pekko import com.sksamuel.elastic4s.ElasticClient import com.sksamuel.elastic4s.http.JavaClient diff --git a/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/config/Elasticsearch.scala b/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/config/Elasticsearch.scala index d282d786..7c4460db 100644 --- a/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/config/Elasticsearch.scala +++ b/elasticsearch-pekko/src/main/scala/com/velocidi/apso/elasticsearch/pekko/config/Elasticsearch.scala @@ -1,8 +1,8 @@ -package com.velocidi.apso.elasticsearch.pekko.config +package com.kevel.apso.elasticsearch.pekko.config import scala.concurrent.duration._ -import com.velocidi.apso.elasticsearch.pekko.config.Elasticsearch.BulkInserter +import com.kevel.apso.elasticsearch.pekko.config.Elasticsearch.BulkInserter case class Elasticsearch( host: String, diff --git a/elasticsearch-pekko/src/test/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchBulkInserterSpec.scala b/elasticsearch-pekko/src/test/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchBulkInserterSpec.scala index cf94c795..43462e0d 100644 --- a/elasticsearch-pekko/src/test/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchBulkInserterSpec.scala +++ b/elasticsearch-pekko/src/test/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchBulkInserterSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.elasticsearch.pekko +package com.kevel.apso.elasticsearch.pekko import scala.concurrent.duration._ @@ -13,8 +13,8 @@ import org.specs2.concurrent.ExecutionEnv import org.specs2.matcher.Matcher import org.specs2.mutable.SpecificationLike -import com.velocidi.apso.elasticsearch.pekko.ElasticsearchBulkInserter.Insert -import com.velocidi.apso.elasticsearch.pekko.config.Elasticsearch +import com.kevel.apso.elasticsearch.pekko.ElasticsearchBulkInserter.Insert +import com.kevel.apso.elasticsearch.pekko.config.Elasticsearch class ElasticsearchBulkInserterSpec(implicit ee: ExecutionEnv) extends TestKit(ActorSystem("es-bulk-inserter-test")) diff --git a/elasticsearch-pekko/src/test/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchTestkit.scala b/elasticsearch-pekko/src/test/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchTestkit.scala index 17fecf42..9b1663a6 100644 --- a/elasticsearch-pekko/src/test/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchTestkit.scala +++ b/elasticsearch-pekko/src/test/scala/com/velocidi/apso/elasticsearch/pekko/ElasticsearchTestkit.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.elasticsearch.pekko +package com.kevel.apso.elasticsearch.pekko import java.nio.file.Files diff --git a/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/ElasticsearchBulkInserter.scala b/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/ElasticsearchBulkInserter.scala index bfae2b10..6fd4fad1 100644 --- a/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/ElasticsearchBulkInserter.scala +++ b/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/ElasticsearchBulkInserter.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.elasticsearch +package com.kevel.apso.elasticsearch import scala.collection.mutable import scala.concurrent.duration._ diff --git a/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/ElasticsearchUtil.scala b/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/ElasticsearchUtil.scala index 38f5b75b..a10dff11 100644 --- a/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/ElasticsearchUtil.scala +++ b/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/ElasticsearchUtil.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.elasticsearch +package com.kevel.apso.elasticsearch import com.sksamuel.elastic4s.ElasticClient import com.sksamuel.elastic4s.http.JavaClient diff --git a/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/config/Elasticsearch.scala b/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/config/Elasticsearch.scala index ebb846db..a1d4973b 100644 --- a/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/config/Elasticsearch.scala +++ b/elasticsearch/src/main/scala/com/velocidi/apso/elasticsearch/config/Elasticsearch.scala @@ -1,8 +1,8 @@ -package com.velocidi.apso.elasticsearch.config +package com.kevel.apso.elasticsearch.config import scala.concurrent.duration._ -import com.velocidi.apso.elasticsearch.config.Elasticsearch.BulkInserter +import com.kevel.apso.elasticsearch.config.Elasticsearch.BulkInserter case class Elasticsearch( host: String, diff --git a/elasticsearch/src/test/scala/com/velocidi/apso/elasticsearch/ElasticsearchBulkInserterSpec.scala b/elasticsearch/src/test/scala/com/velocidi/apso/elasticsearch/ElasticsearchBulkInserterSpec.scala index 5b7ee6d2..d744f014 100644 --- a/elasticsearch/src/test/scala/com/velocidi/apso/elasticsearch/ElasticsearchBulkInserterSpec.scala +++ b/elasticsearch/src/test/scala/com/velocidi/apso/elasticsearch/ElasticsearchBulkInserterSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.elasticsearch +package com.kevel.apso.elasticsearch import scala.concurrent.duration._ @@ -13,8 +13,8 @@ import org.specs2.concurrent.ExecutionEnv import org.specs2.matcher.Matcher import org.specs2.mutable.SpecificationLike -import com.velocidi.apso.elasticsearch.ElasticsearchBulkInserter.Insert -import com.velocidi.apso.elasticsearch.config.Elasticsearch +import com.kevel.apso.elasticsearch.ElasticsearchBulkInserter.Insert +import com.kevel.apso.elasticsearch.config.Elasticsearch class ElasticsearchBulkInserterSpec(implicit ee: ExecutionEnv) extends TestKit(ActorSystem("es-bulk-inserter-test")) diff --git a/elasticsearch/src/test/scala/com/velocidi/apso/elasticsearch/ElasticsearchTestkit.scala b/elasticsearch/src/test/scala/com/velocidi/apso/elasticsearch/ElasticsearchTestkit.scala index beae7b8d..573a02e6 100644 --- a/elasticsearch/src/test/scala/com/velocidi/apso/elasticsearch/ElasticsearchTestkit.scala +++ b/elasticsearch/src/test/scala/com/velocidi/apso/elasticsearch/ElasticsearchTestkit.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.elasticsearch +package com.kevel.apso.elasticsearch import java.nio.file.Files diff --git a/encryption/src/main/scala/com/velocidi/apso/encryption/Decryptor.scala b/encryption/src/main/scala/com/velocidi/apso/encryption/Decryptor.scala index 599ca0c5..b53ddf52 100644 --- a/encryption/src/main/scala/com/velocidi/apso/encryption/Decryptor.scala +++ b/encryption/src/main/scala/com/velocidi/apso/encryption/Decryptor.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.encryption +package com.kevel.apso.encryption import java.io.InputStream import java.security.{Key, MessageDigest} diff --git a/encryption/src/main/scala/com/velocidi/apso/encryption/EncryptionUtils.scala b/encryption/src/main/scala/com/velocidi/apso/encryption/EncryptionUtils.scala index 227cc274..ea8f777b 100644 --- a/encryption/src/main/scala/com/velocidi/apso/encryption/EncryptionUtils.scala +++ b/encryption/src/main/scala/com/velocidi/apso/encryption/EncryptionUtils.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.encryption +package com.kevel.apso.encryption import java.io.InputStream import java.security._ diff --git a/encryption/src/main/scala/com/velocidi/apso/encryption/Encryptor.scala b/encryption/src/main/scala/com/velocidi/apso/encryption/Encryptor.scala index 038f5a6b..1f51e64f 100644 --- a/encryption/src/main/scala/com/velocidi/apso/encryption/Encryptor.scala +++ b/encryption/src/main/scala/com/velocidi/apso/encryption/Encryptor.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.encryption +package com.kevel.apso.encryption import java.io.InputStream import java.security.{Key, MessageDigest} diff --git a/hashing/src/main/java/com/velocidi/apso/hashing/MurmurHash3.java b/hashing/src/main/java/com/velocidi/apso/hashing/MurmurHash3.java index dcdc7027..f8d2b30f 100644 --- a/hashing/src/main/java/com/velocidi/apso/hashing/MurmurHash3.java +++ b/hashing/src/main/java/com/velocidi/apso/hashing/MurmurHash3.java @@ -21,7 +21,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package com.velocidi.apso.hashing; +package com.kevel.apso.hashing; import java.nio.charset.Charset; @@ -35,374 +35,403 @@ * be as fast or faster than the x86 version on some modern 32 bit processors. * * @author Patrick McFarland - * @see MurmurHash website - * @see MurmurHash entry on Wikipedia + * @see MurmurHash + * website + * @see MurmurHash entry on + * Wikipedia * @since 5.0 */ public class MurmurHash3 { - private static final Charset UTF8 = Charset.forName("UTF-8"); - - static class State { - long h1; - long h2; - - long k1; - long k2; - - long c1; - long c2; - } - - static long getblock(byte[] key, int i) { - return - (((long) key[i + 0] & 0x00000000000000FFL)) - | (((long) key[i + 1] & 0x00000000000000FFL) << 8) - | (((long) key[i + 2] & 0x00000000000000FFL) << 16) - | (((long) key[i + 3] & 0x00000000000000FFL) << 24) - | (((long) key[i + 4] & 0x00000000000000FFL) << 32) - | (((long) key[i + 5] & 0x00000000000000FFL) << 40) - | (((long) key[i + 6] & 0x00000000000000FFL) << 48) - | (((long) key[i + 7] & 0x00000000000000FFL) << 56); - } - - static void bmix(State state) { - state.k1 *= state.c1; - state.k1 = (state.k1 << 23) | (state.k1 >>> 64 - 23); - state.k1 *= state.c2; - state.h1 ^= state.k1; - state.h1 += state.h2; - - state.h2 = (state.h2 << 41) | (state.h2 >>> 64 - 41); - - state.k2 *= state.c2; - state.k2 = (state.k2 << 23) | (state.k2 >>> 64 - 23); - state.k2 *= state.c1; - state.h2 ^= state.k2; - state.h2 += state.h1; - - state.h1 = state.h1 * 3 + 0x52dce729; - state.h2 = state.h2 * 3 + 0x38495ab5; - - state.c1 = state.c1 * 5 + 0x7b7d159c; - state.c2 = state.c2 * 5 + 0x6bce6396; - } - - static long fmix(long k) { - k ^= k >>> 33; - k *= 0xff51afd7ed558ccdL; - k ^= k >>> 33; - k *= 0xc4ceb9fe1a85ec53L; - k ^= k >>> 33; - - return k; - } - - /** - * Hash a value using the x64 128 bit variant of MurmurHash3 - * - * @param key value to hash - * @param seed random value - * @return 128 bit hashed key, in an array containing two longs - */ - public static long[] MurmurHash3_x64_128(final byte[] key, final int seed) { - State state = new State(); - - state.h1 = 0x9368e53c2f6af274L ^ seed; - state.h2 = 0x586dcd208f7cd3fdL ^ seed; - - state.c1 = 0x87c37b91114253d5L; - state.c2 = 0x4cf5ad432745937fL; - - for (int i = 0; i < key.length / 16; i++) { - state.k1 = getblock(key, i * 2 * 8); - state.k2 = getblock(key, (i * 2 + 1) * 8); - - bmix(state); - } - - state.k1 = 0; - state.k2 = 0; - - int tail = (key.length >>> 4) << 4; - - switch (key.length & 15) { - case 15: state.k2 ^= (long) key[tail + 14] << 48; - case 14: state.k2 ^= (long) key[tail + 13] << 40; - case 13: state.k2 ^= (long) key[tail + 12] << 32; - case 12: state.k2 ^= (long) key[tail + 11] << 24; - case 11: state.k2 ^= (long) key[tail + 10] << 16; - case 10: state.k2 ^= (long) key[tail + 9] << 8; - case 9: state.k2 ^= (long) key[tail + 8]; - - case 8: state.k1 ^= (long) key[tail + 7] << 56; - case 7: state.k1 ^= (long) key[tail + 6] << 48; - case 6: state.k1 ^= (long) key[tail + 5] << 40; - case 5: state.k1 ^= (long) key[tail + 4] << 32; - case 4: state.k1 ^= (long) key[tail + 3] << 24; - case 3: state.k1 ^= (long) key[tail + 2] << 16; - case 2: state.k1 ^= (long) key[tail + 1] << 8; - case 1: state.k1 ^= (long) key[tail + 0]; - bmix(state); - } - - state.h2 ^= key.length; - - state.h1 += state.h2; - state.h2 += state.h1; - - state.h1 = fmix(state.h1); - state.h2 = fmix(state.h2); - - state.h1 += state.h2; - state.h2 += state.h1; - - return new long[] { state.h1, state.h2 }; - } - - /** - * Hash a value using the x64 64 bit variant of MurmurHash3 - * - * @param key value to hash - * @param seed random value - * @return 64 bit hashed key - */ - public static long MurmurHash3_x64_64(final byte[] key, final int seed) { - // Exactly the same as MurmurHash3_x64_128, except it only returns state.h1 - State state = new State(); - - state.h1 = 0x9368e53c2f6af274L ^ seed; - state.h2 = 0x586dcd208f7cd3fdL ^ seed; - - state.c1 = 0x87c37b91114253d5L; - state.c2 = 0x4cf5ad432745937fL; - - for (int i = 0; i < key.length / 16; i++) { - state.k1 = getblock(key, i * 2 * 8); - state.k2 = getblock(key, (i * 2 + 1) * 8); - - bmix(state); - } - - state.k1 = 0; - state.k2 = 0; - - int tail = (key.length >>> 4) << 4; - - switch (key.length & 15) { - case 15: state.k2 ^= (long) key[tail + 14] << 48; - case 14: state.k2 ^= (long) key[tail + 13] << 40; - case 13: state.k2 ^= (long) key[tail + 12] << 32; - case 12: state.k2 ^= (long) key[tail + 11] << 24; - case 11: state.k2 ^= (long) key[tail + 10] << 16; - case 10: state.k2 ^= (long) key[tail + 9] << 8; - case 9: state.k2 ^= (long) key[tail + 8]; - - case 8: state.k1 ^= (long) key[tail + 7] << 56; - case 7: state.k1 ^= (long) key[tail + 6] << 48; - case 6: state.k1 ^= (long) key[tail + 5] << 40; - case 5: state.k1 ^= (long) key[tail + 4] << 32; - case 4: state.k1 ^= (long) key[tail + 3] << 24; - case 3: state.k1 ^= (long) key[tail + 2] << 16; - case 2: state.k1 ^= (long) key[tail + 1] << 8; - case 1: state.k1 ^= (long) key[tail + 0]; - bmix(state); - } - - state.h2 ^= key.length; - - state.h1 += state.h2; - state.h2 += state.h1; - - state.h1 = fmix(state.h1); - state.h2 = fmix(state.h2); - - state.h1 += state.h2; - state.h2 += state.h1; - - return state.h1; - } - - /** - * Hash a value using the x64 32 bit variant of MurmurHash3 - * - * @param key value to hash - * @param seed random value - * @return 32 bit hashed key - */ - public static int MurmurHash3_x64_32(final byte[] key, final int seed) { - return (int) (MurmurHash3_x64_64(key, seed) >>> 32); - } - - /** - * Hash a value using the x64 128 bit variant of MurmurHash3 - * - * @param key value to hash - * @param seed random value - * @return 128 bit hashed key, in an array containing two longs - */ - public static long[] MurmurHash3_x64_128(final long[] key, final int seed) { - State state = new State(); - - state.h1 = 0x9368e53c2f6af274L ^ seed; - state.h2 = 0x586dcd208f7cd3fdL ^ seed; - - state.c1 = 0x87c37b91114253d5L; - state.c2 = 0x4cf5ad432745937fL; - - for (int i = 0; i < key.length / 2; i++) { - state.k1 = key[i * 2]; - state.k2 = key[i * 2 + 1]; - - bmix(state); - } - - long tail = key[key.length - 1]; - - if (key.length % 2 != 0) { - state.k1 ^= tail; - bmix(state); - } - - state.h2 ^= key.length * 8; - - state.h1 += state.h2; - state.h2 += state.h1; - - state.h1 = fmix(state.h1); - state.h2 = fmix(state.h2); - - state.h1 += state.h2; - state.h2 += state.h1; - - return new long[] { state.h1, state.h2 }; - } - - /** - * Hash a value using the x64 64 bit variant of MurmurHash3 - * - * @param key value to hash - * @param seed random value - * @return 64 bit hashed key - */ - public static long MurmurHash3_x64_64(final long[] key, final int seed) { - // Exactly the same as MurmurHash3_x64_128, except it only returns state.h1 - State state = new State(); - - state.h1 = 0x9368e53c2f6af274L ^ seed; - state.h2 = 0x586dcd208f7cd3fdL ^ seed; - - state.c1 = 0x87c37b91114253d5L; - state.c2 = 0x4cf5ad432745937fL; - - for (int i = 0; i < key.length / 2; i++) { - state.k1 = key[i * 2]; - state.k2 = key[i * 2 + 1]; - - bmix(state); - } - - long tail = key[key.length - 1]; - - if (key.length % 2 != 0) { - state.k1 ^= tail; - bmix(state); - } - - state.h2 ^= key.length * 8; - - state.h1 += state.h2; - state.h2 += state.h1; - - state.h1 = fmix(state.h1); - state.h2 = fmix(state.h2); - - state.h1 += state.h2; - state.h2 += state.h1; - - return state.h1; - } - - /** - * Hash a value using the x64 32 bit variant of MurmurHash3 - * - * @param key value to hash - * @param seed random value - * @return 32 bit hashed key - */ - public static int MurmurHash3_x64_32(final long[] key, final int seed) { - return (int) (MurmurHash3_x64_64(key, seed) >>> 32); - } - - public int hash(byte[] payload) { - return MurmurHash3_x64_32(payload, 9001); - } - - /** - * Hashes a byte array efficiently. - * - * @param payload a byte array to hash - * @return a hash code for the byte array - */ - public static int hash(long[] payload) { - return MurmurHash3_x64_32(payload, 9001); - } - - public int hash(int hashcode) { - // Obtained by inlining MurmurHash3_x64_32(byte[], 9001) and removing all the unused code - // (since we know the input is always 4 bytes and we only need 4 bytes of output) - byte b0 = (byte) hashcode; - byte b1 = (byte) (hashcode >>> 8); - byte b2 = (byte) (hashcode >>> 16); - byte b3 = (byte) (hashcode >>> 24); - State state = new State(); - - state.h1 = 0x9368e53c2f6af274L ^ 9001; - state.h2 = 0x586dcd208f7cd3fdL ^ 9001; - - state.c1 = 0x87c37b91114253d5L; - state.c2 = 0x4cf5ad432745937fL; - - state.k1 = 0; - state.k2 = 0; - - state.k1 ^= (long) b3 << 24; - state.k1 ^= (long) b2 << 16; - state.k1 ^= (long) b1 << 8; - state.k1 ^= (long) b0; - bmix(state); - - state.h2 ^= 4; - - state.h1 += state.h2; - state.h2 += state.h1; - - state.h1 = fmix(state.h1); - state.h2 = fmix(state.h2); - - state.h1 += state.h2; - state.h2 += state.h1; - - return (int) (state.h1 >>> 32); - } - - public int hash(Object o) { - if (o instanceof byte[]) - return hash((byte[]) o); - else if (o instanceof long[]) - return hash((long[]) o); - else if (o instanceof String) - return hash(((String) o).getBytes(UTF8)); - else - return hash(o.hashCode()); - } - - @Override - public boolean equals(Object other) { - return other != null && other.getClass() == getClass(); - } - - @Override - public String toString() { - return "MurmurHash3"; - } -} \ No newline at end of file + private static final Charset UTF8 = Charset.forName("UTF-8"); + + static class State { + long h1; + long h2; + + long k1; + long k2; + + long c1; + long c2; + } + + static long getblock(byte[] key, int i) { + return (((long) key[i + 0] & 0x00000000000000FFL)) | (((long) key[i + 1] & 0x00000000000000FFL) << 8) + | (((long) key[i + 2] & 0x00000000000000FFL) << 16) | (((long) key[i + 3] & 0x00000000000000FFL) << 24) + | (((long) key[i + 4] & 0x00000000000000FFL) << 32) | (((long) key[i + 5] & 0x00000000000000FFL) << 40) + | (((long) key[i + 6] & 0x00000000000000FFL) << 48) | (((long) key[i + 7] & 0x00000000000000FFL) << 56); + } + + static void bmix(State state) { + state.k1 *= state.c1; + state.k1 = (state.k1 << 23) | (state.k1 >>> 64 - 23); + state.k1 *= state.c2; + state.h1 ^= state.k1; + state.h1 += state.h2; + + state.h2 = (state.h2 << 41) | (state.h2 >>> 64 - 41); + + state.k2 *= state.c2; + state.k2 = (state.k2 << 23) | (state.k2 >>> 64 - 23); + state.k2 *= state.c1; + state.h2 ^= state.k2; + state.h2 += state.h1; + + state.h1 = state.h1 * 3 + 0x52dce729; + state.h2 = state.h2 * 3 + 0x38495ab5; + + state.c1 = state.c1 * 5 + 0x7b7d159c; + state.c2 = state.c2 * 5 + 0x6bce6396; + } + + static long fmix(long k) { + k ^= k >>> 33; + k *= 0xff51afd7ed558ccdL; + k ^= k >>> 33; + k *= 0xc4ceb9fe1a85ec53L; + k ^= k >>> 33; + + return k; + } + + /** + * Hash a value using the x64 128 bit variant of MurmurHash3 + * + * @param key value to hash + * @param seed random value + * @return 128 bit hashed key, in an array containing two longs + */ + public static long[] MurmurHash3_x64_128(final byte[] key, final int seed) { + State state = new State(); + + state.h1 = 0x9368e53c2f6af274L ^ seed; + state.h2 = 0x586dcd208f7cd3fdL ^ seed; + + state.c1 = 0x87c37b91114253d5L; + state.c2 = 0x4cf5ad432745937fL; + + for (int i = 0; i < key.length / 16; i++) { + state.k1 = getblock(key, i * 2 * 8); + state.k2 = getblock(key, (i * 2 + 1) * 8); + + bmix(state); + } + + state.k1 = 0; + state.k2 = 0; + + int tail = (key.length >>> 4) << 4; + + switch (key.length & 15) { + case 15: + state.k2 ^= (long) key[tail + 14] << 48; + case 14: + state.k2 ^= (long) key[tail + 13] << 40; + case 13: + state.k2 ^= (long) key[tail + 12] << 32; + case 12: + state.k2 ^= (long) key[tail + 11] << 24; + case 11: + state.k2 ^= (long) key[tail + 10] << 16; + case 10: + state.k2 ^= (long) key[tail + 9] << 8; + case 9: + state.k2 ^= (long) key[tail + 8]; + + case 8: + state.k1 ^= (long) key[tail + 7] << 56; + case 7: + state.k1 ^= (long) key[tail + 6] << 48; + case 6: + state.k1 ^= (long) key[tail + 5] << 40; + case 5: + state.k1 ^= (long) key[tail + 4] << 32; + case 4: + state.k1 ^= (long) key[tail + 3] << 24; + case 3: + state.k1 ^= (long) key[tail + 2] << 16; + case 2: + state.k1 ^= (long) key[tail + 1] << 8; + case 1: + state.k1 ^= (long) key[tail + 0]; + bmix(state); + } + + state.h2 ^= key.length; + + state.h1 += state.h2; + state.h2 += state.h1; + + state.h1 = fmix(state.h1); + state.h2 = fmix(state.h2); + + state.h1 += state.h2; + state.h2 += state.h1; + + return new long[] { state.h1, state.h2 }; + } + + /** + * Hash a value using the x64 64 bit variant of MurmurHash3 + * + * @param key value to hash + * @param seed random value + * @return 64 bit hashed key + */ + public static long MurmurHash3_x64_64(final byte[] key, final int seed) { + // Exactly the same as MurmurHash3_x64_128, except it only returns state.h1 + State state = new State(); + + state.h1 = 0x9368e53c2f6af274L ^ seed; + state.h2 = 0x586dcd208f7cd3fdL ^ seed; + + state.c1 = 0x87c37b91114253d5L; + state.c2 = 0x4cf5ad432745937fL; + + for (int i = 0; i < key.length / 16; i++) { + state.k1 = getblock(key, i * 2 * 8); + state.k2 = getblock(key, (i * 2 + 1) * 8); + + bmix(state); + } + + state.k1 = 0; + state.k2 = 0; + + int tail = (key.length >>> 4) << 4; + + switch (key.length & 15) { + case 15: + state.k2 ^= (long) key[tail + 14] << 48; + case 14: + state.k2 ^= (long) key[tail + 13] << 40; + case 13: + state.k2 ^= (long) key[tail + 12] << 32; + case 12: + state.k2 ^= (long) key[tail + 11] << 24; + case 11: + state.k2 ^= (long) key[tail + 10] << 16; + case 10: + state.k2 ^= (long) key[tail + 9] << 8; + case 9: + state.k2 ^= (long) key[tail + 8]; + + case 8: + state.k1 ^= (long) key[tail + 7] << 56; + case 7: + state.k1 ^= (long) key[tail + 6] << 48; + case 6: + state.k1 ^= (long) key[tail + 5] << 40; + case 5: + state.k1 ^= (long) key[tail + 4] << 32; + case 4: + state.k1 ^= (long) key[tail + 3] << 24; + case 3: + state.k1 ^= (long) key[tail + 2] << 16; + case 2: + state.k1 ^= (long) key[tail + 1] << 8; + case 1: + state.k1 ^= (long) key[tail + 0]; + bmix(state); + } + + state.h2 ^= key.length; + + state.h1 += state.h2; + state.h2 += state.h1; + + state.h1 = fmix(state.h1); + state.h2 = fmix(state.h2); + + state.h1 += state.h2; + state.h2 += state.h1; + + return state.h1; + } + + /** + * Hash a value using the x64 32 bit variant of MurmurHash3 + * + * @param key value to hash + * @param seed random value + * @return 32 bit hashed key + */ + public static int MurmurHash3_x64_32(final byte[] key, final int seed) { + return (int) (MurmurHash3_x64_64(key, seed) >>> 32); + } + + /** + * Hash a value using the x64 128 bit variant of MurmurHash3 + * + * @param key value to hash + * @param seed random value + * @return 128 bit hashed key, in an array containing two longs + */ + public static long[] MurmurHash3_x64_128(final long[] key, final int seed) { + State state = new State(); + + state.h1 = 0x9368e53c2f6af274L ^ seed; + state.h2 = 0x586dcd208f7cd3fdL ^ seed; + + state.c1 = 0x87c37b91114253d5L; + state.c2 = 0x4cf5ad432745937fL; + + for (int i = 0; i < key.length / 2; i++) { + state.k1 = key[i * 2]; + state.k2 = key[i * 2 + 1]; + + bmix(state); + } + + long tail = key[key.length - 1]; + + if (key.length % 2 != 0) { + state.k1 ^= tail; + bmix(state); + } + + state.h2 ^= key.length * 8; + + state.h1 += state.h2; + state.h2 += state.h1; + + state.h1 = fmix(state.h1); + state.h2 = fmix(state.h2); + + state.h1 += state.h2; + state.h2 += state.h1; + + return new long[] { state.h1, state.h2 }; + } + + /** + * Hash a value using the x64 64 bit variant of MurmurHash3 + * + * @param key value to hash + * @param seed random value + * @return 64 bit hashed key + */ + public static long MurmurHash3_x64_64(final long[] key, final int seed) { + // Exactly the same as MurmurHash3_x64_128, except it only returns state.h1 + State state = new State(); + + state.h1 = 0x9368e53c2f6af274L ^ seed; + state.h2 = 0x586dcd208f7cd3fdL ^ seed; + + state.c1 = 0x87c37b91114253d5L; + state.c2 = 0x4cf5ad432745937fL; + + for (int i = 0; i < key.length / 2; i++) { + state.k1 = key[i * 2]; + state.k2 = key[i * 2 + 1]; + + bmix(state); + } + + long tail = key[key.length - 1]; + + if (key.length % 2 != 0) { + state.k1 ^= tail; + bmix(state); + } + + state.h2 ^= key.length * 8; + + state.h1 += state.h2; + state.h2 += state.h1; + + state.h1 = fmix(state.h1); + state.h2 = fmix(state.h2); + + state.h1 += state.h2; + state.h2 += state.h1; + + return state.h1; + } + + /** + * Hash a value using the x64 32 bit variant of MurmurHash3 + * + * @param key value to hash + * @param seed random value + * @return 32 bit hashed key + */ + public static int MurmurHash3_x64_32(final long[] key, final int seed) { + return (int) (MurmurHash3_x64_64(key, seed) >>> 32); + } + + public int hash(byte[] payload) { + return MurmurHash3_x64_32(payload, 9001); + } + + /** + * Hashes a byte array efficiently. + * + * @param payload a byte array to hash + * @return a hash code for the byte array + */ + public static int hash(long[] payload) { + return MurmurHash3_x64_32(payload, 9001); + } + + public int hash(int hashcode) { + // Obtained by inlining MurmurHash3_x64_32(byte[], 9001) and removing all the + // unused code + // (since we know the input is always 4 bytes and we only need 4 bytes of + // output) + byte b0 = (byte) hashcode; + byte b1 = (byte) (hashcode >>> 8); + byte b2 = (byte) (hashcode >>> 16); + byte b3 = (byte) (hashcode >>> 24); + State state = new State(); + + state.h1 = 0x9368e53c2f6af274L ^ 9001; + state.h2 = 0x586dcd208f7cd3fdL ^ 9001; + + state.c1 = 0x87c37b91114253d5L; + state.c2 = 0x4cf5ad432745937fL; + + state.k1 = 0; + state.k2 = 0; + + state.k1 ^= (long) b3 << 24; + state.k1 ^= (long) b2 << 16; + state.k1 ^= (long) b1 << 8; + state.k1 ^= (long) b0; + bmix(state); + + state.h2 ^= 4; + + state.h1 += state.h2; + state.h2 += state.h1; + + state.h1 = fmix(state.h1); + state.h2 = fmix(state.h2); + + state.h1 += state.h2; + state.h2 += state.h1; + + return (int) (state.h1 >>> 32); + } + + public int hash(Object o) { + if (o instanceof byte[]) + return hash((byte[]) o); + else if (o instanceof long[]) + return hash((long[]) o); + else if (o instanceof String) + return hash(((String) o).getBytes(UTF8)); + else + return hash(o.hashCode()); + } + + @Override + public boolean equals(Object other) { + return other != null && other.getClass() == getClass(); + } + + @Override + public String toString() { + return "MurmurHash3"; + } +} diff --git a/hashing/src/main/scala/com/velocidi/apso/hashing/Implicits.scala b/hashing/src/main/scala/com/velocidi/apso/hashing/Implicits.scala index 344e5563..aff941c6 100644 --- a/hashing/src/main/scala/com/velocidi/apso/hashing/Implicits.scala +++ b/hashing/src/main/scala/com/velocidi/apso/hashing/Implicits.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.hashing +package com.kevel.apso.hashing import com.twmacinta.util.MD5 diff --git a/hashing/src/main/scala/com/velocidi/apso/hashing/package.scala b/hashing/src/main/scala/com/velocidi/apso/hashing/package.scala index 2b2a3122..ca9f3c54 100644 --- a/hashing/src/main/scala/com/velocidi/apso/hashing/package.scala +++ b/hashing/src/main/scala/com/velocidi/apso/hashing/package.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso /** Provides hashing-related utilities. */ diff --git a/io/src/main/scala/com/velocidi/apso/io/FileDescriptor.scala b/io/src/main/scala/com/velocidi/apso/io/FileDescriptor.scala index d81017fb..866e5fb8 100644 --- a/io/src/main/scala/com/velocidi/apso/io/FileDescriptor.scala +++ b/io/src/main/scala/com/velocidi/apso/io/FileDescriptor.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import java.io.InputStream diff --git a/io/src/main/scala/com/velocidi/apso/io/FileDescriptorCredentials.scala b/io/src/main/scala/com/velocidi/apso/io/FileDescriptorCredentials.scala index 0ab5ba46..f8d59ab9 100644 --- a/io/src/main/scala/com/velocidi/apso/io/FileDescriptorCredentials.scala +++ b/io/src/main/scala/com/velocidi/apso/io/FileDescriptorCredentials.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io /** Trait that describes how a `FileDescriptor` extracts credentials from a config. * diff --git a/io/src/main/scala/com/velocidi/apso/io/InsistentInputStream.scala b/io/src/main/scala/com/velocidi/apso/io/InsistentInputStream.scala index 7d2abd32..45c6e612 100644 --- a/io/src/main/scala/com/velocidi/apso/io/InsistentInputStream.scala +++ b/io/src/main/scala/com/velocidi/apso/io/InsistentInputStream.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import java.io.InputStream diff --git a/io/src/main/scala/com/velocidi/apso/io/LazySequenceInputStream.scala b/io/src/main/scala/com/velocidi/apso/io/LazySequenceInputStream.scala index da635729..c99307f2 100644 --- a/io/src/main/scala/com/velocidi/apso/io/LazySequenceInputStream.scala +++ b/io/src/main/scala/com/velocidi/apso/io/LazySequenceInputStream.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import java.io.InputStream diff --git a/io/src/main/scala/com/velocidi/apso/io/LocalFileDescriptor.scala b/io/src/main/scala/com/velocidi/apso/io/LocalFileDescriptor.scala index e455d687..ee944477 100644 --- a/io/src/main/scala/com/velocidi/apso/io/LocalFileDescriptor.scala +++ b/io/src/main/scala/com/velocidi/apso/io/LocalFileDescriptor.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import java.io.{FileInputStream, FileWriter, InputStream} import java.nio.file.{Files, Path, Paths, StandardCopyOption} @@ -8,7 +8,7 @@ import scala.util.{Failure, Success, Try} import com.typesafe.scalalogging.LazyLogging -import com.velocidi.apso.Implicits.ApsoCloseable +import com.kevel.apso.Implicits.ApsoCloseable case class LocalFileDescriptor(initialPath: String) extends FileDescriptor with LazyLogging { diff --git a/io/src/main/scala/com/velocidi/apso/io/RemoteFileDescriptor.scala b/io/src/main/scala/com/velocidi/apso/io/RemoteFileDescriptor.scala index 38620fbf..0c99bd8a 100644 --- a/io/src/main/scala/com/velocidi/apso/io/RemoteFileDescriptor.scala +++ b/io/src/main/scala/com/velocidi/apso/io/RemoteFileDescriptor.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io trait RemoteFileDescriptor { this: FileDescriptor => type Self <: RemoteFileDescriptor diff --git a/io/src/main/scala/com/velocidi/apso/io/ResourceUtil.scala b/io/src/main/scala/com/velocidi/apso/io/ResourceUtil.scala index 20c182ba..c7e4806a 100644 --- a/io/src/main/scala/com/velocidi/apso/io/ResourceUtil.scala +++ b/io/src/main/scala/com/velocidi/apso/io/ResourceUtil.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import java.io.InputStream import java.net.URLDecoder diff --git a/io/src/main/scala/com/velocidi/apso/io/S3FileDescriptor.scala b/io/src/main/scala/com/velocidi/apso/io/S3FileDescriptor.scala index f5b53705..ae9eca09 100644 --- a/io/src/main/scala/com/velocidi/apso/io/S3FileDescriptor.scala +++ b/io/src/main/scala/com/velocidi/apso/io/S3FileDescriptor.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import java.io.InputStream @@ -7,7 +7,7 @@ import scala.collection.concurrent.TrieMap import com.amazonaws.auth.{AWSStaticCredentialsProvider, BasicAWSCredentials} import com.amazonaws.services.s3.model.S3ObjectSummary -import com.velocidi.apso.aws.{S3Bucket, SerializableAWSCredentials} +import com.kevel.apso.aws.{S3Bucket, SerializableAWSCredentials} case class S3FileDescriptor( bucket: S3Bucket, diff --git a/io/src/main/scala/com/velocidi/apso/io/SftpFileDescriptor.scala b/io/src/main/scala/com/velocidi/apso/io/SftpFileDescriptor.scala index 19d62900..a13903e6 100644 --- a/io/src/main/scala/com/velocidi/apso/io/SftpFileDescriptor.scala +++ b/io/src/main/scala/com/velocidi/apso/io/SftpFileDescriptor.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import java.io.{FileDescriptor => _, _} import java.util.concurrent.{ConcurrentHashMap, TimeoutException} diff --git a/io/src/main/scala/com/velocidi/apso/io/config/Credentials.scala b/io/src/main/scala/com/velocidi/apso/io/config/Credentials.scala index 74caf8ad..72d10896 100644 --- a/io/src/main/scala/com/velocidi/apso/io/config/Credentials.scala +++ b/io/src/main/scala/com/velocidi/apso/io/config/Credentials.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io.config +package com.kevel.apso.io.config case class Credentials(sftp: Credentials.Sftp = Credentials.Sftp(), s3: Credentials.S3 = Credentials.S3()) diff --git a/io/src/test/scala/com/velocidi/apso/io/FileDescriptorCredentialsSpec.scala b/io/src/test/scala/com/velocidi/apso/io/FileDescriptorCredentialsSpec.scala index e0dc844e..7189f537 100644 --- a/io/src/test/scala/com/velocidi/apso/io/FileDescriptorCredentialsSpec.scala +++ b/io/src/test/scala/com/velocidi/apso/io/FileDescriptorCredentialsSpec.scala @@ -1,8 +1,8 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import org.specs2.mutable.Specification -import com.velocidi.apso.CustomMatchers +import com.kevel.apso.CustomMatchers class FileDescriptorCredentialsSpec extends Specification with CustomMatchers { diff --git a/io/src/test/scala/com/velocidi/apso/io/FileDescriptorSpec.scala b/io/src/test/scala/com/velocidi/apso/io/FileDescriptorSpec.scala index 07736e4e..4a1c477b 100644 --- a/io/src/test/scala/com/velocidi/apso/io/FileDescriptorSpec.scala +++ b/io/src/test/scala/com/velocidi/apso/io/FileDescriptorSpec.scala @@ -1,12 +1,12 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import scala.util.Try import com.amazonaws.auth.{AWSStaticCredentialsProvider, BasicAWSCredentials} import org.specs2.mutable.Specification -import com.velocidi.apso.CustomMatchers -import com.velocidi.apso.aws.S3Bucket +import com.kevel.apso.CustomMatchers +import com.kevel.apso.aws.S3Bucket class FileDescriptorSpec extends Specification with CustomMatchers { diff --git a/io/src/test/scala/com/velocidi/apso/io/InsistentInputStreamSpec.scala b/io/src/test/scala/com/velocidi/apso/io/InsistentInputStreamSpec.scala index 9b44bee0..63dba9c8 100644 --- a/io/src/test/scala/com/velocidi/apso/io/InsistentInputStreamSpec.scala +++ b/io/src/test/scala/com/velocidi/apso/io/InsistentInputStreamSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import java.io.InputStream diff --git a/io/src/test/scala/com/velocidi/apso/io/LazySequenceInputStreamSpec.scala b/io/src/test/scala/com/velocidi/apso/io/LazySequenceInputStreamSpec.scala index c1750bc2..e5834b8e 100644 --- a/io/src/test/scala/com/velocidi/apso/io/LazySequenceInputStreamSpec.scala +++ b/io/src/test/scala/com/velocidi/apso/io/LazySequenceInputStreamSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import java.io.ByteArrayInputStream diff --git a/io/src/test/scala/com/velocidi/apso/io/LocalFileDescriptorSpec.scala b/io/src/test/scala/com/velocidi/apso/io/LocalFileDescriptorSpec.scala index 4fcb226d..075bbccd 100644 --- a/io/src/test/scala/com/velocidi/apso/io/LocalFileDescriptorSpec.scala +++ b/io/src/test/scala/com/velocidi/apso/io/LocalFileDescriptorSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.io +package com.kevel.apso.io import java.io.{File, InputStream} import java.nio.file.Files diff --git a/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ClientIPDirectives.scala b/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ClientIPDirectives.scala index c4798d6e..e1550d4f 100644 --- a/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ClientIPDirectives.scala +++ b/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ClientIPDirectives.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.pekko.http +package com.kevel.apso.pekko.http import org.apache.pekko.http.scaladsl.model.RemoteAddress import org.apache.pekko.http.scaladsl.server.Directive1 diff --git a/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ExtraMiscDirectives.scala b/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ExtraMiscDirectives.scala index f90f4559..acfecfe4 100644 --- a/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ExtraMiscDirectives.scala +++ b/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ExtraMiscDirectives.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.pekko.http +package com.kevel.apso.pekko.http import java.net.URI diff --git a/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ProxySupport.scala b/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ProxySupport.scala index 87deab90..d4af04e9 100644 --- a/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ProxySupport.scala +++ b/pekko-http/src/main/scala/com/velocidi/apso/pekko/http/ProxySupport.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.pekko.http +package com.kevel.apso.pekko.http import scala.concurrent.duration.FiniteDuration import scala.concurrent.{Future, Promise} diff --git a/pekko-http/src/test/scala/com/velocidi/apso/pekko/http/ExtraMiscDirectivesSpec.scala b/pekko-http/src/test/scala/com/velocidi/apso/pekko/http/ExtraMiscDirectivesSpec.scala index d26acde3..de3e6bb8 100644 --- a/pekko-http/src/test/scala/com/velocidi/apso/pekko/http/ExtraMiscDirectivesSpec.scala +++ b/pekko-http/src/test/scala/com/velocidi/apso/pekko/http/ExtraMiscDirectivesSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.pekko.http +package com.kevel.apso.pekko.http import scala.concurrent.duration._ diff --git a/pekko-http/src/test/scala/com/velocidi/apso/pekko/http/ProxySupportSpec.scala b/pekko-http/src/test/scala/com/velocidi/apso/pekko/http/ProxySupportSpec.scala index 7024f09a..9b1657a1 100644 --- a/pekko-http/src/test/scala/com/velocidi/apso/pekko/http/ProxySupportSpec.scala +++ b/pekko-http/src/test/scala/com/velocidi/apso/pekko/http/ProxySupportSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.pekko.http +package com.kevel.apso.pekko.http import java.net.InetAddress @@ -20,7 +20,7 @@ import org.specs2.concurrent.ExecutionEnv import org.specs2.mutable.Specification import org.specs2.specification.Scope -import com.velocidi.apso.NetUtils._ +import com.kevel.apso.NetUtils._ class ProxySupportSpec(implicit ee: ExecutionEnv) extends Specification with Specs2RouteTest with ProxySupport { diff --git a/pekko/src/main/scala/com/velocidi/apso/pekko/NamedActorLogging.scala b/pekko/src/main/scala/com/velocidi/apso/pekko/NamedActorLogging.scala index aa7a2638..2b5800e7 100644 --- a/pekko/src/main/scala/com/velocidi/apso/pekko/NamedActorLogging.scala +++ b/pekko/src/main/scala/com/velocidi/apso/pekko/NamedActorLogging.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.pekko +package com.kevel.apso.pekko import org.apache.pekko.actor.{Actor, ActorLogging} import org.apache.pekko.event.Logging diff --git a/profiling/src/main/scala/com/velocidi/apso/profiling/CpuSampler.scala b/profiling/src/main/scala/com/velocidi/apso/profiling/CpuSampler.scala index 361ac032..8537c199 100644 --- a/profiling/src/main/scala/com/velocidi/apso/profiling/CpuSampler.scala +++ b/profiling/src/main/scala/com/velocidi/apso/profiling/CpuSampler.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.profiling +package com.kevel.apso.profiling import java.lang.management.ManagementFactory @@ -7,7 +7,7 @@ import scala.collection.mutable import com.typesafe.scalalogging.Logger -import com.velocidi.apso.profiling.CpuSampler._ +import com.kevel.apso.profiling.CpuSampler._ /** A lightweight CPU profiler based on call stack sampling. * diff --git a/profiling/src/main/scala/com/velocidi/apso/profiling/SimpleJmx.scala b/profiling/src/main/scala/com/velocidi/apso/profiling/SimpleJmx.scala index dd5bf088..bec70a01 100644 --- a/profiling/src/main/scala/com/velocidi/apso/profiling/SimpleJmx.scala +++ b/profiling/src/main/scala/com/velocidi/apso/profiling/SimpleJmx.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.profiling +package com.kevel.apso.profiling import java.net.ServerSocket diff --git a/profiling/src/main/scala/com/velocidi/apso/profiling/config/Jmx.scala b/profiling/src/main/scala/com/velocidi/apso/profiling/config/Jmx.scala index bd6b6f36..687d13d2 100644 --- a/profiling/src/main/scala/com/velocidi/apso/profiling/config/Jmx.scala +++ b/profiling/src/main/scala/com/velocidi/apso/profiling/config/Jmx.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.profiling.config +package com.kevel.apso.profiling.config /** Config class for SimpleJmx * diff --git a/testkit/src/main/scala/com/velocidi/apso/CustomMatchers.scala b/testkit/src/main/scala/com/velocidi/apso/CustomMatchers.scala index 12a96b19..4d2e7281 100644 --- a/testkit/src/main/scala/com/velocidi/apso/CustomMatchers.scala +++ b/testkit/src/main/scala/com/velocidi/apso/CustomMatchers.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import java.io._ diff --git a/testkit/src/main/scala/com/velocidi/apso/FutureExtraMatchers.scala b/testkit/src/main/scala/com/velocidi/apso/FutureExtraMatchers.scala index 623280d4..66ed805a 100644 --- a/testkit/src/main/scala/com/velocidi/apso/FutureExtraMatchers.scala +++ b/testkit/src/main/scala/com/velocidi/apso/FutureExtraMatchers.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import scala.concurrent._ import scala.concurrent.duration._ diff --git a/testkit/src/main/scala/com/velocidi/apso/JceTestHelper.scala b/testkit/src/main/scala/com/velocidi/apso/JceTestHelper.scala index cc36756f..0d7d7a57 100644 --- a/testkit/src/main/scala/com/velocidi/apso/JceTestHelper.scala +++ b/testkit/src/main/scala/com/velocidi/apso/JceTestHelper.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import javax.crypto.Cipher diff --git a/testkit/src/main/scala/com/velocidi/apso/JreVersionTestHelper.scala b/testkit/src/main/scala/com/velocidi/apso/JreVersionTestHelper.scala index 587290b7..2628c079 100644 --- a/testkit/src/main/scala/com/velocidi/apso/JreVersionTestHelper.scala +++ b/testkit/src/main/scala/com/velocidi/apso/JreVersionTestHelper.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso import scala.math.Ordering.Implicits._ diff --git a/time/src/main/scala/com/velocidi/apso/time/Implicits.scala b/time/src/main/scala/com/velocidi/apso/time/Implicits.scala index 93879adf..7afd7fa6 100644 --- a/time/src/main/scala/com/velocidi/apso/time/Implicits.scala +++ b/time/src/main/scala/com/velocidi/apso/time/Implicits.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.time +package com.kevel.apso.time import com.github.nscala_time.time.Imports._ import org.joda.time.ReadableInterval diff --git a/time/src/main/scala/com/velocidi/apso/time/IterableInterval.scala b/time/src/main/scala/com/velocidi/apso/time/IterableInterval.scala index eb93fe4f..24796e6b 100644 --- a/time/src/main/scala/com/velocidi/apso/time/IterableInterval.scala +++ b/time/src/main/scala/com/velocidi/apso/time/IterableInterval.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.time +package com.kevel.apso.time import com.github.nscala_time.time.Imports._ import org.joda.time.ReadableInterval diff --git a/time/src/main/scala/com/velocidi/apso/time/package.scala b/time/src/main/scala/com/velocidi/apso/time/package.scala index 8f314e3c..d3e21623 100644 --- a/time/src/main/scala/com/velocidi/apso/time/package.scala +++ b/time/src/main/scala/com/velocidi/apso/time/package.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso +package com.kevel.apso /** Provides utility classes and methods related to datetime libraries. */ diff --git a/time/src/test/scala/com/velocidi/apso/time/ImplicitsSpec.scala b/time/src/test/scala/com/velocidi/apso/time/ImplicitsSpec.scala index d8bf9954..52552b4f 100644 --- a/time/src/test/scala/com/velocidi/apso/time/ImplicitsSpec.scala +++ b/time/src/test/scala/com/velocidi/apso/time/ImplicitsSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.time +package com.kevel.apso.time import com.github.nscala_time.time.Imports._ import org.specs2.mutable._ diff --git a/time/src/test/scala/com/velocidi/apso/time/IterableIntervalSpec.scala b/time/src/test/scala/com/velocidi/apso/time/IterableIntervalSpec.scala index f04eb450..77bddbe9 100644 --- a/time/src/test/scala/com/velocidi/apso/time/IterableIntervalSpec.scala +++ b/time/src/test/scala/com/velocidi/apso/time/IterableIntervalSpec.scala @@ -1,4 +1,4 @@ -package com.velocidi.apso.time +package com.kevel.apso.time import com.github.nscala_time.time.Imports._ import org.specs2.mutable._