From b3c60bbd4e46676f76e5c1f544edffae70683683 Mon Sep 17 00:00:00 2001 From: jangko Date: Sun, 27 Jun 2021 13:35:36 +0700 Subject: [PATCH] rename nim-ws to nim-websock --- .github/workflows/ci.yml | 14 +++++++------- autobahn/fuzzingclient.json | 2 +- autobahn/fuzzingclient_tls.json | 2 +- autobahn/index.md | 2 +- examples/autobahn_client.nim | 8 ++++---- examples/client.nim | 4 ++-- examples/server.nim | 4 ++-- tests/asyncunit.nim | 2 +- tests/extensions/base64ext.nim | 6 +++--- tests/extensions/hexext.nim | 6 +++--- tests/extensions/testcompression.nim | 6 +++--- tests/extensions/testextflow.nim | 2 +- tests/extensions/testexts.nim | 4 ++-- tests/helpers.nim | 4 ++-- tests/keys.nim | 2 +- tests/testcommon.nim | 2 +- tests/testextutils.nim | 4 ++-- tests/testframes.nim | 6 +++--- tests/testutf8.nim | 4 ++-- tests/testwebsockets.nim | 4 ++-- ws.nimble => websock.nimble | 6 +++--- {ws => websock}/extensions.nim | 2 +- {ws => websock}/extensions/compression/deflate.nim | 2 +- {ws => websock}/extensions/extutils.nim | 2 +- {ws => websock}/frame.nim | 2 +- {ws => websock}/http.nim | 2 +- {ws => websock}/http/client.nim | 2 +- {ws => websock}/http/common.nim | 2 +- {ws => websock}/http/server.nim | 2 +- {ws => websock}/session.nim | 2 +- {ws => websock}/types.nim | 2 +- {ws => websock}/utf8dfa.nim | 2 +- {ws => websock}/utils.nim | 2 +- ws/ws.nim => websock/websock.nim | 2 +- 34 files changed, 60 insertions(+), 60 deletions(-) rename ws.nimble => websock.nimble (93%) rename {ws => websock}/extensions.nim (96%) rename {ws => websock}/extensions/compression/deflate.nim (99%) rename {ws => websock}/extensions/extutils.nim (99%) rename {ws => websock}/frame.nim (99%) rename {ws => websock}/http.nim (97%) rename {ws => websock}/http/client.nim (99%) rename {ws => websock}/http/common.nim (99%) rename {ws => websock}/http/server.nim (99%) rename {ws => websock}/session.nim (99%) rename {ws => websock}/types.nim (99%) rename {ws => websock}/utf8dfa.nim (99%) rename {ws => websock}/utils.nim (99%) rename ws/ws.nim => websock/websock.nim (99%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c8290c5..bdb20ce5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: nim-ws CI +name: CI on: [push, pull_request] jobs: @@ -38,10 +38,10 @@ jobs: name: "${{ matrix.target.os }}-${{ matrix.target.cpu }} (${{ matrix.branch }})" runs-on: ${{ matrix.builder }} steps: - - name: Checkout nim-ws + - name: Checkout nim-websock uses: actions/checkout@v2 with: - path: nim-ws + path: nim-websock submodules: true - name: Derive environment variables @@ -193,11 +193,11 @@ jobs: rm -rf dist rm -rf .git - - name: Run nim-ws tests + - name: Run nim-websock tests shell: bash run: | export UCPU="$cpu" - cd nim-ws + cd nim-websock nimble install -y --depsOnly nimble test @@ -218,7 +218,7 @@ jobs: virtualenv --python=/usr/bin/python2 autobahn source autobahn/bin/activate pip install autobahntestsuite - cd nim-ws + cd nim-websock mkdir autobahn/reports sed -i "s/COMMIT_SHA_SHORT/${GITHUB_SHA::7}/g" autobahn/index.md sed -i "s/COMMIT_SHA/$GITHUB_SHA/g" autobahn/index.md @@ -265,4 +265,4 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: personal_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./nim-ws/autobahn/reports + publish_dir: ./nim-websock/autobahn/reports diff --git a/autobahn/fuzzingclient.json b/autobahn/fuzzingclient.json index c3da4dd8..9f323879 100644 --- a/autobahn/fuzzingclient.json +++ b/autobahn/fuzzingclient.json @@ -2,7 +2,7 @@ "outdir": "./reports/server", "servers": [{ - "agent": "nim-ws server", + "agent": "websock server", "url": "ws://127.0.0.1:8888/ws" }], diff --git a/autobahn/fuzzingclient_tls.json b/autobahn/fuzzingclient_tls.json index 4f824ef6..89b682a5 100644 --- a/autobahn/fuzzingclient_tls.json +++ b/autobahn/fuzzingclient_tls.json @@ -2,7 +2,7 @@ "outdir": "./reports/server_tls", "servers": [{ - "agent": "nim-wss server", + "agent": "websock secure server", "url": "wss://127.0.0.1:8889/wss" }], diff --git a/autobahn/index.md b/autobahn/index.md index ef3cd265..36dd20df 100644 --- a/autobahn/index.md +++ b/autobahn/index.md @@ -1,6 +1,6 @@ # Autobahn summary report -Generated by commit [COMMIT_SHA_SHORT](https://github.com/status-im/nim-ws/commit/COMMIT_SHA). +Generated by commit [COMMIT_SHA_SHORT](https://github.com/status-im/nim-websock/commit/COMMIT_SHA). * [ws server summary report](server/index.html) * [wss server summary report](server_tls/index.html) diff --git a/examples/autobahn_client.nim b/examples/autobahn_client.nim index c0fa450c..ab5c98ca 100644 --- a/examples/autobahn_client.nim +++ b/examples/autobahn_client.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -10,7 +10,7 @@ import std/[strutils], pkg/[chronos, chronicles, stew/byteutils], - ../ws/[ws, types, frame, extensions/compression/deflate] + ../websock/[websock, types, frame, extensions/compression/deflate] const clientFlags = {NoVerifyHost, NoVerifyServerName} @@ -19,12 +19,12 @@ const # so we are using different port when defined tls: const - agent = "nim-wss-client" + agent = "websock secure client" secure = true serverPort = 9002 else: const - agent = "nim-ws-client" + agent = "websock client" secure = false serverPort = 9001 diff --git a/examples/client.nim b/examples/client.nim index aa790772..90f4f27f 100644 --- a/examples/client.nim +++ b/examples/client.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -12,7 +12,7 @@ import pkg/[ chronicles, stew/byteutils] -import ../ws/ws +import ../websock/websock proc main() {.async.} = let ws = when defined tls: diff --git a/examples/server.nim b/examples/server.nim index e243e4c6..412e39a9 100644 --- a/examples/server.nim +++ b/examples/server.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -12,7 +12,7 @@ import pkg/[chronos, chronicles, httputils] -import ../ws/[ws, extensions/compression/deflate] +import ../websock/[websock, extensions/compression/deflate] import ../tests/keys proc handle(request: HttpRequest) {.async.} = diff --git a/tests/asyncunit.nim b/tests/asyncunit.nim index 49478813..b87e5064 100644 --- a/tests/asyncunit.nim +++ b/tests/asyncunit.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/tests/extensions/base64ext.nim b/tests/extensions/base64ext.nim index 35c07531..a52d319f 100644 --- a/tests/extensions/base64ext.nim +++ b/tests/extensions/base64ext.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -13,8 +13,8 @@ import stew/base64, chronos, chronicles], - ../../ws/types, - ../../ws/frame + ../../websock/types, + ../../websock/frame type Base64Ext = ref object of Ext diff --git a/tests/extensions/hexext.nim b/tests/extensions/hexext.nim index 32ade7c8..5507ff58 100644 --- a/tests/extensions/hexext.nim +++ b/tests/extensions/hexext.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -13,8 +13,8 @@ import stew/byteutils, chronos, chronicles], - ../../ws/types, - ../../ws/frame + ../../websock/types, + ../../websock/frame type HexExt = ref object of Ext diff --git a/tests/extensions/testcompression.nim b/tests/extensions/testcompression.nim index 3b540a65..0fb1842a 100644 --- a/tests/extensions/testcompression.nim +++ b/tests/extensions/testcompression.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -10,8 +10,8 @@ import std/os import pkg/[chronos, stew/byteutils, stew/io2] import ../asyncunit -import ../../ws/ws, ../helpers -import ../../ws/extensions/compression/deflate +import ../../websock/websock, ../helpers +import ../../websock/extensions/compression/deflate const dataFolder = "tests" / "extensions" / "data" diff --git a/tests/extensions/testextflow.nim b/tests/extensions/testextflow.nim index b6f35397..4b95bb78 100644 --- a/tests/extensions/testextflow.nim +++ b/tests/extensions/testextflow.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/tests/extensions/testexts.nim b/tests/extensions/testexts.nim index 5fbeda7d..bddb1a5f 100644 --- a/tests/extensions/testexts.nim +++ b/tests/extensions/testexts.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -10,7 +10,7 @@ import pkg/[chronos, stew/byteutils] import ../asyncunit import ./base64ext, ./hexext -import ../../ws/ws, ../helpers +import ../../websock/websock, ../helpers suite "multiple extensions flow": var server: HttpServer diff --git a/tests/helpers.nim b/tests/helpers.nim index 68f32228..39703aae 100644 --- a/tests/helpers.nim +++ b/tests/helpers.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -17,7 +17,7 @@ import pkg/[ chronicles, stew/byteutils] -import ../ws/ws +import ../websock/websock import ./keys let diff --git a/tests/keys.nim b/tests/keys.nim index 4443c046..583dd039 100644 --- a/tests/keys.nim +++ b/tests/keys.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/tests/testcommon.nim b/tests/testcommon.nim index 7d102bb3..57e7fd0a 100644 --- a/tests/testcommon.nim +++ b/tests/testcommon.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/tests/testextutils.nim b/tests/testextutils.nim index 10a35797..22143c26 100644 --- a/tests/testextutils.nim +++ b/tests/testextutils.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -9,7 +9,7 @@ import pkg/[asynctest, chronos], - ../ws/extensions + ../websock/extensions suite "extension parser": test "single extension": diff --git a/tests/testframes.nim b/tests/testframes.nim index e03e1ef4..af49fa6a 100644 --- a/tests/testframes.nim +++ b/tests/testframes.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -9,8 +9,8 @@ import pkg/[asynctest, stew/byteutils] -include ../ws/frame -include ../ws/utils +include ../websock/frame +include ../websock/utils # TODO: Fix Test. diff --git a/tests/testutf8.nim b/tests/testutf8.nim index e7fec3d6..00b658b3 100644 --- a/tests/testutf8.nim +++ b/tests/testutf8.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -15,7 +15,7 @@ import chronos, chronicles ], - ../ws/[ws, utf8dfa] + ../websock/[websock, utf8dfa] suite "UTF-8 DFA validator": test "single octet": diff --git a/tests/testwebsockets.nim b/tests/testwebsockets.nim index c946c060..25060672 100644 --- a/tests/testwebsockets.nim +++ b/tests/testwebsockets.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -14,7 +14,7 @@ import pkg/[ chronicles, stew/byteutils] -import ../ws/ws +import ../websock/websock import ./asynctest import ./helpers diff --git a/ws.nimble b/websock.nimble similarity index 93% rename from ws.nimble rename to websock.nimble index dd0a0618..706f70cb 100644 --- a/ws.nimble +++ b/websock.nimble @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) @@ -7,14 +7,14 @@ ## This file may not be copied, modified, or distributed except according to ## those terms. -packageName = "ws" +packageName = "websock" version = "0.1.0" author = "Status Research & Development GmbH" description = "WS protocol implementation" license = "MIT" skipDirs = @["examples", "tests"] -requires "nim >= 1.2.0" # nimble will fail to install nim-ws if we are using 1.2.6 here +requires "nim >= 1.2.0" # nimble will fail to install nim-websock if we are using 1.2.6 here requires "chronos >= 3.0.0" requires "httputils >= 0.2.0" requires "chronicles#ba2817f1" diff --git a/ws/extensions.nim b/websock/extensions.nim similarity index 96% rename from ws/extensions.nim rename to websock/extensions.nim index ae6d7209..b8c84769 100644 --- a/ws/extensions.nim +++ b/websock/extensions.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/extensions/compression/deflate.nim b/websock/extensions/compression/deflate.nim similarity index 99% rename from ws/extensions/compression/deflate.nim rename to websock/extensions/compression/deflate.nim index ca5487fd..f128d71f 100644 --- a/ws/extensions/compression/deflate.nim +++ b/websock/extensions/compression/deflate.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/extensions/extutils.nim b/websock/extensions/extutils.nim similarity index 99% rename from ws/extensions/extutils.nim rename to websock/extensions/extutils.nim index 21add3a1..bf05bfff 100644 --- a/ws/extensions/extutils.nim +++ b/websock/extensions/extutils.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/frame.nim b/websock/frame.nim similarity index 99% rename from ws/frame.nim rename to websock/frame.nim index 75634f7c..f09341dd 100644 --- a/ws/frame.nim +++ b/websock/frame.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/http.nim b/websock/http.nim similarity index 97% rename from ws/http.nim rename to websock/http.nim index fe41a498..e78ead93 100644 --- a/ws/http.nim +++ b/websock/http.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/http/client.nim b/websock/http/client.nim similarity index 99% rename from ws/http/client.nim rename to websock/http/client.nim index 3010190e..4cad178c 100644 --- a/ws/http/client.nim +++ b/websock/http/client.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/http/common.nim b/websock/http/common.nim similarity index 99% rename from ws/http/common.nim rename to websock/http/common.nim index ee4f606e..9e128bd5 100644 --- a/ws/http/common.nim +++ b/websock/http/common.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/http/server.nim b/websock/http/server.nim similarity index 99% rename from ws/http/server.nim rename to websock/http/server.nim index 080ba149..191b6192 100644 --- a/ws/http/server.nim +++ b/websock/http/server.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/session.nim b/websock/session.nim similarity index 99% rename from ws/session.nim rename to websock/session.nim index 72caa9fc..5c21b3a0 100644 --- a/ws/session.nim +++ b/websock/session.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/types.nim b/websock/types.nim similarity index 99% rename from ws/types.nim rename to websock/types.nim index 82f416f4..bd24dac3 100644 --- a/ws/types.nim +++ b/websock/types.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/utf8dfa.nim b/websock/utf8dfa.nim similarity index 99% rename from ws/utf8dfa.nim rename to websock/utf8dfa.nim index 4d069bc0..a04c56d2 100644 --- a/ws/utf8dfa.nim +++ b/websock/utf8dfa.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/utils.nim b/websock/utils.nim similarity index 99% rename from ws/utils.nim rename to websock/utils.nim index c33ad103..25772a36 100644 --- a/ws/utils.nim +++ b/websock/utils.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/ws.nim b/websock/websock.nim similarity index 99% rename from ws/ws.nim rename to websock/websock.nim index c57bf186..09e3ccf3 100644 --- a/ws/ws.nim +++ b/websock/websock.nim @@ -1,4 +1,4 @@ -## nim-ws +## nim-websock ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))