-
Notifications
You must be signed in to change notification settings - Fork 29
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
allow periods (.) in project names #142
Comments
The problem is the substitution strategy. If we replace unusable characters with an underscore or something, then you can't later add another project which really has underscores there. So, for now I'm leaning towards leaving this alone. Let me think about it for a bit. |
Well, I understand, however, the patch is not about allowing any kind of project name, it's simple deactivating rails' behaviour to 'format'. If right now you'd add a project with a period in it, rails will simply display an error page, as it tries to match the 'suffix' to a format. In my example, I have projects running builds on different emulators to test for portability, so a project has a name like: |
Ah, ok. I understand now. That, of course, causes another problem. If you have project called 'foo' your browser url would become '/projects/foo', and we also have '/projects/foo.png' which returns an image with the current status of the build to use in documentation pages. If we ignore dots in those urls that might stop the dot in '.png' also from working. Let me think about this a bit more (unless you have a different suggestion). |
Interesting, I didn't even know that... |
this was done by adding a constraint on project_name which would accept anything and then adding explicit routes for the png (& explicit html) format routes.
Fixed. Look at the commit above if you're curious. Basically, I figured out what approach travis-ci took to solve the problem. |
Thanks, that's definitely cleaner than my version! |
It's not possible to use freely-defined project-names as they have to match the folder name of the build, at the moment (meaning only characters the file system allows can be used). Although it would be nice to be able to do so, my bigger concern was to use periods in project names, which should be possible with filename-compliant names... To be able to do so, I had to change the routing as follows:
The text was updated successfully, but these errors were encountered: