From 2a11520a5f7831b572f5dc26aafbfb5b13cadf22 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Fri, 22 Oct 2021 12:49:03 -0400 Subject: [PATCH] create Network.GemServ module --- gemserv.cabal | 3 ++- src/Lib.hs | 6 ------ src/Network/GemServ.hs | 29 +++++++++++++++++++++++++++++ test/Network/GemServSpec.hs | 30 ++++++++++++++++++++++++++++++ test/Spec.hs | 3 ++- 5 files changed, 63 insertions(+), 8 deletions(-) delete mode 100644 src/Lib.hs create mode 100644 src/Network/GemServ.hs create mode 100644 test/Network/GemServSpec.hs diff --git a/gemserv.cabal b/gemserv.cabal index 963cdaa..a0adb24 100644 --- a/gemserv.cabal +++ b/gemserv.cabal @@ -21,7 +21,7 @@ extra-source-files: library exposed-modules: - Lib + Network.GemServ other-modules: Paths_gemserv hs-source-dirs: @@ -38,6 +38,7 @@ test-suite gemserv-test type: exitcode-stdio-1.0 main-is: Spec.hs other-modules: + Network.GemServSpec Paths_gemserv hs-source-dirs: test diff --git a/src/Lib.hs b/src/Lib.hs deleted file mode 100644 index d36ff27..0000000 --- a/src/Lib.hs +++ /dev/null @@ -1,6 +0,0 @@ -module Lib - ( someFunc - ) where - -someFunc :: IO () -someFunc = putStrLn "someFunc" diff --git a/src/Network/GemServ.hs b/src/Network/GemServ.hs new file mode 100644 index 0000000..be34ef5 --- /dev/null +++ b/src/Network/GemServ.hs @@ -0,0 +1,29 @@ +{-| + +Module : Network.GemServ +Description : Gemini Server Stuff +Copyright : (C) Jonathan Lamothe +License : AGPL-3.0-or-later +Maintainer : jonathan@jlamothe.net +Stability : experimental +Portability : POSIX + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with this program. If not, see +. + +-} + +module Network.GemServ where + +--jl diff --git a/test/Network/GemServSpec.hs b/test/Network/GemServSpec.hs new file mode 100644 index 0000000..c8d7e3d --- /dev/null +++ b/test/Network/GemServSpec.hs @@ -0,0 +1,30 @@ +{- + +gemserv + +Cooyright (C) Jonathan Lamothe + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with this program. If not, see +. + +-} + +module Network.GemServSpec (spec) where + +import Test.Hspec (Spec, describe) + +spec :: Spec +spec = describe "Network.GemServ" $ return () + +--jl diff --git a/test/Spec.hs b/test/Spec.hs index 507276c..93ef0bb 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -23,8 +23,9 @@ License along with this program. If not, see module Main (main) where import Test.Hspec (hspec) +import qualified Network.GemServSpec as GemServ main :: IO () -main = hspec $ return () +main = hspec GemServ.spec --jl