diff --git a/CHANGELOG b/CHANGELOG index 5e126d3f..70571d1f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,17 +1,18 @@ jc changelog -20260417 v1.25.7 +20260422 v1.25.7 - Add `typeset` and `declare` Bash internal command parser to convert variables simple arrays, and associative arrays along with object metadata - Enhance `pip-show` command parser to add `-f` show files support - Enhance `rsync` and `rsync-s` parsers to add `--stats` or `--info=stats[1-3]` fields -- Fix `hashsum` command parser to correctly parse the `mode` indicator +- Fix `certbot` command parser to allow parsing of named certs - Fix `dir` command parser for incorrect stripping of the `D:` drive letter +- Fix `hashsum` command parser to correctly parse the `mode` indicator +- Fix `ifconfig` command parser for incorrect stripping of leading zeros in some hex numbers +- Fix `iptables` command parser when Target is blank and verbose output is used - Fix `lsattr` command parser for filenames with spaces (newlines in filenames are still not supported) - Fix `proc-pid-smaps` proc parser when unknown VmFlags are output -- Fix `ifconfig` command parser for incorrect stripping of leading zeros in some hex numbers -- Fix `iptables` command parser when Target is blank and verbose output is used - Fix `ufw` command parser to support rule logging. A new boolean `log` field is introduced 20251012 v1.25.6 diff --git a/jc/parsers/certbot.py b/jc/parsers/certbot.py index 7a9de2ce..c6f3194a 100644 --- a/jc/parsers/certbot.py +++ b/jc/parsers/certbot.py @@ -138,7 +138,7 @@ import jc.utils class info(): """Provides parser metadata (version, author, etc.)""" - version = '1.2' + version = '1.3' description = '`certbot` command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' diff --git a/tests/fixtures/generic/certbot-certs-cert-name.json b/tests/fixtures/generic/certbot-certs-cert-name.json index 4d9ec3a5..7834ea21 100644 --- a/tests/fixtures/generic/certbot-certs-cert-name.json +++ b/tests/fixtures/generic/certbot-certs-cert-name.json @@ -1 +1 @@ -{"certificates":[{"name":"example.com","serial_number":"3f7axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","key_type":"RSA","domains":["example.com","www.example.com"],"expiration_date":"2023-05-11 01:33:10+00:00","validity":"63 days","certificate_path":"/etc/letsencrypt/live/example.com/fullchain.pem","private_key_path":"/etc/letsencrypt/live/example.com/privkey.pem","expiration_date_epoch":1683783190,"expiration_date_epoch_utc":1776781855,"expiration_date_iso":"2026-04-21T07:30:55-0700"}]} +{"certificates":[{"name":"example.com","serial_number":"3f7axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","key_type":"RSA","domains":["example.com","www.example.com"],"expiration_date":"2023-05-11 01:33:10+00:00","validity":"63 days","certificate_path":"/etc/letsencrypt/live/example.com/fullchain.pem","private_key_path":"/etc/letsencrypt/live/example.com/privkey.pem","expiration_date_epoch":1683793990,"expiration_date_epoch_utc":1683768790,"expiration_date_iso":"2023-05-11T01:33:10+00:00"}]} diff --git a/tests/fixtures/generic/certbot-certs.json b/tests/fixtures/generic/certbot-certs.json index 7a8696e8..cec83684 100644 --- a/tests/fixtures/generic/certbot-certs.json +++ b/tests/fixtures/generic/certbot-certs.json @@ -1 +1 @@ -{"certificates":[{"name":"example.com","serial_number":"3f7axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","key_type":"RSA","domains":["example.com","www.example.com"],"expiration_date":"2023-05-11 01:33:10+00:00","validity":"63 days","certificate_path":"/etc/letsencrypt/live/example.com/fullchain.pem","private_key_path":"/etc/letsencrypt/live/example.com/privkey.pem","expiration_date_epoch":1683783190,"expiration_date_epoch_utc":1683768790,"expiration_date_iso":"2023-05-11T01:33:10+00:00"},{"name":"example.org","serial_number":"3bcyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy","key_type":"RSA","domains":["example.org","www.example.org"],"expiration_date":"2023-06-12 01:35:30+00:00","validity":"63 days","certificate_path":"/etc/letsencrypt/live/example.org/fullchain.pem","private_key_path":"/etc/letsencrypt/live/example.org/privkey.pem","expiration_date_epoch":1686548130,"expiration_date_epoch_utc":1776781855,"expiration_date_iso":"2026-04-21T07:30:55-0700"}]} +{"certificates":[{"name":"example.com","serial_number":"3f7axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","key_type":"RSA","domains":["example.com","www.example.com"],"expiration_date":"2023-05-11 01:33:10+00:00","validity":"63 days","certificate_path":"/etc/letsencrypt/live/example.com/fullchain.pem","private_key_path":"/etc/letsencrypt/live/example.com/privkey.pem","expiration_date_epoch":1683793990,"expiration_date_epoch_utc":1683768790,"expiration_date_iso":"2023-05-11T01:33:10+00:00"},{"name":"example.org","serial_number":"3bcyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy","key_type":"RSA","domains":["example.org","www.example.org"],"expiration_date":"2023-06-12 01:35:30+00:00","validity":"63 days","certificate_path":"/etc/letsencrypt/live/example.org/fullchain.pem","private_key_path":"/etc/letsencrypt/live/example.org/privkey.pem","expiration_date_epoch":1686558930,"expiration_date_epoch_utc":1686533730,"expiration_date_iso":"2023-06-12T01:35:30+00:00"}]} diff --git a/tests/test_certbot.py b/tests/test_certbot.py index 16d83df6..a1a2057f 100644 --- a/tests/test_certbot.py +++ b/tests/test_certbot.py @@ -10,7 +10,7 @@ THIS_DIR = os.path.dirname(os.path.abspath(__file__)) class MyTests(unittest.TestCase): f_in: Dict = {} f_json: Dict = {} - maxDiff = None + @classmethod def setUpClass(cls): fixtures = {