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

[JSON] Generated podspec should have a newline at the end of the file #139

Closed
segiddins opened this issue May 27, 2014 · 13 comments
Closed

Comments

@segiddins
Copy link
Member

No description provided.

@cjwirth
Copy link
Contributor

cjwirth commented May 30, 2014

Are you talking about when running pod ipc spec?
Now it just writes the output of to_json to stdout, which seems pretty clean to me.

Why would you want a newline at the end? It seems like none of the specs in https://github.com/CocoaPods/Specs have newlines at the end...

@fabiopelosin
Copy link
Member

ping

@kylef
Copy link
Contributor

kylef commented Jul 29, 2014

The spec's generated by trunk are not using Core to save the JSON, but instead pretty printing the JSON and adding a newline to those specs would have to be done in trunk.cocoapods.org.

@fabiopelosin
Copy link
Member

Closing until @segiddins provides evidence that the change is needed.

@segiddins
Copy link
Member Author

It's not needed, but I feel like files should always have a newline at the end.

@fabiopelosin
Copy link
Member

@segiddins Why is it personal preference or there is a more definite reason that we can discuss?

@orta
Copy link
Member

orta commented Jul 30, 2014

It's a UNIX standard, http://stackoverflow.com/questions/729692/why-should-files-end-with-a-newline - we should probably do it because of git anyway.

@fabiopelosin
Copy link
Member

Good point.

@kylef
Copy link
Contributor

kylef commented Aug 20, 2014

@fabiopelosin ec7a76e Only affects pod ipc but not the specs generated by pod trunk push is that intentional?

@fabiopelosin
Copy link
Member

@kylef
Copy link
Contributor

kylef commented Aug 20, 2014

@fabiopelosin Yes, but it's not saved to the repository as that. It's prettified using https://github.com/CocoaPods/trunk.cocoapods.org/blob/master/app/controllers/api/pods_controller.rb#L76 which won't keep the \n.

@fabiopelosin
Copy link
Member

Oh I see what you mean... Good call: CocoaPods/trunk.cocoapods.org#103

@kylef
Copy link
Contributor

kylef commented Aug 20, 2014

Great, I wasn't sure on the scope of this issue, it was never really clear. Great stuff 👍.

Ashton-W pushed a commit to Ashton-W/Core that referenced this issue Nov 2, 2015
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

No branches or pull requests

5 participants