Skip to content

Commit 210c9ea

Browse files
authored
Basename - (SDK Automation prep) (#3272) (#3275)
* Basename - (SDK Automation prep) * Fixing HelpValidator
1 parent ab33927 commit 210c9ea

File tree

7 files changed

+44
-36
lines changed

7 files changed

+44
-36
lines changed

plugins/basename/.CHECKSUM

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"spec": "3aceb039b7e4b038f160a3d07cb564e9",
3-
"manifest": "5fbfe5212ba2b9fc3c6ff1584fb8ee6c",
4-
"setup": "46f9a1a755f402049becbac7ce56f361",
2+
"spec": "b32162b0cbcd932189a6f4acb43a850c",
3+
"manifest": "7b7e08663d77e5da6b2425ba287a1f82",
4+
"setup": "72ba8b92c7c66fda446192ec7bfa489e",
55
"schemas": [
66
{
77
"identifier": "basename/schema.py",
8-
"hash": "61c5508784ab90cb6b32af49da51b0c4"
8+
"hash": "45b84fafd3c212e2086720d96212cd99"
99
},
1010
{
1111
"identifier": "connection/schema.py",

plugins/basename/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.1.3
1+
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.2.5
22

33
LABEL organization=rapid7
44
LABEL sdk=python
@@ -12,7 +12,7 @@ RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
1212

1313
ADD . /python/src
1414

15-
RUN python setup.py build && python setup.py install
15+
RUN pip install .
1616

1717
# User to run plugin code. The two supported users are: root, nobody
1818
USER nobody

plugins/basename/bin/komand_basename

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ from sys import argv
66

77
Name = "Basename"
88
Vendor = "rapid7"
9-
Version = "1.1.3"
10-
Description = "This plugin is used to get the last item of a file path or URL using Python's basename utility"
9+
Version = "1.1.4"
10+
Description = "Basename is used to get the last item of a file path or URL using Python's basename utility"
1111

1212

1313
def main():

plugins/basename/help.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Description
22

3-
This plugin is used to get the last item of a file path or URL using Python's basename utility
3+
Basename is used to get the last item of a file path or URL using Python's basename utility
44

55
# Key Features
66

7-
* Obtain basename of a file path or URL.
7+
* Obtain Basename of a file path or URL.
88

99
# Requirements
1010

@@ -27,7 +27,7 @@ This plugin is used to get the last item of a file path or URL using Python's ba
2727

2828
#### Basename
2929

30-
This action is used to get the basename of a path
30+
This action is used to get the Basename of a path
3131

3232
##### Input
3333

@@ -69,10 +69,11 @@ Example output:
6969

7070
## Troubleshooting
7171

72-
If the input doesn't contain a slash `/` in the path the result will be the original string unmodified.
72+
* If the input doesn't contain a slash `/` in the path the result will be the original string unmodified.
7373

7474
# Version History
7575

76+
* 1.1.4 - Updated SDK to the latest version (6.2.5)
7677
* 1.1.3 - Initial updates for fedramp compliance | Updated SDK to the latest version
7778
* 1.1.2 - Added `__init__.py` file to `unit_test` folder | Refreshed with new Tooling
7879
* 1.1.1 - Update SDK to version 5

plugins/basename/komand_basename/actions/basename/schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
class Component:
7-
DESCRIPTION = "Get the basename of a path"
7+
DESCRIPTION = "Get the Basename of a path"
88

99

1010
class Input:

plugins/basename/plugin.spec.yaml

+28-21
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,57 @@ extension: plugin
33
products: [insightconnect]
44
name: basename
55
title: Basename
6-
description: This plugin is used to get the last item of a file path or URL using Python's basename utility
7-
version: 1.1.3
6+
description: Basename is used to get the last item of a file path or URL using Python's
7+
basename utility
8+
version: 1.1.4
89
connection_version: 1
910
vendor: rapid7
1011
support: community
11-
supported_versions: ["Python 3.9"]
12+
supported_versions: [Python 3.9]
1213
status: []
1314
cloud_ready: true
1415
fedramp_ready: true
1516
resources:
1617
source_url: https://github.com/rapid7/insightconnect-plugins/tree/master/plugins/basename
1718
license_url: https://github.com/rapid7/insightconnect-plugins/blob/master/LICENSE
1819
tags:
19-
- basename
20-
- utilities
20+
- basename
21+
- utilities
2122
sdk:
2223
type: slim
23-
version: 6.1.3
24+
version: 6.2.5
2425
user: nobody
2526
key_features:
26-
- "Obtain basename of a file path or URL."
27-
troubleshooting: "If the input doesn't contain a slash `/` in the path the result will be the original string unmodified."
27+
- Obtain Basename of a file path or URL.
28+
troubleshooting:
29+
- If the input doesn't contain a slash `/` in the path the result will be the original
30+
string unmodified.
2831
version_history:
29-
- "1.1.3 - Initial updates for fedramp compliance | Updated SDK to the latest version"
30-
- "1.1.2 - Added `__init__.py` file to `unit_test` folder | Refreshed with new Tooling"
31-
- "1.1.1 - Update SDK to version 5"
32-
- '1.1.0 - Add missing `title` in action Basename | Use input and output constants | Add example input and output | Changed `Exception` to `PluginException` | Added "f" strings'
33-
- "1.0.2 - Update to use the `insightconnect-python-3-38-slim-plugin:4` Docker image | Update plugin.spec.yaml to include `cloud_ready`"
34-
- "1.0.1 - New spec and help.md format for the Extension Library"
35-
- "1.0.0 - Support web server mode"
36-
- "0.1.1 - Update to v2 Python plugin architecture"
37-
- "0.1.0 - Initial plugin "
32+
- 1.1.4 - Updated SDK to the latest version (6.2.5)
33+
- 1.1.3 - Initial updates for fedramp compliance | Updated SDK to the latest version
34+
- 1.1.2 - Added `__init__.py` file to `unit_test` folder | Refreshed with new Tooling
35+
- 1.1.1 - Update SDK to version 5
36+
- 1.1.0 - Add missing `title` in action Basename | Use input and output constants
37+
| Add example input and output | Changed `Exception` to `PluginException` | Added
38+
"f" strings
39+
- 1.0.2 - Update to use the `insightconnect-python-3-38-slim-plugin:4` Docker image
40+
| Update plugin.spec.yaml to include `cloud_ready`
41+
- 1.0.1 - New spec and help.md format for the Extension Library
42+
- 1.0.0 - Support web server mode
43+
- 0.1.1 - Update to v2 Python plugin architecture
44+
- '0.1.0 - Initial plugin '
3845
links:
39-
- "[Python Basename](https://docs.python.org/3/library/os.path.html)"
46+
- '[Python Basename](https://docs.python.org/3/library/os.path.html)'
4047
references:
41-
- "[Python Basename](https://docs.python.org/3/library/os.path.html)"
48+
- '[Python Basename](https://docs.python.org/3/library/os.path.html)'
4249
hub_tags:
4350
use_cases: [data_utility]
4451
keywords: [basename, utilities, cloud_enabled]
4552
features: []
4653
actions:
4754
basename:
4855
title: Basename
49-
description: Get the basename of a path
56+
description: Get the Basename of a path
5057
input:
5158
path:
5259
title: Path
@@ -60,4 +67,4 @@ actions:
6067
description: Basename result
6168
type: string
6269
required: false
63-
example: "text.txt"
70+
example: text.txt

plugins/basename/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44

55
setup(name="basename-rapid7-plugin",
6-
version="1.1.3",
7-
description="This plugin is used to get the last item of a file path or URL using Python's basename utility",
6+
version="1.1.4",
7+
description="Basename is used to get the last item of a file path or URL using Python's basename utility",
88
author="rapid7",
99
author_email="",
1010
url="",

0 commit comments

Comments
 (0)