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

Extract default values from Podspec #58

Closed
jpsim opened this issue Nov 1, 2014 · 19 comments · Fixed by #148
Closed

Extract default values from Podspec #58

jpsim opened this issue Nov 1, 2014 · 19 comments · Fixed by #148

Comments

@jpsim
Copy link
Collaborator

jpsim commented Nov 1, 2014

Currently, many values have to be passed in to jazzy manually that could be automated. For example:

  • author_name
  • module_name
  • github_url
  • github_file_prefix
  • author_url
@jpsim
Copy link
Collaborator Author

jpsim commented Nov 3, 2014

Parsing priority: .git->*.xcodeproj->*.podspec->.jazzy.yml->ci arguments

@orta
Copy link
Collaborator

orta commented Nov 3, 2014

If you presume that CocoaPods exists on the computer you can use pod ipc spec ARAnalytics.podspec to get a JSON version of the podspec and you can just pick out variables from that. Those commands are not going away as we use them for AppCode / Trunk integration.

@jpsim
Copy link
Collaborator Author

jpsim commented Nov 3, 2014

Is the podspec guaranteed to be in ruby? Because if so, wouldn't it be simpler to just parse it straight from jazzy?

@orta
Copy link
Collaborator

orta commented Nov 3, 2014

Not guaranteed but very likely, we do support JSON podspecs. Unless it's coming from the public server/trunk, then its always JSON. You would need to require "cocoapods-core" to do it otherwise, as it needs be be eval'd into an existing object. CocoaDocs does this via the CP API.

Both ways work, depends on if you'd prefer CP as an explicit dependency in code, or as a binary you pipe the podspec through.

@jpsim
Copy link
Collaborator Author

jpsim commented Nov 3, 2014

Yeah, I'd probably use cocoapods-core for podspec parsing, and likely Xcodeproj for xcode project/workspace parsing.

@orta
Copy link
Collaborator

orta commented Nov 3, 2014

Then do as cocoadocs does 👍

@jpsim jpsim changed the title Extract default values from Xcode project and git repo Extract default values from Podspec Nov 21, 2014
@jpsim
Copy link
Collaborator Author

jpsim commented Nov 21, 2014

Renamed this to just parse podspec. Other features won't be nearly as useful for the majority of projects.

@segiddins
Copy link
Collaborator

This will be done in a separate plugin once plugin support is added

@jpsim
Copy link
Collaborator Author

jpsim commented Nov 21, 2014

Can you make an issue for that listing the required steps?

@segiddins
Copy link
Collaborator

(Plugin support will come very soon. As in, maybe tonight or tomorrow.)

@segiddins
Copy link
Collaborator

This will happen over at https://github.com/segiddins/cocoapods-documentation

@jpsim
Copy link
Collaborator Author

jpsim commented Nov 30, 2014

Podspec parsing should really be in jazzy itself and not just in a cocoapods plugin (though a cp plugin might be useful too). My goal is that running jazzy in the root of any Swift repo should generate docs for it.

@segiddins
Copy link
Collaborator

@jpsim the issue is that to properly parse a podspec requires using the cocoapods gem, which is a huge dependency for jazzy. I think a compromise might be to have jazzy dependent upon the plugin, and, if it is able to require 'cocoapods', then load the builder from the plugin as another command.

@jpsim
Copy link
Collaborator Author

jpsim commented Dec 1, 2014

Podspec parsing should just require cocoapods-core, not all of cocoapods

@segiddins
Copy link
Collaborator

@jpsim it requires all of CocoaPods to do the downloading and figuring out what the source files are.

@orta
Copy link
Collaborator

orta commented Dec 1, 2014

I think you two are talking about different ideas:
@jpsim is talking about already having a local copy and basing it off an existing podspec file
@segiddins is talking about a true equivalent of pod try xxx for Jazzy I think

@jpsim
Copy link
Collaborator Author

jpsim commented Dec 1, 2014

@orta's right about what I'm thinking.

@segiddins
Copy link
Collaborator

@jpsim I was going at this from a 'make something that cocoadocs can use' perspective

@orta
Copy link
Collaborator

orta commented Dec 1, 2014

yeah, @jpsim's is the minimum for Jazzy. The DL + setup can be done by CocoaDocs, as it's already being done for stuff anyway.

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

Successfully merging a pull request may close this issue.

4 participants