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

Generate/Validate skeletons in arbitrary path #29

Merged
merged 2 commits into from
Jan 21, 2017
Merged

Generate/Validate skeletons in arbitrary path #29

merged 2 commits into from
Jan 21, 2017

Conversation

sepehr
Copy link
Contributor

@sepehr sepehr commented Jan 21, 2017

Currently, it's only possible to use the pds-skeleton when it's required locally. When it's required globally, it will only generate/validate packages in the ~/.composer path.

This pull-request enables the pds-skeleton to generate/validate package skeletons in any existing arbitrary path. If no path is provided, it will fallback to its default behavior. Here's a usage example:

pds-skeleton generate path/to/existing/dir
pds-skeleton validate path/to/existing/package

Along the way, it fixes a bug in validator's getFiles() where it was unable to correctly detect if an entry is a directory or not. I didn't open a separate pull-request for this as it has merge conflicts with this one.

@sepehr sepehr changed the title Generate/Validate skeletons by arbitrary path Generate/Validate skeletons in arbitrary path Jan 21, 2017
@pmjones
Copy link

pmjones commented Jan 21, 2017

Nice! @afilina any comments?

@afilina
Copy link
Contributor

afilina commented Jan 21, 2017

The tests pass and everything works as expected. I'd merge it.

P.S. I hope that people won't install it globally, since I believe that the original goal of the package was to make sure authors install it per project, to signal adherence to the standard.

@pmjones pmjones merged commit 62f4e75 into php-pds:1.x Jan 21, 2017
@pmjones
Copy link

pmjones commented Jan 21, 2017

I hope that people won't install it globally

Same here. Even so, I can see a case for validating packages that have not yet required it, and then informing the package owners that they're compliant.

@sepehr sepehr deleted the arbitrary-path branch January 21, 2017 21:07
afilina added a commit to afilina/skeleton that referenced this pull request Jan 21, 2017
Add optional path argument for validator and generator.
@afilina afilina mentioned this pull request Jan 21, 2017
pmjones pushed a commit that referenced this pull request Jan 21, 2017
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 this pull request may close these issues.

3 participants