Skip to content

Commit 1985fd8

Browse files
Merge pull request #202 from blacklanternsecurity/dev
Dev -> Stable 8.4.1
2 parents b2a6c3e + 8975f61 commit 1985fd8

File tree

8 files changed

+173
-148
lines changed

8 files changed

+173
-148
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cloudcheck"
3-
version = "8.4.0"
3+
version = "8.4.1"
44
edition = "2024"
55
description = "CloudCheck is a simple Rust tool to check whether an IP address or hostname belongs to a cloud provider."
66
license = "GPL-3.0"

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
[![PyPI](https://img.shields.io/pypi/v/cloudcheck)](https://pypi.org/project/cloudcheck/)
55
[![Rust Version](https://img.shields.io/badge/rust-1.70+-orange)](https://www.rust-lang.org)
66
[![Crates.io](https://img.shields.io/crates/v/cloudcheck?color=orange)](https://crates.io/crates/cloudcheck)
7-
[![License](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://github.com/blacklanternsecurity/cloudcheck/blob/master/LICENSE)
7+
[![License](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://github.com/blacklanternsecurity/cloudcheck/blob/stable/LICENSE)
88
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
9-
[![Rust Tests](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/rust-tests.yml/badge.svg?branch=master)](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/rust-tests.yml)
10-
[![Python Tests](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/python-tests.yml/badge.svg?branch=master)](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/python-tests.yml)
11-
[![Pipeline Tests](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/pipeline-tests.yml/badge.svg?branch=master)](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/pipeline-tests.yml)
9+
[![Rust Tests](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/rust-tests.yml/badge.svg?branch=stable)](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/rust-tests.yml)
10+
[![Python Tests](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/python-tests.yml/badge.svg?branch=stable)](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/python-tests.yml)
11+
[![Pipeline Tests](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/pipeline-tests.yml/badge.svg?branch=stable)](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/pipeline-tests.yml)
1212

1313
### UPDATE: Now rewritten in Rust, with [34 supported cloud providers](#supported-cloud-providers)!
1414

cloudcheck_update/__init__.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,47 +11,6 @@
1111
logging.basicConfig(level=logging.INFO)
1212
log = logging.getLogger("cloudcheck")
1313

14-
# Dictionary to store loaded provider classes
15-
_provider_classes: Dict[str, Type[BaseProvider]] = {}
16-
# Dictionary to store instantiated providers
17-
providers: Dict[str, BaseProvider] = {}
18-
19-
20-
def load_provider_classes() -> Dict[str, Type[BaseProvider]]:
21-
"""Dynamically load all cloud provider classes from the providers directory."""
22-
global _provider_classes
23-
24-
if _provider_classes:
25-
return _provider_classes
26-
27-
providers_path = Path(__file__).parent.parent / "cloudcheck" / "providers"
28-
29-
for file in providers_path.glob("*.py"):
30-
if file.stem in ("base", "__init__"):
31-
continue
32-
33-
try:
34-
import_path = f"cloudcheck.providers.{file.stem}"
35-
module = importlib.import_module(import_path)
36-
37-
# Look for classes that inherit from BaseProvider
38-
for attr_name in dir(module):
39-
attr = getattr(module, attr_name)
40-
if (
41-
isinstance(attr, type)
42-
and issubclass(attr, BaseProvider)
43-
and attr != BaseProvider
44-
):
45-
provider_name = attr.__name__.lower()
46-
_provider_classes[provider_name] = attr
47-
print(f"Loaded provider class: {attr.__name__}")
48-
49-
except Exception as e:
50-
log.error(f"Failed to load provider from {file}: {e}")
51-
raise
52-
53-
return _provider_classes
54-
5514

5615
project_root = Path(__file__).parent.parent
5716
json_path = project_root / "cloud_providers_v2.json"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "cloudcheck"
7-
version = "8.4.0"
7+
version = "8.4.1"
88
description = "Detailed database of cloud providers. Instantly look up a domain or IP address"
99
readme = "README.md"
1010
requires-python = ">=3.9"

pytest.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ testpaths = .
33
python_files = test_*.py
44
python_classes = Test*
55
python_functions = test_*
6-
norecursedirs = old
7-
addopts = --ignore=old
6+
norecursedirs = old target
7+
addopts = --ignore=old --ignore=target

0 commit comments

Comments
 (0)