From 5876c45ebe2c6a0473c0d927fa38b1ddc60ddda5 Mon Sep 17 00:00:00 2001 From: Inbal Tako Date: Sun, 19 Jul 2020 10:22:38 +0300 Subject: [PATCH 1/4] Version bump --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 6f730242328dcc2e23151f3c13ca83bef751820f Mon Sep 17 00:00:00 2001 From: Inbal Tako Date: Sun, 19 Jul 2020 10:31:05 +0300 Subject: [PATCH 2/4] Add version test --- securenative/utils/version_utils.py | 5 +---- tests/version_test.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 tests/version_test.py diff --git a/securenative/utils/version_utils.py b/securenative/utils/version_utils.py index fbe4350..efbfc23 100644 --- a/securenative/utils/version_utils.py +++ b/securenative/utils/version_utils.py @@ -5,7 +5,4 @@ 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) From 8e3b07b933a8342e4343bea684fca3e7274715e3 Mon Sep 17 00:00:00 2001 From: Inbal Tako Date: Sun, 19 Jul 2020 10:31:31 +0300 Subject: [PATCH 3/4] Code cleanups --- securenative/utils/version_utils.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/securenative/utils/version_utils.py b/securenative/utils/version_utils.py index efbfc23..003ce9f 100644 --- a/securenative/utils/version_utils.py +++ b/securenative/utils/version_utils.py @@ -1,6 +1,3 @@ -import os - - class VersionUtils(object): @staticmethod From 29b6f881226aa32f50b178f4fce085260049e764 Mon Sep 17 00:00:00 2001 From: Inbal Tako Date: Sun, 19 Jul 2020 10:38:02 +0300 Subject: [PATCH 4/4] Code cleanups --- README.md | 2 +- securenative/config/configuration_builder.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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/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()