javonet-ruby-sdk 2.4.8 → 2.4.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/javonet-ruby-sdk.gemspec +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Clr/Windows/X64/Javonet.Clr.Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Clr/Windows/X64/JavonetClrRuntime.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Jvm/Linux/X64/JavonetJvmRuntime.jar +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Jvm/MacOs/X64/JavonetJvmRuntime.jar +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Jvm/Windows/X64/JavonetJvmRuntime.jar +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetCppRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetGoRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetJvmRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNetcoreRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejs1816RuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejsRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPerlRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPythonRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRuby278RuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRubyRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpTlsClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libUtils.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetActivationService.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetTcpTlsClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libUtils.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetCppRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetGoRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetJvmRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNetcoreRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs1816RuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejsRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPerlRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPythonRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRuby278RuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRubyRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpClient.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpTlsClient.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejs1816RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRuby278RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Linux/X64/Javonet.Netcore.Core.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Linux/X64/Javonet.Netcore.Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Netcore/MacOs/X64/Javonet.Netcore.Core.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Netcore/MacOs/X64/Javonet.Netcore.Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Windows/X64/Javonet.Netcore.Core.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Windows/X64/Javonet.Netcore.Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/ExtUtils/Helpers/Unix.pm +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/ExtUtils/Helpers/VMS.pm +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/ExtUtils/Helpers/Windows.pm +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/ExtUtils/Helpers.pm +10 -8
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/ExtUtils/InstallPaths.pm +9 -7
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/Module/Build/Tiny.pm +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/Nice/Try.pm +146 -23
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Class/Load/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Data/UUID/UUID.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/FFI/Platypus/Platypus.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/List/Util/Util.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/PPI/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Package/Stash/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Params/Util/Util.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/autobox/autobox.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/share/dist/FFI-Platypus/lib/libplfill.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/autobox.pm +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/autobox.pod +27 -26
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +85 -151
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/ExtUtils/Helpers/Unix.pm +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/ExtUtils/Helpers/VMS.pm +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/ExtUtils/Helpers/Windows.pm +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/ExtUtils/Helpers.pm +10 -8
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/ExtUtils/InstallPaths.pm +9 -7
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/Module/Build/Tiny.pm +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/Nice/Try.pm +146 -23
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/auto/Package/Stash/XS/XS.bundle +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/auto/autobox/autobox.bundle +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/autobox.pm +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/autobox.pod +27 -26
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/perllocal.pod +77 -143
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Scalar/Util/Numeric/Numeric.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/autobox.pm +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/autobox.pod +27 -26
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +37 -15
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/Nice/Try.pm +146 -23
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/Test/Fatal.pm +477 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/interpreter/Interpreter.py +11 -9
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/protocol/CommandSerializer.py +3 -16
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/receiver/Receiver.py +3 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/referenceCache/ReferencesCache.py +2 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/transmitter/Transmitter.py +2 -14
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/transmitter/TransmitterWrapper.py +4 -4
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/webSocketClient/WebSocketClient.py +32 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/utils/ConnectionType.py +1 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/utils/connectionData/IConnectionData.py +18 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/utils/connectionData/InMemoryConnectionData.py +23 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/utils/connectionData/TcpConnectionData.py +67 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/utils/connectionData/WsConnectionData.py +30 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/utils/connectionData/__init__.py +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/interpreter/Interpreter.py +11 -9
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/protocol/CommandSerializer.py +3 -16
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/receiver/Receiver.py +3 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/referenceCache/ReferencesCache.py +2 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/transmitter/Transmitter.py +2 -14
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/transmitter/TransmitterWrapper.py +4 -4
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/webSocketClient/WebSocketClient.py +32 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/utils/ConnectionType.py +1 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/utils/connectionData/IConnectionData.py +18 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/utils/connectionData/InMemoryConnectionData.py +23 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/utils/connectionData/TcpConnectionData.py +67 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/utils/connectionData/WsConnectionData.py +30 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/utils/connectionData/__init__.py +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/generator/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/generator/internal/__pycache__/PythonStringBuilder.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/generator/internal/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/AbstractCommandHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/AbstractHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/ArrayGetItemHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/ArrayGetRankHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/ArrayGetSizeHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/ArrayHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/ArraySetItemHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/CastingHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/CreateClassInstanceHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/DestructReferenceHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/EnableNamespaceHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/EnableTypeHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/GetEnumItemHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/GetEnumNameHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/GetEnumValueHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/GetInstanceFieldHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/GetStaticFieldHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/GetTypeHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/Handler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/HandlerDictionary.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/InvokeInstanceMethodHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/InvokeStaticMethodHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/LoadLibraryHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/ResolveInstanceHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/SetInstanceFieldHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/SetStaticFieldHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/ValueHandler.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/interpreter/Interpreter.py +11 -9
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/interpreter/__pycache__/Interpreter.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/interpreter/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/namespaceCache/__pycache__/NamespaceCache.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/namespaceCache/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/protocol/CommandSerializer.py +3 -16
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/protocol/__pycache__/CommandDeserializer.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/protocol/__pycache__/CommandSerializer.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/protocol/__pycache__/TypeDeserializer.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/protocol/__pycache__/TypeSerializer.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/protocol/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/receiver/Receiver.py +3 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/receiver/__pycache__/Receiver.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/receiver/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/referenceCache/ReferencesCache.py +2 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/referenceCache/__pycache__/ReferencesCache.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/referenceCache/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/transmitter/Transmitter.py +2 -14
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/transmitter/TransmitterWrapper.py +4 -4
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/typeCache/__pycache__/TypeCache.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/typeCache/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/webSocketClient/WebSocketClient.py +32 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/ConnectionType.py +1 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/__pycache__/Command.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/__pycache__/CommandType.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/__pycache__/ConnectionType.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/__pycache__/ExceptionType.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/__pycache__/RuntimeName.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/__pycache__/StringEncodingMode.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/__pycache__/Type.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/connectionData/IConnectionData.py +18 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/connectionData/InMemoryConnectionData.py +23 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/connectionData/TcpConnectionData.py +67 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/connectionData/WsConnectionData.py +30 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/connectionData/__init__.py +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/connectionData/__pycache__/IConnectionData.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/connectionData/__pycache__/InMemoryConnectionData.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/connectionData/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/exception/__pycache__/ExceptionSerializer.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/exception/__pycache__/__init__.cpython-311.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
- metadata +26 -20
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libruby.so.3.1.5 +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libruby.so.3.3.1 +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libruby.3.3.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/x64-vcruntime140-ruby330.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/CPAN/Meta/Requirements/Range.pm +0 -776
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/CPAN/Meta/Requirements.pm +0 -834
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/CPAN/Requirements/Dynamic.pm +0 -384
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/ExtUtils/HasCompiler.pm +0 -308
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/CPAN/Meta/Requirements/Range.pm +0 -776
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/CPAN/Meta/Requirements.pm +0 -834
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/CPAN/Requirements/Dynamic.pm +0 -384
- data/lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/ExtUtils/HasCompiler.pm +0 -308
- data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/utils/TcpConnectionData.py +0 -29
- data/lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/utils/TcpConnectionData.py +0 -29
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/TcpConnectionData.py +0 -29
- data/lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/utils/__pycache__/TcpConnectionData.cpython-311.pyc +0 -0
@@ -0,0 +1,477 @@
|
|
1
|
+
use strict;
|
2
|
+
use warnings;
|
3
|
+
package Test::Fatal;
|
4
|
+
# ABSTRACT: incredibly simple helpers for testing code with exceptions
|
5
|
+
$Test::Fatal::VERSION = '0.017';
|
6
|
+
#pod =head1 SYNOPSIS
|
7
|
+
#pod
|
8
|
+
#pod use Test::More;
|
9
|
+
#pod use Test::Fatal;
|
10
|
+
#pod
|
11
|
+
#pod use System::Under::Test qw(might_die);
|
12
|
+
#pod
|
13
|
+
#pod is(
|
14
|
+
#pod exception { might_die; },
|
15
|
+
#pod undef,
|
16
|
+
#pod "the code lived",
|
17
|
+
#pod );
|
18
|
+
#pod
|
19
|
+
#pod like(
|
20
|
+
#pod exception { might_die; },
|
21
|
+
#pod qr/turns out it died/,
|
22
|
+
#pod "the code died as expected",
|
23
|
+
#pod );
|
24
|
+
#pod
|
25
|
+
#pod isa_ok(
|
26
|
+
#pod exception { might_die; },
|
27
|
+
#pod 'Exception::Whatever',
|
28
|
+
#pod 'the thrown exception',
|
29
|
+
#pod );
|
30
|
+
#pod
|
31
|
+
#pod =head1 DESCRIPTION
|
32
|
+
#pod
|
33
|
+
#pod Test::Fatal is an alternative to the popular L<Test::Exception>. It does much
|
34
|
+
#pod less, but should allow greater flexibility in testing exception-throwing code
|
35
|
+
#pod with about the same amount of typing.
|
36
|
+
#pod
|
37
|
+
#pod It exports one routine by default: C<exception>.
|
38
|
+
#pod
|
39
|
+
#pod B<Achtung!> C<exception> intentionally does not manipulate the call stack.
|
40
|
+
#pod User-written test functions that use C<exception> must be careful to avoid
|
41
|
+
#pod false positives if exceptions use stack traces that show arguments. For a more
|
42
|
+
#pod magical approach involving globally overriding C<caller>, see
|
43
|
+
#pod L<Test::Exception>.
|
44
|
+
#pod
|
45
|
+
#pod =cut
|
46
|
+
|
47
|
+
use Carp ();
|
48
|
+
use Try::Tiny 0.07;
|
49
|
+
|
50
|
+
use Exporter 5.57 'import';
|
51
|
+
|
52
|
+
our @EXPORT = qw(exception);
|
53
|
+
our @EXPORT_OK = qw(exception success dies_ok lives_ok);
|
54
|
+
|
55
|
+
#pod =func exception
|
56
|
+
#pod
|
57
|
+
#pod my $exception = exception { ... };
|
58
|
+
#pod
|
59
|
+
#pod C<exception> takes a bare block of code and returns the exception thrown by
|
60
|
+
#pod that block. If no exception was thrown, it returns undef.
|
61
|
+
#pod
|
62
|
+
#pod B<Achtung!> If the block results in a I<false> exception, such as 0 or the
|
63
|
+
#pod empty string, Test::Fatal itself will die. Since either of these cases
|
64
|
+
#pod indicates a serious problem with the system under testing, this behavior is
|
65
|
+
#pod considered a I<feature>. If you must test for these conditions, you should use
|
66
|
+
#pod L<Try::Tiny>'s try/catch mechanism. (Try::Tiny is the underlying exception
|
67
|
+
#pod handling system of Test::Fatal.)
|
68
|
+
#pod
|
69
|
+
#pod Note that there is no TAP assert being performed. In other words, no "ok" or
|
70
|
+
#pod "not ok" line is emitted. It's up to you to use the rest of C<exception> in an
|
71
|
+
#pod existing test like C<ok>, C<isa_ok>, C<is>, et cetera. Or you may wish to use
|
72
|
+
#pod the C<dies_ok> and C<lives_ok> wrappers, which do provide TAP output.
|
73
|
+
#pod
|
74
|
+
#pod C<exception> does I<not> alter the stack presented to the called block, meaning
|
75
|
+
#pod that if the exception returned has a stack trace, it will include some frames
|
76
|
+
#pod between the code calling C<exception> and the thing throwing the exception.
|
77
|
+
#pod This is considered a I<feature> because it avoids the occasionally twitchy
|
78
|
+
#pod C<Sub::Uplevel> mechanism.
|
79
|
+
#pod
|
80
|
+
#pod B<Achtung!> This is not a great idea:
|
81
|
+
#pod
|
82
|
+
#pod sub exception_like(&$;$) {
|
83
|
+
#pod my ($code, $pattern, $name) = @_;
|
84
|
+
#pod like( &exception($code), $pattern, $name );
|
85
|
+
#pod }
|
86
|
+
#pod
|
87
|
+
#pod exception_like(sub { }, qr/foo/, 'foo appears in the exception');
|
88
|
+
#pod
|
89
|
+
#pod If the code in the C<...> is going to throw a stack trace with the arguments to
|
90
|
+
#pod each subroutine in its call stack (for example via C<Carp::confess>,
|
91
|
+
#pod the test name, "foo appears in the exception" will itself be matched by the
|
92
|
+
#pod regex. Instead, write this:
|
93
|
+
#pod
|
94
|
+
#pod like( exception { ... }, qr/foo/, 'foo appears in the exception' );
|
95
|
+
#pod
|
96
|
+
#pod If you really want a test function that passes the test name, wrap the
|
97
|
+
#pod arguments in an array reference to hide the literal text from a stack trace:
|
98
|
+
#pod
|
99
|
+
#pod sub exception_like(&$) {
|
100
|
+
#pod my ($code, $args) = @_;
|
101
|
+
#pod my ($pattern, $name) = @$args;
|
102
|
+
#pod like( &exception($code), $pattern, $name );
|
103
|
+
#pod }
|
104
|
+
#pod
|
105
|
+
#pod exception_like(sub { }, [ qr/foo/, 'foo appears in the exception' ] );
|
106
|
+
#pod
|
107
|
+
#pod To aid in avoiding the problem where the pattern is seen in the exception
|
108
|
+
#pod because of the call stack, C<$Carp::MaxArgNums> is locally set to -1 when the
|
109
|
+
#pod code block is called. If you really don't want that, set it back to whatever
|
110
|
+
#pod value you like at the beginning of the code block. Obviously, this solution
|
111
|
+
#pod doens't affect all possible ways that args of subroutines in the call stack
|
112
|
+
#pod might taint the test. The intention here is to prevent some false passes from
|
113
|
+
#pod people who didn't read the documentation. Your punishment for reading it is
|
114
|
+
#pod that you must consider whether to do anything about this.
|
115
|
+
#pod
|
116
|
+
#pod B<Achtung>: One final bad idea:
|
117
|
+
#pod
|
118
|
+
#pod isnt( exception { ... }, undef, "my code died!");
|
119
|
+
#pod
|
120
|
+
#pod It's true that this tests that your code died, but you should really test that
|
121
|
+
#pod it died I<for the right reason>. For example, if you make an unrelated mistake
|
122
|
+
#pod in the block, like using the wrong dereference, your test will pass even though
|
123
|
+
#pod the code to be tested isn't really run at all. If you're expecting an
|
124
|
+
#pod inspectable exception with an identifier or class, test that. If you're
|
125
|
+
#pod expecting a string exception, consider using C<like>.
|
126
|
+
#pod
|
127
|
+
#pod =cut
|
128
|
+
|
129
|
+
our ($REAL_TBL, $REAL_CALCULATED_TBL) = (1, 1);
|
130
|
+
|
131
|
+
sub exception (&) {
|
132
|
+
my $code = shift;
|
133
|
+
|
134
|
+
return try {
|
135
|
+
my $incremented = defined $Test::Builder::Level
|
136
|
+
? $Test::Builder::Level - $REAL_CALCULATED_TBL
|
137
|
+
: 0;
|
138
|
+
local $Test::Builder::Level = $REAL_CALCULATED_TBL;
|
139
|
+
if ($incremented) {
|
140
|
+
# each call to exception adds 5 stack frames
|
141
|
+
$Test::Builder::Level += 5;
|
142
|
+
for my $i (1..$incremented) {
|
143
|
+
# -2 because we want to see it from the perspective of the call to
|
144
|
+
# is() within the call to $code->()
|
145
|
+
my $caller = caller($Test::Builder::Level - 2);
|
146
|
+
if ($caller eq __PACKAGE__) {
|
147
|
+
# each call to exception adds 5 stack frames
|
148
|
+
$Test::Builder::Level = $Test::Builder::Level + 5;
|
149
|
+
}
|
150
|
+
else {
|
151
|
+
$Test::Builder::Level = $Test::Builder::Level + 1;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
156
|
+
local $REAL_CALCULATED_TBL = $Test::Builder::Level;
|
157
|
+
local $Carp::MaxArgNums = -1;
|
158
|
+
$code->();
|
159
|
+
return undef;
|
160
|
+
} catch {
|
161
|
+
return $_ if $_;
|
162
|
+
|
163
|
+
my $problem = defined $_ ? 'false' : 'undef';
|
164
|
+
Carp::confess("$problem exception caught by Test::Fatal::exception");
|
165
|
+
};
|
166
|
+
}
|
167
|
+
|
168
|
+
#pod =func success
|
169
|
+
#pod
|
170
|
+
#pod try {
|
171
|
+
#pod should_live;
|
172
|
+
#pod } catch {
|
173
|
+
#pod fail("boo, we died");
|
174
|
+
#pod } success {
|
175
|
+
#pod pass("hooray, we lived");
|
176
|
+
#pod };
|
177
|
+
#pod
|
178
|
+
#pod C<success>, exported only by request, is a L<Try::Tiny> helper with semantics
|
179
|
+
#pod identical to L<C<finally>|Try::Tiny/finally>, but the body of the block will
|
180
|
+
#pod only be run if the C<try> block ran without error.
|
181
|
+
#pod
|
182
|
+
#pod Although almost any needed exception tests can be performed with C<exception>,
|
183
|
+
#pod success blocks may sometimes help organize complex testing.
|
184
|
+
#pod
|
185
|
+
#pod =cut
|
186
|
+
|
187
|
+
sub success (&;@) {
|
188
|
+
my $code = shift;
|
189
|
+
return finally( sub {
|
190
|
+
return if @_; # <-- only run on success
|
191
|
+
$code->();
|
192
|
+
}, @_ );
|
193
|
+
}
|
194
|
+
|
195
|
+
#pod =func dies_ok
|
196
|
+
#pod
|
197
|
+
#pod =func lives_ok
|
198
|
+
#pod
|
199
|
+
#pod Exported only by request, these two functions run a given block of code, and
|
200
|
+
#pod provide TAP output indicating if it did, or did not throw an exception.
|
201
|
+
#pod These provide an easy upgrade path for replacing existing unit tests based on
|
202
|
+
#pod C<Test::Exception>.
|
203
|
+
#pod
|
204
|
+
#pod RJBS does not suggest using this except as a convenience while porting tests to
|
205
|
+
#pod use Test::Fatal's C<exception> routine.
|
206
|
+
#pod
|
207
|
+
#pod use Test::More tests => 2;
|
208
|
+
#pod use Test::Fatal qw(dies_ok lives_ok);
|
209
|
+
#pod
|
210
|
+
#pod dies_ok { die "I failed" } 'code that fails';
|
211
|
+
#pod
|
212
|
+
#pod lives_ok { return "I'm still alive" } 'code that does not fail';
|
213
|
+
#pod
|
214
|
+
#pod =cut
|
215
|
+
|
216
|
+
my $Tester;
|
217
|
+
|
218
|
+
# Signature should match that of Test::Exception
|
219
|
+
sub dies_ok (&;$) {
|
220
|
+
my $code = shift;
|
221
|
+
my $name = shift;
|
222
|
+
|
223
|
+
require Test::Builder;
|
224
|
+
$Tester ||= Test::Builder->new;
|
225
|
+
|
226
|
+
my $tap_pos = $Tester->current_test;
|
227
|
+
|
228
|
+
my $exception = exception( \&$code );
|
229
|
+
|
230
|
+
$name ||= $tap_pos != $Tester->current_test
|
231
|
+
? "...and code should throw an exception"
|
232
|
+
: "code should throw an exception";
|
233
|
+
|
234
|
+
my $ok = $Tester->ok( $exception, $name );
|
235
|
+
$ok or $Tester->diag( "expected an exception but none was raised" );
|
236
|
+
return $ok;
|
237
|
+
}
|
238
|
+
|
239
|
+
sub lives_ok (&;$) {
|
240
|
+
my $code = shift;
|
241
|
+
my $name = shift;
|
242
|
+
|
243
|
+
require Test::Builder;
|
244
|
+
$Tester ||= Test::Builder->new;
|
245
|
+
|
246
|
+
my $tap_pos = $Tester->current_test;
|
247
|
+
|
248
|
+
my $exception = exception( \&$code );
|
249
|
+
|
250
|
+
$name ||= $tap_pos != $Tester->current_test
|
251
|
+
? "...and code should not throw an exception"
|
252
|
+
: "code should not throw an exception";
|
253
|
+
|
254
|
+
my $ok = $Tester->ok( ! $exception, $name );
|
255
|
+
$ok or $Tester->diag( "expected return but an exception was raised" );
|
256
|
+
return $ok;
|
257
|
+
}
|
258
|
+
|
259
|
+
1;
|
260
|
+
|
261
|
+
__END__
|
262
|
+
|
263
|
+
=pod
|
264
|
+
|
265
|
+
=encoding UTF-8
|
266
|
+
|
267
|
+
=head1 NAME
|
268
|
+
|
269
|
+
Test::Fatal - incredibly simple helpers for testing code with exceptions
|
270
|
+
|
271
|
+
=head1 VERSION
|
272
|
+
|
273
|
+
version 0.017
|
274
|
+
|
275
|
+
=head1 SYNOPSIS
|
276
|
+
|
277
|
+
use Test::More;
|
278
|
+
use Test::Fatal;
|
279
|
+
|
280
|
+
use System::Under::Test qw(might_die);
|
281
|
+
|
282
|
+
is(
|
283
|
+
exception { might_die; },
|
284
|
+
undef,
|
285
|
+
"the code lived",
|
286
|
+
);
|
287
|
+
|
288
|
+
like(
|
289
|
+
exception { might_die; },
|
290
|
+
qr/turns out it died/,
|
291
|
+
"the code died as expected",
|
292
|
+
);
|
293
|
+
|
294
|
+
isa_ok(
|
295
|
+
exception { might_die; },
|
296
|
+
'Exception::Whatever',
|
297
|
+
'the thrown exception',
|
298
|
+
);
|
299
|
+
|
300
|
+
=head1 DESCRIPTION
|
301
|
+
|
302
|
+
Test::Fatal is an alternative to the popular L<Test::Exception>. It does much
|
303
|
+
less, but should allow greater flexibility in testing exception-throwing code
|
304
|
+
with about the same amount of typing.
|
305
|
+
|
306
|
+
It exports one routine by default: C<exception>.
|
307
|
+
|
308
|
+
B<Achtung!> C<exception> intentionally does not manipulate the call stack.
|
309
|
+
User-written test functions that use C<exception> must be careful to avoid
|
310
|
+
false positives if exceptions use stack traces that show arguments. For a more
|
311
|
+
magical approach involving globally overriding C<caller>, see
|
312
|
+
L<Test::Exception>.
|
313
|
+
|
314
|
+
=head1 PERL VERSION
|
315
|
+
|
316
|
+
This library should run on perls released even a long time ago. It should work
|
317
|
+
on any version of perl released in the last five years.
|
318
|
+
|
319
|
+
Although it may work on older versions of perl, no guarantee is made that the
|
320
|
+
minimum required version will not be increased. The version may be increased
|
321
|
+
for any reason, and there is no promise that patches will be accepted to lower
|
322
|
+
the minimum required perl.
|
323
|
+
|
324
|
+
=head1 FUNCTIONS
|
325
|
+
|
326
|
+
=head2 exception
|
327
|
+
|
328
|
+
my $exception = exception { ... };
|
329
|
+
|
330
|
+
C<exception> takes a bare block of code and returns the exception thrown by
|
331
|
+
that block. If no exception was thrown, it returns undef.
|
332
|
+
|
333
|
+
B<Achtung!> If the block results in a I<false> exception, such as 0 or the
|
334
|
+
empty string, Test::Fatal itself will die. Since either of these cases
|
335
|
+
indicates a serious problem with the system under testing, this behavior is
|
336
|
+
considered a I<feature>. If you must test for these conditions, you should use
|
337
|
+
L<Try::Tiny>'s try/catch mechanism. (Try::Tiny is the underlying exception
|
338
|
+
handling system of Test::Fatal.)
|
339
|
+
|
340
|
+
Note that there is no TAP assert being performed. In other words, no "ok" or
|
341
|
+
"not ok" line is emitted. It's up to you to use the rest of C<exception> in an
|
342
|
+
existing test like C<ok>, C<isa_ok>, C<is>, et cetera. Or you may wish to use
|
343
|
+
the C<dies_ok> and C<lives_ok> wrappers, which do provide TAP output.
|
344
|
+
|
345
|
+
C<exception> does I<not> alter the stack presented to the called block, meaning
|
346
|
+
that if the exception returned has a stack trace, it will include some frames
|
347
|
+
between the code calling C<exception> and the thing throwing the exception.
|
348
|
+
This is considered a I<feature> because it avoids the occasionally twitchy
|
349
|
+
C<Sub::Uplevel> mechanism.
|
350
|
+
|
351
|
+
B<Achtung!> This is not a great idea:
|
352
|
+
|
353
|
+
sub exception_like(&$;$) {
|
354
|
+
my ($code, $pattern, $name) = @_;
|
355
|
+
like( &exception($code), $pattern, $name );
|
356
|
+
}
|
357
|
+
|
358
|
+
exception_like(sub { }, qr/foo/, 'foo appears in the exception');
|
359
|
+
|
360
|
+
If the code in the C<...> is going to throw a stack trace with the arguments to
|
361
|
+
each subroutine in its call stack (for example via C<Carp::confess>,
|
362
|
+
the test name, "foo appears in the exception" will itself be matched by the
|
363
|
+
regex. Instead, write this:
|
364
|
+
|
365
|
+
like( exception { ... }, qr/foo/, 'foo appears in the exception' );
|
366
|
+
|
367
|
+
If you really want a test function that passes the test name, wrap the
|
368
|
+
arguments in an array reference to hide the literal text from a stack trace:
|
369
|
+
|
370
|
+
sub exception_like(&$) {
|
371
|
+
my ($code, $args) = @_;
|
372
|
+
my ($pattern, $name) = @$args;
|
373
|
+
like( &exception($code), $pattern, $name );
|
374
|
+
}
|
375
|
+
|
376
|
+
exception_like(sub { }, [ qr/foo/, 'foo appears in the exception' ] );
|
377
|
+
|
378
|
+
To aid in avoiding the problem where the pattern is seen in the exception
|
379
|
+
because of the call stack, C<$Carp::MaxArgNums> is locally set to -1 when the
|
380
|
+
code block is called. If you really don't want that, set it back to whatever
|
381
|
+
value you like at the beginning of the code block. Obviously, this solution
|
382
|
+
doens't affect all possible ways that args of subroutines in the call stack
|
383
|
+
might taint the test. The intention here is to prevent some false passes from
|
384
|
+
people who didn't read the documentation. Your punishment for reading it is
|
385
|
+
that you must consider whether to do anything about this.
|
386
|
+
|
387
|
+
B<Achtung>: One final bad idea:
|
388
|
+
|
389
|
+
isnt( exception { ... }, undef, "my code died!");
|
390
|
+
|
391
|
+
It's true that this tests that your code died, but you should really test that
|
392
|
+
it died I<for the right reason>. For example, if you make an unrelated mistake
|
393
|
+
in the block, like using the wrong dereference, your test will pass even though
|
394
|
+
the code to be tested isn't really run at all. If you're expecting an
|
395
|
+
inspectable exception with an identifier or class, test that. If you're
|
396
|
+
expecting a string exception, consider using C<like>.
|
397
|
+
|
398
|
+
=head2 success
|
399
|
+
|
400
|
+
try {
|
401
|
+
should_live;
|
402
|
+
} catch {
|
403
|
+
fail("boo, we died");
|
404
|
+
} success {
|
405
|
+
pass("hooray, we lived");
|
406
|
+
};
|
407
|
+
|
408
|
+
C<success>, exported only by request, is a L<Try::Tiny> helper with semantics
|
409
|
+
identical to L<C<finally>|Try::Tiny/finally>, but the body of the block will
|
410
|
+
only be run if the C<try> block ran without error.
|
411
|
+
|
412
|
+
Although almost any needed exception tests can be performed with C<exception>,
|
413
|
+
success blocks may sometimes help organize complex testing.
|
414
|
+
|
415
|
+
=head2 dies_ok
|
416
|
+
|
417
|
+
=head2 lives_ok
|
418
|
+
|
419
|
+
Exported only by request, these two functions run a given block of code, and
|
420
|
+
provide TAP output indicating if it did, or did not throw an exception.
|
421
|
+
These provide an easy upgrade path for replacing existing unit tests based on
|
422
|
+
C<Test::Exception>.
|
423
|
+
|
424
|
+
RJBS does not suggest using this except as a convenience while porting tests to
|
425
|
+
use Test::Fatal's C<exception> routine.
|
426
|
+
|
427
|
+
use Test::More tests => 2;
|
428
|
+
use Test::Fatal qw(dies_ok lives_ok);
|
429
|
+
|
430
|
+
dies_ok { die "I failed" } 'code that fails';
|
431
|
+
|
432
|
+
lives_ok { return "I'm still alive" } 'code that does not fail';
|
433
|
+
|
434
|
+
=head1 AUTHOR
|
435
|
+
|
436
|
+
Ricardo Signes <cpan@semiotic.systems>
|
437
|
+
|
438
|
+
=head1 CONTRIBUTORS
|
439
|
+
|
440
|
+
=for stopwords David Golden Graham Knop Jesse Luehrs Joel Bernstein Karen Etheridge Ricardo Signes
|
441
|
+
|
442
|
+
=over 4
|
443
|
+
|
444
|
+
=item *
|
445
|
+
|
446
|
+
David Golden <dagolden@cpan.org>
|
447
|
+
|
448
|
+
=item *
|
449
|
+
|
450
|
+
Graham Knop <haarg@haarg.org>
|
451
|
+
|
452
|
+
=item *
|
453
|
+
|
454
|
+
Jesse Luehrs <doy@tozt.net>
|
455
|
+
|
456
|
+
=item *
|
457
|
+
|
458
|
+
Joel Bernstein <joel@fysh.org>
|
459
|
+
|
460
|
+
=item *
|
461
|
+
|
462
|
+
Karen Etheridge <ether@cpan.org>
|
463
|
+
|
464
|
+
=item *
|
465
|
+
|
466
|
+
Ricardo Signes <rjbs@semiotic.systems>
|
467
|
+
|
468
|
+
=back
|
469
|
+
|
470
|
+
=head1 COPYRIGHT AND LICENSE
|
471
|
+
|
472
|
+
This software is copyright (c) 2010 by Ricardo Signes.
|
473
|
+
|
474
|
+
This is free software; you can redistribute it and/or modify it under
|
475
|
+
the same terms as the Perl 5 programming language system itself.
|
476
|
+
|
477
|
+
=cut
|
@@ -3,30 +3,32 @@ from javonet.core.protocol.CommandDeserializer import CommandDeserializer
|
|
3
3
|
from javonet.core.protocol.CommandSerializer import CommandSerializer
|
4
4
|
from javonet.utils.ConnectionType import ConnectionType
|
5
5
|
from javonet.utils.RuntimeName import RuntimeName
|
6
|
-
from javonet.utils.
|
7
|
-
|
6
|
+
from javonet.utils.connectionData.IConnectionData import IConnectionData
|
8
7
|
|
9
8
|
class Interpreter:
|
10
|
-
response = None
|
11
9
|
|
12
|
-
def execute(self, command,
|
10
|
+
def execute(self, command, connection_data: IConnectionData):
|
13
11
|
command_serializer = CommandSerializer()
|
14
|
-
serialized_command = command_serializer.serialize(command,
|
15
|
-
|
12
|
+
serialized_command = command_serializer.serialize(command, connection_data)
|
13
|
+
response = None
|
14
|
+
if connection_data.connection_type == ConnectionType.WebSocket:
|
15
|
+
from javonet.core.webSocketClient.WebSocketClient import WebSocketClient
|
16
|
+
response = WebSocketClient().send_message(connection_data, serialized_command)
|
17
|
+
elif (command.runtime_name == RuntimeName.python) & (connection_data.connection_type == ConnectionType.InMemory):
|
16
18
|
from javonet.core.receiver.Receiver import Receiver
|
17
19
|
response = Receiver().SendCommand(serialized_command, len(serialized_command))
|
18
20
|
else:
|
19
21
|
from javonet.core.transmitter.Transmitter import Transmitter
|
20
22
|
response = Transmitter.send_command(serialized_command)
|
21
|
-
command_deserializer = CommandDeserializer(response, len(response))
|
22
23
|
|
24
|
+
command_deserializer = CommandDeserializer(response, len(response))
|
23
25
|
return command_deserializer.deserialize()
|
24
26
|
|
25
|
-
def process(self, byte_array, byte_array_len):
|
27
|
+
def process(self, byte_array, byte_array_len, connection_data: IConnectionData):
|
26
28
|
command_deserializer = CommandDeserializer(byte_array, byte_array_len)
|
27
29
|
received_command = command_deserializer.deserialize()
|
28
30
|
python_handler = Handler()
|
29
31
|
command_serializer = CommandSerializer()
|
30
32
|
response_command = python_handler.handle_command(received_command)
|
31
|
-
encoded_response = command_serializer.serialize(response_command,
|
33
|
+
encoded_response = command_serializer.serialize(response_command, connection_data)
|
32
34
|
return encoded_response
|
data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/protocol/CommandSerializer.py
CHANGED
@@ -1,36 +1,23 @@
|
|
1
|
-
import struct
|
2
1
|
from collections import deque
|
3
2
|
from typing import Deque
|
4
3
|
|
5
4
|
from javonet.core.protocol.TypeSerializer import TypeSerializer
|
6
5
|
from javonet.utils.Command import Command
|
7
|
-
from javonet.utils.ConnectionType import ConnectionType
|
8
6
|
from javonet.utils.RuntimeName import RuntimeName
|
9
|
-
from javonet.utils.
|
7
|
+
from javonet.utils.connectionData.IConnectionData import IConnectionData
|
10
8
|
|
11
9
|
|
12
10
|
class CommandSerializer:
|
13
11
|
byte_buffer = []
|
14
12
|
|
15
|
-
def serialize(self, root_command
|
13
|
+
def serialize(self, root_command: Command, connection_data: IConnectionData, runtime_version=0):
|
16
14
|
queue: Deque[Command] = deque()
|
17
15
|
queue.append(root_command)
|
18
16
|
self.insert_into_buffer([root_command.runtime_name.value, runtime_version])
|
19
|
-
|
20
|
-
self.insert_into_buffer([ConnectionType.Tcp.value])
|
21
|
-
self.insert_into_buffer(self.serialize_tcp(tcp_connection_data))
|
22
|
-
else:
|
23
|
-
self.insert_into_buffer([ConnectionType.InMemory.value])
|
24
|
-
self.insert_into_buffer([0, 0, 0, 0, 0, 0])
|
17
|
+
self.insert_into_buffer(connection_data.serialize_connection_data())
|
25
18
|
self.insert_into_buffer([RuntimeName.python.value, root_command.command_type.value])
|
26
19
|
return self.serialize_recursively(queue)
|
27
20
|
|
28
|
-
@staticmethod
|
29
|
-
def serialize_tcp(tcp_connection_data):
|
30
|
-
if tcp_connection_data is None:
|
31
|
-
raise Exception("tcp_connection_data is not provided")
|
32
|
-
return tcp_connection_data.get_address_bytes() + tcp_connection_data.get_pot_bytes()
|
33
|
-
|
34
21
|
@staticmethod
|
35
22
|
def serialize_primitive(payload_item):
|
36
23
|
if payload_item is None:
|
@@ -1,13 +1,15 @@
|
|
1
1
|
from javonet.core.interpreter.Interpreter import Interpreter
|
2
|
+
from javonet.utils.connectionData.InMemoryConnectionData import InMemoryConnectionData
|
2
3
|
|
3
4
|
|
4
5
|
class Receiver:
|
5
6
|
|
6
7
|
def __init__(self):
|
7
8
|
self.python_interpreter = Interpreter()
|
9
|
+
self.connection_data = InMemoryConnectionData()
|
8
10
|
|
9
11
|
def SendCommand(self, messageByteArray, messageByteArrayLen):
|
10
|
-
return bytearray(self.python_interpreter.process(messageByteArray, len(messageByteArray)))
|
12
|
+
return bytearray(self.python_interpreter.process(messageByteArray, len(messageByteArray), self.connection_data))
|
11
13
|
|
12
14
|
def HeartBeat(self, messageByteArray, messageByteArrayLen):
|
13
15
|
response_byte_array = bytearray(2)
|
data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/referenceCache/ReferencesCache.py
CHANGED
@@ -2,6 +2,7 @@ import uuid
|
|
2
2
|
import threading
|
3
3
|
from javonet.utils.CommandType import CommandType
|
4
4
|
|
5
|
+
|
5
6
|
class ReferencesCache(object):
|
6
7
|
_instance = None
|
7
8
|
references_cache = dict()
|
@@ -35,4 +36,4 @@ class ReferencesCache(object):
|
|
35
36
|
del self.references_cache[reference_guid]
|
36
37
|
return 0
|
37
38
|
except KeyError:
|
38
|
-
raise Exception("Object not found in references")
|
39
|
+
raise Exception("Object not found in references")
|
@@ -8,20 +8,8 @@ class Transmitter:
|
|
8
8
|
return TransmitterWrapper.send_command(message)
|
9
9
|
|
10
10
|
@staticmethod
|
11
|
-
def
|
12
|
-
return TransmitterWrapper.activate(license_key
|
13
|
-
|
14
|
-
@staticmethod
|
15
|
-
def activate_with_license_file():
|
16
|
-
return Transmitter.__activate()
|
17
|
-
|
18
|
-
@staticmethod
|
19
|
-
def activate_with_credentials(license_key):
|
20
|
-
return Transmitter.__activate(license_key)
|
21
|
-
|
22
|
-
@staticmethod
|
23
|
-
def activate_with_credentials_and_proxy(license_key, proxy_host, proxy_user_name, proxy_user_password):
|
24
|
-
return Transmitter.__activate(license_key, proxy_host, proxy_user_name, proxy_user_password)
|
11
|
+
def activate(license_key):
|
12
|
+
return TransmitterWrapper.activate(license_key)
|
25
13
|
|
26
14
|
@staticmethod
|
27
15
|
def set_config_source(source_path):
|
data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/transmitter/TransmitterWrapper.py
CHANGED
@@ -47,15 +47,15 @@ class TransmitterWrapper:
|
|
47
47
|
"Javonet native error code: " + str(response_array_len) + ". " + str(error_message))
|
48
48
|
|
49
49
|
@staticmethod
|
50
|
-
def activate(license_key
|
50
|
+
def activate(license_key):
|
51
51
|
activate = TransmitterWrapper.python_lib.Activate
|
52
52
|
activate.restype = c_int
|
53
53
|
activate.argtypes = [c_char_p, c_char_p, c_char_p, c_char_p]
|
54
54
|
|
55
55
|
activation_result = activate(license_key.encode('ascii'),
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
"".encode('ascii'),
|
57
|
+
"".encode('ascii'),
|
58
|
+
"".encode('ascii'))
|
59
59
|
|
60
60
|
if activation_result < 0:
|
61
61
|
get_native_error = TransmitterWrapper.python_lib.GetNativeError
|
data/lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/webSocketClient/WebSocketClient.py
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
import asyncio
|
2
|
+
import struct
|
3
|
+
from websockets.sync.client import connect
|
4
|
+
|
5
|
+
from javonet.utils.connectionData.WsConnectionData import WsConnectionData
|
6
|
+
|
7
|
+
|
8
|
+
class WebSocketClient:
|
9
|
+
_instance = None
|
10
|
+
clients = dict()
|
11
|
+
|
12
|
+
def __new__(cls):
|
13
|
+
if cls._instance is None:
|
14
|
+
cls._instance = super(WebSocketClient, cls).__new__(cls)
|
15
|
+
return cls._instance
|
16
|
+
|
17
|
+
def add_or_get_client(self, connection_data: WsConnectionData):
|
18
|
+
if connection_data.hostname in self.clients:
|
19
|
+
return self.clients[connection_data.hostname]
|
20
|
+
else:
|
21
|
+
self.clients[connection_data.hostname] = connect(connection_data.hostname)
|
22
|
+
return self.clients[connection_data.hostname]
|
23
|
+
|
24
|
+
def send_message(self, connection_data: WsConnectionData, serialized_command):
|
25
|
+
byte_array = struct.pack("B" * len(serialized_command), *serialized_command)
|
26
|
+
return self.send(connection_data, byte_array)
|
27
|
+
|
28
|
+
def send(self, connection_data: WsConnectionData, byte_array):
|
29
|
+
websocket = self.add_or_get_client(connection_data)
|
30
|
+
websocket.send(byte_array)
|
31
|
+
response = websocket.recv()
|
32
|
+
return response
|