diff --git a/compose_plantuml/__init__.py b/compose_plantuml/__init__.py index c0b5533..a94c9a2 100755 --- a/compose_plantuml/__init__.py +++ b/compose_plantuml/__init__.py @@ -74,7 +74,7 @@ def boundaries(self, compose, group=False, ports=True, volumes=True, notes=False port_uml = '' port_links = '' for service, host, container in sorted(self.ports(compose)): - port = host + port = host.replace('/', '') if container is not None: port = '{0} : {1}'.format(host, container) port_links += '[{0}] --> {1}\n'.format(service, port) diff --git a/features/boundaries.feature b/features/boundaries.feature index ad69725..ec5c715 100644 --- a/features/boundaries.feature +++ b/features/boundaries.feature @@ -3,14 +3,14 @@ Feature: Boundaries I want to see the boundaries of a system so that I know how to interact with it. - Scenario: Exposed ports + Scenario Outline: Exposed ports Given a file named "compose.yml" with: """ version: "2" services: service: ports: - - 8080 + - """ When I run `bin/compose_plantuml --boundaries compose.yml` Then it should pass with exactly: @@ -19,29 +19,21 @@ Feature: Boundaries cloud system { [service] } - [service] --> 8080 + [service] --> """ - Scenario: Alias Ports - Given a file named "compose.yml" with: - """ - version: "2" - services: - service: - ports: - - 8080:80 - """ - When I run `bin/compose_plantuml --boundaries compose.yml` - Then it should pass with exactly: - """ - skinparam componentStyle uml2 - cloud system { - [service] - } - [service] --> 8080 : 80 + Examples: TCP Port + | port | resulting port | + | 8080 | 8080 | - """ + Examples: UDP Port + | port | resulting port | + | 8080/udp | 8080udp | + + Examples: Alias Port + | port | resulting port | + | 8080:80 | 8080 : 80 | Scenario: Volumes Given a file named "compose.yml" with: diff --git a/setup.py b/setup.py index 1a4bc3b..508a754 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ def readme(): setup( name='compose_plantuml', - version='0.0.13', + version='0.1.0', description='converts docker-compose into plantuml', long_description=readme(), url='http://github.com/funkwerk/compose_plantuml',