Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve SanitizeName #548

Closed
jamesnetherton opened this issue Mar 13, 2019 · 1 comment · Fixed by #549
Closed

Improve SanitizeName #548

jamesnetherton opened this issue Mar 13, 2019 · 1 comment · Fixed by #549
Assignees

Comments

@jamesnetherton
Copy link
Contributor

I found a couple of small issues with the current implementation of SanitizeName.

  1. If you try to create an integration using a path like:
$ kamel run ../../examples/foo.java

You get:

Error: unable to determine integration name
  1. If you use a URL, the first part of the host name is used. So with GitHub you end up with the slightly odd name of 'raw'.
$ kamel run https://raw.githubusercontent.com/apache/camel-k/master/examples/Sample.java

integration "raw" created

Maybe it'd be better to base the name on the actual file name (just like how it works when passing a filesystem path to the kamel binary). And fallback on host name if its not present.

If we think its worth improving, I can submit a PR.

@lburgazzoli
Copy link
Contributor

@jamesnetherton a PR would be very welcome

@jamesnetherton jamesnetherton self-assigned this Mar 13, 2019
jamesnetherton added a commit to jamesnetherton/camel-k that referenced this issue Mar 13, 2019
valdar pushed a commit to jboss-fuse/camel-k that referenced this issue May 21, 2019
ipolyzos pushed a commit to ipolyzos/camel-k that referenced this issue Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants