specmatic 2.7.5__py3-none-any.whl → 2.9.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of specmatic might be problematic. Click here for more details.
- specmatic/core/specmatic.jar +0 -0
- specmatic/core/specmatic_stub.py +19 -1
- specmatic/version.py +2 -2
- {specmatic-2.7.5.dist-info → specmatic-2.9.0.dist-info}/METADATA +1 -1
- {specmatic-2.7.5.dist-info → specmatic-2.9.0.dist-info}/RECORD +7 -7
- {specmatic-2.7.5.dist-info → specmatic-2.9.0.dist-info}/WHEEL +0 -0
- {specmatic-2.7.5.dist-info → specmatic-2.9.0.dist-info}/top_level.txt +0 -0
specmatic/core/specmatic.jar
CHANGED
|
Binary file
|
specmatic/core/specmatic_stub.py
CHANGED
|
@@ -4,6 +4,7 @@ import subprocess
|
|
|
4
4
|
import threading
|
|
5
5
|
import traceback
|
|
6
6
|
from queue import Queue
|
|
7
|
+
from urllib.parse import urlparse
|
|
7
8
|
|
|
8
9
|
import requests
|
|
9
10
|
|
|
@@ -94,7 +95,7 @@ class SpecmaticStub(SpecmaticBase):
|
|
|
94
95
|
|
|
95
96
|
if self.__stub_serving_message in line:
|
|
96
97
|
if self.port == 0:
|
|
97
|
-
self.port = line.split(self.__stub_serving_message)[0]
|
|
98
|
+
self.port = self._extract_port(line.split(self.__stub_serving_message)[0])
|
|
98
99
|
self.__stub_started_event.set()
|
|
99
100
|
|
|
100
101
|
def read_and_print_output_line_by_line():
|
|
@@ -111,6 +112,23 @@ class SpecmaticStub(SpecmaticBase):
|
|
|
111
112
|
self.__error_queue.put(tb)
|
|
112
113
|
self.__stub_started_event.set()
|
|
113
114
|
|
|
115
|
+
@staticmethod
|
|
116
|
+
def _extract_port(text: str) -> str:
|
|
117
|
+
for token in text.split():
|
|
118
|
+
try:
|
|
119
|
+
parsed = urlparse(token)
|
|
120
|
+
if not parsed.hostname:
|
|
121
|
+
continue
|
|
122
|
+
|
|
123
|
+
implicit_port = { "http": 80,"https": 443 }.get(parsed.scheme, None)
|
|
124
|
+
port = parsed.port if parsed.port not in (None, -1) else implicit_port
|
|
125
|
+
if port is not None:
|
|
126
|
+
return str(port)
|
|
127
|
+
except ValueError:
|
|
128
|
+
continue
|
|
129
|
+
|
|
130
|
+
raise Exception(f"Unable to extract port from: {text}")
|
|
131
|
+
|
|
114
132
|
def __read_process_error_output(self):
|
|
115
133
|
try:
|
|
116
134
|
for line in iter(self.__process.stderr.readline, ''):
|
specmatic/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = '2.
|
|
2
|
-
__specmatic_version__ = '2.
|
|
1
|
+
__version__ = '2.9.0'
|
|
2
|
+
__specmatic_version__ = '2.9.0'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
specmatic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
specmatic/build_utils.py,sha256=vIOoNyEUYofdMo3-U5bB9obL0lvjw4dEEGbZJNIzsL0,564
|
|
3
3
|
specmatic/utils.py,sha256=6JDPqpO51ykl0MWCOa32jkUOXZ-0RZ6N5Ng9_7r7XaU,519
|
|
4
|
-
specmatic/version.py,sha256=
|
|
4
|
+
specmatic/version.py,sha256=hKMn9vQm9DdjyaganrZv025Nc1C2gJQLTIoE2mJY5QM,54
|
|
5
5
|
specmatic/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
specmatic/core/decorators.py,sha256=jGi_m2tGGn8HZOyiMvAB3GvOWW_AkuWZvfqztMVy2pc,3972
|
|
7
|
-
specmatic/core/specmatic.jar,sha256=
|
|
7
|
+
specmatic/core/specmatic.jar,sha256=diTlPME5PSPbyYaHPASKZooUBnwvWl0jUE9c5nc46ks,69241524
|
|
8
8
|
specmatic/core/specmatic.py,sha256=vi7-LM5XTKipWwemh5cnbIoAZDbg9fpFEISDs6YM_f4,7918
|
|
9
9
|
specmatic/core/specmatic_base.py,sha256=IN9LY45EB5ApRtpF-LEkLmmy20gAXXAMwYhJQrS8TT0,1334
|
|
10
|
-
specmatic/core/specmatic_stub.py,sha256=
|
|
10
|
+
specmatic/core/specmatic_stub.py,sha256=yIaiXjur2SQQnpj2qaM6CX3EARdbKBJ-YP5qFu2Cgp4,5585
|
|
11
11
|
specmatic/core/specmatic_test.py,sha256=cXU5882L5wPUiscWwm1HDR_knBJjOCNssODcUrKBHdI,1048
|
|
12
12
|
specmatic/coverage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
specmatic/coverage/app_route_adapter.py,sha256=hFJ54R7CZFK9jFI6VbxHtKJKJgLX4PUX47TMdWjjhSA,1538
|
|
@@ -29,7 +29,7 @@ specmatic/servers/app_server.py,sha256=kOZviJA7-F4kmMTLGiBln2oO5uYX28wKJM2xQJTOV
|
|
|
29
29
|
specmatic/servers/asgi_app_server.py,sha256=yn3tpWoF-nP8labOJdn49UB85vKiqIELVXk-gAugcUc,2924
|
|
30
30
|
specmatic/servers/wsgi_app_server.py,sha256=3aU-o6Hh8FrnZlbjCLLpGY92HvJoU_rcqsZIb9TKVr8,1342
|
|
31
31
|
specmatic/servers/wsgi_server_thread.py,sha256=XUEYW7-FP1a-5EkQVGc3FI_jkDQBocArxHLiCn3JJvc,691
|
|
32
|
-
specmatic-2.
|
|
33
|
-
specmatic-2.
|
|
34
|
-
specmatic-2.
|
|
35
|
-
specmatic-2.
|
|
32
|
+
specmatic-2.9.0.dist-info/METADATA,sha256=KeujwpP_AU2Ld1Ar6pQ4Rhjuzg9OpRUidlMfvtbNFg8,10356
|
|
33
|
+
specmatic-2.9.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
34
|
+
specmatic-2.9.0.dist-info/top_level.txt,sha256=E7kQ78YacKBoKKeKWR_N83exlG8r5J0wlzlGqFmvIfo,10
|
|
35
|
+
specmatic-2.9.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|