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

Enables read files inside folders #5

Merged
merged 2 commits into from
Dec 4, 2014

Conversation

guiferrpereira
Copy link

This code allows reading files that are inside folders under documentation folder:

Example:

/doc/api/users.yml
/doc/api/backoffice/accounts.yml
/doc/api/store/products.yml

With previous code only "users.yml" was read, now all yml files are read.

@kritik
Copy link
Member

kritik commented Dec 4, 2014

Do we need it. As far as I remembr code was working with namespaced models. Am I wrong?

@guiferrpereira
Copy link
Author

It doesn't have to do with namespaced models.

We have different Services (SOA Architecture), each service provides it's own documentation, and then we aggregate data, in one place. In this case i need folders, and if i create folders inside documentation, it simply don't read it, because it only reads on "ApiDocs.config.docs_path"

Dir.glob(ApiDocs.config.docs_path.join('*.yml')).sort.inject({}) do |memo, file_path|

Dir.glob(ApiDocs.config.docs_path.join('*/.yml')).sort.inject({}) do |memo, file_path|

kritik pushed a commit that referenced this pull request Dec 4, 2014
@kritik kritik merged commit f4eaa86 into perfectline:master Dec 4, 2014
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.

2 participants