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

Improve documentation for DSL attribute hash keys [RFC] [Guides] #260

Merged
merged 6 commits into from
Aug 25, 2015

Conversation

Ashton-W
Copy link
Contributor

I want to improve the Guides for the DSLs. Currently they don't list the acceptable hash keys, there are only examples from which you can gleam this important information.
https://guides.cocoapods.org/syntax/podspec.html#source

I'm trying to find a good pattern to get this information into the documentation system, then we will also have to update guides.cocoapods.org to format and include it. Right now I'm just using yard to see how it picks up the comments.

Idealy, we shouldn't have to repeat ourselves. Where we define the options should be where the documentation is. I'm finding it hard to do this, and I'm not happy with the @overload usage here.

🐦 @orta

# @param [Hash{Symbol=>String}] git
# @option git [String] :git URI where library git repo can be cloned.
# @option git [String] :tag git tag
# @option git [true or false] :submodules checkout submodules
Copy link
Member

Choose a reason for hiding this comment

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

Boolean?

@segiddins
Copy link
Member

I like this! I personally feel overload is pretty spot on here.

@Ashton-W
Copy link
Contributor Author

I'll continue on this path then, unless someone has a better idea of where and how to put the comments for the keys.

@Ashton-W
Copy link
Contributor Author

Requesting more feedback.

There is more room for improvement in other areas where we rely on examples, but I'll get to those in other PRs.

Now to try and get it in guides.

@orta
Copy link
Member

orta commented Aug 25, 2015

don't worry about getting it in the guides, every CP release it will be automatically migrated in,

@orta
Copy link
Member

orta commented Aug 25, 2015

Overall looks good to me, more docs is 👍

orta added a commit that referenced this pull request Aug 25, 2015
Improve documentation for DSL attribute hash keys [RFC] [Guides]
@orta orta merged commit 32917a3 into CocoaPods:master Aug 25, 2015
@neonichu
Copy link
Member

@Ashton-W good work 👍

@Ashton-W
Copy link
Contributor Author

@orta guides doesn't surface these particular documentation tags yet

@segiddins
Copy link
Member

@Ashton-W because we haven't cut a new release of CocoaPods yet ;)

@Ashton-W
Copy link
Contributor Author

I'm running guides locally with the Core gem pointing to my fork. @Overloads and @options don't show up.
Am I missing something?

@segiddins
Copy link
Member

You've updated the Core submodule in gems ?

@Ashton-W
Copy link
Contributor Author

Yes. Other changes are reflected in the generated site:

image

@segiddins
Copy link
Member

OK, thanks for opening the issue over there, I'll try and take a look before I release the 0.39 beta

Ashton-W pushed a commit to Ashton-W/Core that referenced this pull request Nov 2, 2015
Improve documentation for DSL attribute hash keys [RFC] [Guides]
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.

4 participants