From 8d5c0405565ad4afd976efd1262b3224efd6ee2f Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Thu, 13 Aug 2020 19:19:22 +0200 Subject: cafp -> uplcg --- Dockerfile | 10 +- Makefile | 18 +- black.txt | 2 +- client/index.html | 12 +- client/src/Client.elm | 8 +- config.mk | 8 +- server/cafp.cabal | 63 ------ server/lib/Cafp/CookieSocket.hs | 86 -------- server/lib/Cafp/Game.hs | 332 ------------------------------ server/lib/Cafp/Main/GenerateElmTypes.hs | 22 -- server/lib/Cafp/Main/Server.hs | 214 ------------------- server/lib/Cafp/Messages.hs | 87 -------- server/lib/Uplcg/CookieSocket.hs | 86 ++++++++ server/lib/Uplcg/Game.hs | 332 ++++++++++++++++++++++++++++++ server/lib/Uplcg/Main/GenerateElmTypes.hs | 22 ++ server/lib/Uplcg/Main/Server.hs | 214 +++++++++++++++++++ server/lib/Uplcg/Messages.hs | 87 ++++++++ server/src/GenerateElmTypes.hs | 4 +- server/src/Server.hs | 4 +- server/uplcg.cabal | 63 ++++++ 20 files changed, 837 insertions(+), 837 deletions(-) delete mode 100644 server/cafp.cabal delete mode 100644 server/lib/Cafp/CookieSocket.hs delete mode 100644 server/lib/Cafp/Game.hs delete mode 100644 server/lib/Cafp/Main/GenerateElmTypes.hs delete mode 100644 server/lib/Cafp/Main/Server.hs delete mode 100644 server/lib/Cafp/Messages.hs create mode 100644 server/lib/Uplcg/CookieSocket.hs create mode 100644 server/lib/Uplcg/Game.hs create mode 100644 server/lib/Uplcg/Main/GenerateElmTypes.hs create mode 100644 server/lib/Uplcg/Main/Server.hs create mode 100644 server/lib/Uplcg/Messages.hs create mode 100644 server/uplcg.cabal diff --git a/Dockerfile b/Dockerfile index 17b087b..593505e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM haskell:8.8 -WORKDIR /opt/cafp -COPY server/cafp.cabal server/stack.yaml* /opt/cafp/ +WORKDIR /opt/uplcg +COPY server/uplcg.cabal server/stack.yaml* /opt/uplcg/ RUN stack build --only-dependencies -COPY server /opt/cafp +COPY server /opt/uplcg RUN stack build -ENV CAFP_HOSTNAME=0.0.0.0 CAFP_PORT=8002 CAFP_BASE=/cafp +ENV UPLCG_HOSTNAME=0.0.0.0 UPLCG_PORT=8002 UPLCG_BASE=/uplcg EXPOSE 8002 -CMD stack exec cafp-server +CMD stack exec uplcg-server diff --git a/Makefile b/Makefile index 38caaef..e3e7947 100644 --- a/Makefile +++ b/Makefile @@ -14,23 +14,23 @@ build: server/assets/client.js \ .PHONY: docker docker: - docker build -t jaspervdj/cafp . - docker push jaspervdj/cafp + docker build -t jaspervdj/uplcg . + docker push jaspervdj/uplcg .PHONY: server server: build (cd server && \ - CAFP_HOSTNAME=$(CAFP_HOSTNAME) \ - CAFP_PORT=$(CAFP_PORT) \ - CAFP_BASE=$(CAFP_BASE) \ - stack exec cafp-server) + UPLCG_HOSTNAME=$(UPLCG_HOSTNAME) \ + UPLCG_PORT=$(UPLCG_PORT) \ + UPLCG_BASE=$(UPLCG_BASE) \ + stack exec uplcg-server) .PHONY: stack_build stack_build: $(HS_SOURCES) (cd server && stack build) $(ELM_MESSAGES_SOURCE): stack_build - (cd server && stack exec cafp-generate-elm-types) >$(ELM_MESSAGES_SOURCE) + (cd server && stack exec uplcg-generate-elm-types) >$(ELM_MESSAGES_SOURCE) server/assets/client.js: $(ELM_MESSAGES_SOURCE) $(ELM_SOURCES) mkdir -p server/assets @@ -38,8 +38,8 @@ server/assets/client.js: $(ELM_MESSAGES_SOURCE) $(ELM_SOURCES) .PHONY: server/assets/client.html # Depends on git hash. server/assets/client.html: client/index.html config.mk - sed "s@\$$CAFP_BASE@$(CAFP_BASE)@" $< | \ - sed "s@\$$CAFP_VERSION@$(CAFP_VERSION)@" >$@ + sed "s@\$$UPLCG_BASE@$(UPLCG_BASE)@" $< | \ + sed "s@\$$UPLCG_VERSION@$(UPLCG_VERSION)@" >$@ server/assets/style.css: client/style.css cp $< $@ diff --git a/black.txt b/black.txt index 7c91439..0797970 100644 --- a/black.txt +++ b/black.txt @@ -4,7 +4,7 @@ # Some cards taken from: # https://github.com/CardsAgainstCryptography/CAC/blob/master/src/white.txt # Slightly modified to take out most sexist / racist / ... stuff and comply -# with the cafp format. Added more \BLANKs to a few because we can. +# with the uplcg format. Added more \BLANKs to a few because we can. A PL conference is never complete without \BLANK. Both Microsoft and Apple have concerns with \BLANK. Did you hear that \BLANK is the new hot topic? diff --git a/client/index.html b/client/index.html index 274f533..a03d777 100644 --- a/client/index.html +++ b/client/index.html @@ -3,12 +3,12 @@