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

Rplace JSON with YAML #26

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Rplace JSON with YAML #26

wants to merge 7 commits into from

Conversation

absszero
Copy link

I tried to set up vhosts in clamp.json, but JSON does not support multiple-lines. and duplicate key is not allowed, for example, "<Directory".

So I replace JSON with YAML and build a temporary Apache configure file, then start Apache with the configure file.

@rqelibari
Copy link
Collaborator

Hello @absszero,
Thank you for your efforts! I will inspect your commits today and will come back to you, if there is any question.

@rqelibari rqelibari self-assigned this Jul 29, 2017
autoopen: false
errorlog: "{{$cwd}}/.clamp/logs/apache.error.log"
customlog: "{{$cwd}}/.clamp/logs/apache.access.log"
pidfile: "'{{$cwd}}/.clamp/tmp/httpd.pid'"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you wrap the pid file here in single quotes?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were single quotes in the original JSON file. I converted it to YAML and kept it.

@rqelibari
Copy link
Collaborator

@absszero Your code looks good! If you answer my three questions, I can merge your code. Also: Did you take SpyC from github (mustangostang/spyc)?

Next step:
I am currently building a contribution guideline and will create a development branch. Your code will be merged into that new branch, such that it can be part of the next release.
Again, thank you for contributing!

@jide
Copy link
Owner

jide commented Aug 2, 2017

Hey folks,

Thanks for your contribution @absszero, it's cool to see other people contributing to the project !

Funnily, I think that if there are two entries, one being "<Directory" and the other being "<Directory " (with an extra space), it should work. Same with "<Directory "/a/b">": ""... So there's a hack to work around this.

I'm a little worried because YAML will break existing setups. So that would be a breaking change. Until now, nobody seemed to have the need of multiple <Directory/> directives, and although it sounds like a useful feature, the balance between usefulness VS keeping compatibility needs to be kept in mind. And we may also think about a migration path.

In an ideal world we would allow both JSON and YAML so that nothing breaks. But I know this would need some extra work, and I myself don't have the time to work on this.

@rqelibari What do you think ?

EDIT: That said, the YAML config looks much cleaner than JSON and seems much more natural.

@jide
Copy link
Owner

jide commented Aug 2, 2017

@rqelibari The contribution guideline and the dev branch sound like a good idea !

@absszero
Copy link
Author

absszero commented Aug 3, 2017

@rqelibari Yes, I took it from mustangostang/spyc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants