diff --git a/README.md b/README.md index 37c55c9..af40624 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ securenative = SecureNative.init_with_api_key("YOUR_API_KEY") from securenative.securenative import SecureNative -securenative = SecureNative.init_with_options(SecureNative.config_builder().with_api_key("API_KEY").with_max_events(10).with_log_level("ERROR")) +securenative = SecureNative.init_with_options(SecureNative.config_builder().with_api_key("API_KEY").with_max_events(10).with_log_level("ERROR").build()) ``` ## Getting SecureNative instance diff --git a/VERSION b/VERSION index f477849..373f8c6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.2 \ No newline at end of file +0.2.3 \ No newline at end of file diff --git a/securenative/config/configuration_builder.py b/securenative/config/configuration_builder.py index ceb5bd3..f764463 100644 --- a/securenative/config/configuration_builder.py +++ b/securenative/config/configuration_builder.py @@ -59,6 +59,9 @@ def with_fail_over_strategy(self, fail_over_strategy): self.fail_over_strategy = fail_over_strategy return self + def build(self): + return self + @staticmethod def get_default_securenative_options(): return SecureNativeOptions() diff --git a/securenative/utils/version_utils.py b/securenative/utils/version_utils.py index fbe4350..003ce9f 100644 --- a/securenative/utils/version_utils.py +++ b/securenative/utils/version_utils.py @@ -1,11 +1,5 @@ -import os - - class VersionUtils(object): @staticmethod def get_version(): - root_dir = os.path.dirname(os.path.abspath(__file__)).replace("/securenative/utils", "") - path = os.path.join(root_dir, "VERSION") - with open(path) as f: - return f.read() + return "0.2.3" diff --git a/tests/version_test.py b/tests/version_test.py new file mode 100644 index 0000000..d2f9a82 --- /dev/null +++ b/tests/version_test.py @@ -0,0 +1,11 @@ +import unittest + +from securenative.utils.version_utils import VersionUtils + + +class VersionTest(unittest.TestCase): + + def test_version(self): + version = VersionUtils.get_version() + + self.assertIsNotNone(version)