From f751ccf1915388de8cd523fa4dbf052886066a67 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Wed, 17 Nov 2021 13:15:36 -0500 Subject: [PATCH] renamed project to gemcap It was brought to my attention that there is a rust package named gemserv. I changed the name to avoid any potential confusion. --- gemserv.cabal => gemcap.cabal | 28 +++++++++---------- package.yaml | 12 ++++---- src/Network/{GemServ.hs => Gemini/Capsule.hs} | 10 +++---- .../{GemServ => Gemini/Capsule}/Internal.hs | 6 ++-- .../{GemServ => Gemini/Capsule}/Types.hs | 6 ++-- .../Capsule}/InternalSpec.hs | 4 +-- .../{GemServSpec.hs => Gemini/CapsuleSpec.hs} | 12 ++++---- test/Spec.hs | 6 ++-- 8 files changed, 42 insertions(+), 42 deletions(-) rename gemserv.cabal => gemcap.cabal (71%) rename src/Network/{GemServ.hs => Gemini/Capsule.hs} (97%) rename src/Network/{GemServ => Gemini/Capsule}/Internal.hs (91%) rename src/Network/{GemServ => Gemini/Capsule}/Types.hs (96%) rename test/Network/{GemServ => Gemini/Capsule}/InternalSpec.hs (92%) rename test/Network/{GemServSpec.hs => Gemini/CapsuleSpec.hs} (95%) diff --git a/gemserv.cabal b/gemcap.cabal similarity index 71% rename from gemserv.cabal rename to gemcap.cabal index 9ca37cc..434c6a1 100644 --- a/gemserv.cabal +++ b/gemcap.cabal @@ -4,10 +4,10 @@ cabal-version: 2.2 -- -- see: https://github.com/sol/hpack -name: gemserv +name: gemcap version: 0.0.0 -synopsis: simple Gemini server -description: simple Gemini server - see README.md for details +synopsis: a simple Gemini capsule (server) +description: a simple Gemini capsule (server) - see README.md for details category: Gemini homepage: https://codeberg.org/jlamothe/gemserv author: Jonathan Lamothe @@ -22,11 +22,11 @@ extra-source-files: library exposed-modules: - Network.GemServ - Network.GemServ.Internal - Network.GemServ.Types + Network.Gemini.Capsule + Network.Gemini.Capsule.Internal + Network.Gemini.Capsule.Types other-modules: - Paths_gemserv + Paths_gemcap hs-source-dirs: src ghc-options: -Wall @@ -39,22 +39,22 @@ library , tls , x509 default-language: Haskell2010 - autogen-modules: Paths_gemserv + autogen-modules: Paths_gemcap -test-suite gemserv-test +test-suite gemcap-test type: exitcode-stdio-1.0 main-is: Spec.hs other-modules: - Network.GemServ.InternalSpec - Network.GemServSpec - Paths_gemserv + Network.Gemini.Capsule.InternalSpec + Network.Gemini.CapsuleSpec + Paths_gemcap hs-source-dirs: test ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N build-depends: base >=4.7 && <5 , bytestring >=0.10.12.0 && <0.11 - , gemserv + , gemcap , hspec >=2.7.10 && <2.8 , network , tcp-streams >=1.0.1.1 && <1.1 @@ -62,4 +62,4 @@ test-suite gemserv-test , tls , x509 default-language: Haskell2010 - autogen-modules: Paths_gemserv + autogen-modules: Paths_gemcap diff --git a/package.yaml b/package.yaml index 2aa3348..ea31903 100644 --- a/package.yaml +++ b/package.yaml @@ -1,4 +1,4 @@ -name: gemserv +name: gemcap version: 0.0.0 license: AGPL-3.0-or-later author: "Jonathan Lamothe" @@ -10,14 +10,14 @@ extra-source-files: - ChangeLog.md # Metadata used when publishing your package -synopsis: simple Gemini server +synopsis: a simple Gemini capsule (server) category: Gemini homepage: https://codeberg.org/jlamothe/gemserv # To avoid duplicated efforts in documentation and dealing with the # complications of embedding Haddock markup inside cabal files, it is # common to point users to the README.md file. -description: simple Gemini server - see README.md for details +description: a simple Gemini capsule (server) - see README.md for details ghc-options: - -Wall @@ -34,10 +34,10 @@ dependencies: library: source-dirs: src verbatim: &paths - autogen-modules: Paths_gemserv + autogen-modules: Paths_gemcap tests: - gemserv-test: + gemcap-test: main: Spec.hs source-dirs: test ghc-options: @@ -45,7 +45,7 @@ tests: - -rtsopts - -with-rtsopts=-N dependencies: - - gemserv + - gemcap - hspec >= 2.7.10 && < 2.8 verbatim: <<: *paths \ No newline at end of file diff --git a/src/Network/GemServ.hs b/src/Network/Gemini/Capsule.hs similarity index 97% rename from src/Network/GemServ.hs rename to src/Network/Gemini/Capsule.hs index c6a6f7c..b51eb7f 100644 --- a/src/Network/GemServ.hs +++ b/src/Network/Gemini/Capsule.hs @@ -1,7 +1,7 @@ {-| -Module : Network.GemServ -Description : Gemini Server Stuff +Module : Network.Gemini.Capsule +Description : Gemini capsule stuff Copyright : (C) Jonathan Lamothe License : AGPL-3.0-or-later Maintainer : jonathan@jlamothe.net @@ -30,7 +30,7 @@ License along with this program. If not, see ScopedTypeVariables, RecordWildCards #-} -module Network.GemServ ( +module Network.Gemini.Capsule ( -- * Running a Gemini Server runGemServer, -- * Encoding/Decoding Functions @@ -61,8 +61,8 @@ import Network.TLS (ServerParams, onClientCertificate, serverHooks) import System.IO.Streams.TCP (bindAndListen) import System.IO.Streams.TLS (accept) -import Network.GemServ.Internal -import Network.GemServ.Types +import Network.Gemini.Capsule.Internal +import Network.Gemini.Capsule.Types -- | Builds and runs a Gemini server runGemServer diff --git a/src/Network/GemServ/Internal.hs b/src/Network/Gemini/Capsule/Internal.hs similarity index 91% rename from src/Network/GemServ/Internal.hs rename to src/Network/Gemini/Capsule/Internal.hs index ae3af2b..4279230 100644 --- a/src/Network/GemServ/Internal.hs +++ b/src/Network/Gemini/Capsule/Internal.hs @@ -1,6 +1,6 @@ {-| -Module : Network.GemServ.Internal +Module : Network.Gemini.Capsule.Internal Description : internal functions (do not use) Copyright : (C) Jonathan Lamothe License : AGPL-3.0-or-later @@ -30,14 +30,14 @@ time. -} -module Network.GemServ.Internal ( +module Network.Gemini.Capsule.Internal ( readURL, sendResponse ) where import Data.Connection (Connection) -import Network.GemServ.Types +import Network.Gemini.Capsule.Types -- | Reads a 'GemURL' from a 'Connection' readURL diff --git a/src/Network/GemServ/Types.hs b/src/Network/Gemini/Capsule/Types.hs similarity index 96% rename from src/Network/GemServ/Types.hs rename to src/Network/Gemini/Capsule/Types.hs index b8c0475..4e31ad1 100644 --- a/src/Network/GemServ/Types.hs +++ b/src/Network/Gemini/Capsule/Types.hs @@ -1,7 +1,7 @@ {-| -Module : Network.GemServ.Types -Description : Gemini Server Types +Module : Network.Gemini.Capsule.Types +Description : Gemini capsule types Copyright : (C) Jonathan Lamothe License : AGPL-3.0-or-later Maintainer : jonathan@jlamothe.net @@ -24,7 +24,7 @@ License along with this program. If not, see -} -module Network.GemServ.Types ( +module Network.Gemini.Capsule.Types ( -- * Types GemURL (..), GemRequest (..), diff --git a/test/Network/GemServ/InternalSpec.hs b/test/Network/Gemini/Capsule/InternalSpec.hs similarity index 92% rename from test/Network/GemServ/InternalSpec.hs rename to test/Network/Gemini/Capsule/InternalSpec.hs index d8eda25..7131ae2 100644 --- a/test/Network/GemServ/InternalSpec.hs +++ b/test/Network/Gemini/Capsule/InternalSpec.hs @@ -1,6 +1,6 @@ {- -gemserv +gemcap Cooyright (C) Jonathan Lamothe @@ -20,7 +20,7 @@ License along with this program. If not, see -} -module Network.GemServ.InternalSpec (spec) where +module Network.Gemini.Capsule.InternalSpec (spec) where import Test.Hspec (Spec, describe) diff --git a/test/Network/GemServSpec.hs b/test/Network/Gemini/CapsuleSpec.hs similarity index 95% rename from test/Network/GemServSpec.hs rename to test/Network/Gemini/CapsuleSpec.hs index 14de639..85f6fb6 100644 --- a/test/Network/GemServSpec.hs +++ b/test/Network/Gemini/CapsuleSpec.hs @@ -1,6 +1,6 @@ {- -gemserv +gemcap Cooyright (C) Jonathan Lamothe @@ -20,17 +20,17 @@ License along with this program. If not, see -} -module Network.GemServSpec (spec) where +module Network.Gemini.CapsuleSpec (spec) where import Test.Hspec (Spec, context, describe, it, shouldBe) -import qualified Network.GemServ.InternalSpec as Internal +import qualified Network.Gemini.Capsule.InternalSpec as Internal -import Network.GemServ -import Network.GemServ.Types +import Network.Gemini.Capsule +import Network.Gemini.Capsule.Types spec :: Spec -spec = describe "Network.GemServ" $ do +spec = describe "Network.Gemini.Capsule" $ do Internal.spec encodeGemURLSpec decodeGemURLSpec diff --git a/test/Spec.hs b/test/Spec.hs index 93ef0bb..a998df5 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -1,6 +1,6 @@ {- -gemserv +gemcap Cooyright (C) Jonathan Lamothe @@ -23,9 +23,9 @@ License along with this program. If not, see module Main (main) where import Test.Hspec (hspec) -import qualified Network.GemServSpec as GemServ +import qualified Network.Gemini.CapsuleSpec as GemCap main :: IO () -main = hspec GemServ.spec +main = hspec GemCap.spec --jl