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

Generating docs for HWRPs in the libraries directory #27

Open
michaellihs opened this issue Jul 11, 2015 · 5 comments
Open

Generating docs for HWRPs in the libraries directory #27

michaellihs opened this issue Jul 11, 2015 · 5 comments

Comments

@michaellihs
Copy link

First of all, thanks for this great plugin - I'm using it a lot and it really makes my life easier!

My question: I would like to generate documentation for HWRPs that reside in the libraries directory of my cookbook. I don't know whether this is already possible. Adding the =begin ... =end header to the file was not successful.

Here is my coobook layout:

.
├── attributes
├── libraries
│   └── pt_jenkins_jobs.rb
├── metadata.rb
└── recipes
    └── ...

Here is the file (libraries/pt_jenkins_jobs.rb) in which I implement the Ressource:

=begin
#<
This resource creates a list of Jenkins jobs from a given JSON configuration.

@action    create       (default) Creates the Jenkins jobs given in the JSON file given in `config_file`

@param     config_file  Path to the JSON configuration file that holds a list of Jenkins jobs
@param     project_id   An ID of the project to create the Jenkins jobs for
#>
=end
class Chef
  class Resource::PtJenkinsJobs < Chef::Resource::JenkinsJob
    # ...implementation goes here...
  end
end

Any feedback / help is welcome. Maybe I put my Resource file into the wrong folder?

@realityforge
Copy link
Owner

Unfortunately the library does not yet support this functionality (i.e. Scanning resource in libraries directory). There is no reason why it shouldn't because it is a good idea but it is just not something anyone has got to implementing yet.

@michaellihs
Copy link
Author

@realityforge thank you for your answer! Any hints on how I could do this (add the functionality to the library)? I am quite new to Ruby so I suppose doing it "my way" I'd waste a of time because I don't know how to do it "right".

@dblessing
Copy link

@michaellihs Were you able to find a way? If not, I'm willing to give it a try. This would be a great feature.

@michaellihs
Copy link
Author

@dblessing to be honest, I did not have the time yet. If you want to give it a try - go ahead :-)

@realityforge
Copy link
Owner

Great - look forward to the outcome. Sorry I didn't reply earlier - been out of Internet range in outback Australia :)

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

3 participants