diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-04-16 05:37:14 -0700 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2018-04-16 08:37:14 -0400 |
commit | 6e2cb00008cbf09e556b00f87603797fcaa47e09 (patch) | |
tree | 3c0eb55ff4226a3f024aad373140d1fb860a6404 /vendor/github.com/corpix | |
parent | bf24f51c4e1cc6286885460672f7f449e8c6f5ef (diff) | |
download | chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.gz chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.bz2 chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.zip |
Depenancy upgrades and movign to dep. (#8630)
Diffstat (limited to 'vendor/github.com/corpix')
4 files changed, 0 insertions, 96 deletions
diff --git a/vendor/github.com/corpix/uarand/scripts/extract-user-agents b/vendor/github.com/corpix/uarand/scripts/extract-user-agents deleted file mode 100755 index 3c6b8af86..000000000 --- a/vendor/github.com/corpix/uarand/scripts/extract-user-agents +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python3 -import sys -import xml.etree.ElementTree as XML -from argparse import ArgumentParser - - -if __name__ == "__main__": - p = ArgumentParser( - description=( - "Expects XML from " - "http://techpatterns.com/downloads/firefox/useragentswitcher.xml " - "to be passed into STDIN and outputs user agents from this XML." - ) - ) - p.parse_args() - - sys.stderr.write("Reading stdin...\n") - doc = XML.iterparse(sys.stdin) - for _, node in doc: - ua = node.get("useragent") - if ua != "" and ua is not None: - print(ua) diff --git a/vendor/github.com/corpix/uarand/scripts/generate-useragents-go b/vendor/github.com/corpix/uarand/scripts/generate-useragents-go deleted file mode 100755 index e65581b3a..000000000 --- a/vendor/github.com/corpix/uarand/scripts/generate-useragents-go +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python3 -import sys -from os.path import exists, expanduser -from argparse import ArgumentParser - - -header = """package {package} - -var ( -\t// UserAgents is a list of browser and bots user agents. -\tUserAgents = []string{{ -""" - -item = """\t\t"{content}",\n""" - -footer = """\t}} -)\n -""" - -if __name__ == "__main__": - p = ArgumentParser( - description=( - "Expects a list of user agents delimited by new line character " - "to be passed into STDIN and generates go code with this data." - ) - ) - p.add_argument( - "package", - help="Go package name to use", - default="uarand" - ) - args = p.parse_args().__dict__ - - params = args.copy() - sys.stderr.write("Reading stdin...\n") - sys.stdout.write( - header.format(**params) - ) - - for line in sys.stdin: - sys.stdout.write( - item.format( - content=line.strip(), - **params - ) - ) - - sys.stdout.write( - footer.format(**params) - ) diff --git a/vendor/github.com/corpix/uarand/uarand_test.go b/vendor/github.com/corpix/uarand/uarand_test.go deleted file mode 100644 index 0659ff200..000000000 --- a/vendor/github.com/corpix/uarand/uarand_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package uarand - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestGetRandom(t *testing.T) { - for k := 0; k < len(UserAgents)*10; k++ { - assert.NotEqual(t, "", GetRandom()) - } -} diff --git a/vendor/github.com/corpix/uarand/useragents_test.go b/vendor/github.com/corpix/uarand/useragents_test.go deleted file mode 100644 index 2f0c82cfc..000000000 --- a/vendor/github.com/corpix/uarand/useragents_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package uarand - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestUserAgents(t *testing.T) { - assert.Equal(t, true, len(UserAgents) > 0) -} |