yard-chef 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/yard-chef.rb +74 -0
- data/lib/yard-chef/code_objects/action_object.rb +43 -0
- data/lib/yard-chef/code_objects/attribute_object.rb +45 -0
- data/lib/yard-chef/code_objects/chef_object.rb +107 -0
- data/lib/yard-chef/code_objects/cookbook_object.rb +109 -0
- data/lib/yard-chef/code_objects/provider_object.rb +89 -0
- data/lib/yard-chef/code_objects/recipe_object.rb +52 -0
- data/lib/yard-chef/code_objects/resource_object.rb +83 -0
- data/lib/yard-chef/handlers/action.rb +52 -0
- data/lib/yard-chef/handlers/actions.rb +57 -0
- data/lib/yard-chef/handlers/attribute.rb +81 -0
- data/lib/yard-chef/handlers/base.rb +81 -0
- data/lib/yard-chef/handlers/cookbook.rb +94 -0
- data/lib/yard-chef/handlers/define.rb +40 -0
- data/lib/yard-chef/handlers/recipe.rb +64 -0
- data/templates/default/action/html/action_list.erb +42 -0
- data/templates/default/action/html/action_summary.erb +37 -0
- data/templates/default/action/html/setup.rb +36 -0
- data/templates/default/action/html/source.erb +34 -0
- data/templates/default/attribute/html/attribute_header.erb +28 -0
- data/templates/default/attribute/html/setup.rb +26 -0
- data/templates/default/attribute/html/table.erb +40 -0
- data/templates/default/chef/html/cookbook_table.erb +45 -0
- data/templates/default/chef/html/docstring.erb +25 -0
- data/templates/default/chef/html/setup.rb +26 -0
- data/templates/default/cookbook/html/cookbook_title.erb +28 -0
- data/templates/default/cookbook/html/definitions.erb +38 -0
- data/templates/default/cookbook/html/docstring.erb +25 -0
- data/templates/default/cookbook/html/element_details.erb +27 -0
- data/templates/default/cookbook/html/generated_docs.erb +26 -0
- data/templates/default/cookbook/html/libraries.erb +35 -0
- data/templates/default/cookbook/html/recipes.erb +38 -0
- data/templates/default/cookbook/html/setup.rb +40 -0
- data/templates/default/definition/html/definition_list.erb +36 -0
- data/templates/default/definition/html/setup.rb +29 -0
- data/templates/default/definition/html/source.erb +34 -0
- data/templates/default/fulldoc/html/css/common.css +15 -0
- data/templates/default/fulldoc/html/full_list_cookbooks.erb +35 -0
- data/templates/default/fulldoc/html/full_list_definitions.erb +37 -0
- data/templates/default/fulldoc/html/full_list_recipes.erb +37 -0
- data/templates/default/fulldoc/html/full_list_resources.erb +39 -0
- data/templates/default/fulldoc/html/setup.rb +99 -0
- data/templates/default/layout/html/cookbook_table.erb +46 -0
- data/templates/default/layout/html/setup.rb +58 -0
- data/templates/default/layout/html/title.erb +28 -0
- data/templates/default/provider/html/providers_summary.erb +31 -0
- data/templates/default/provider/html/setup.rb +26 -0
- data/templates/default/recipe/html/recipe_list.erb +37 -0
- data/templates/default/recipe/html/setup.rb +29 -0
- data/templates/default/recipe/html/source.erb +34 -0
- data/templates/default/resource/html/actions.erb +43 -0
- data/templates/default/resource/html/providers_list.erb +38 -0
- data/templates/default/resource/html/resource_list.erb +31 -0
- data/templates/default/resource/html/setup.rb +37 -0
- metadata +137 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
<%# vim: filetype=eruby.html
|
2
|
+
|
3
|
+
Copyright (c) 2007-2012 Loren Segal
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
%>
|
24
|
+
|
25
|
+
<table class="source_code">
|
26
|
+
<tr>
|
27
|
+
<td>
|
28
|
+
<pre class="lines"><%= "\n\n\n" %><%= h format_lines(object) %></pre>
|
29
|
+
</td>
|
30
|
+
<td>
|
31
|
+
<pre class="code"><span class="info file"># File '<%= h object.file %>'<% if object.line %>, line <%= object.line %><% end %></span><%= "\n\n" %><%= html_syntax_highlight object.source %></pre>
|
32
|
+
</td>
|
33
|
+
</tr>
|
34
|
+
</table>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<%# vim: filetype=eruby.html
|
2
|
+
|
3
|
+
Copyright (c) 2012 RightScale, Inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
%>
|
24
|
+
|
25
|
+
<% if object.actions.size > 0 %>
|
26
|
+
<h4>Actions</h4>
|
27
|
+
<% n = 1 %>
|
28
|
+
<ul><table>
|
29
|
+
<thead>
|
30
|
+
<th>Action</th>
|
31
|
+
<th>Description</th>
|
32
|
+
</thead>
|
33
|
+
<tbody>
|
34
|
+
<% object.actions.each do |action| %>
|
35
|
+
<tr class="r<%= n %>">
|
36
|
+
<td><strong><%= action.name %></strong></td>
|
37
|
+
<td><%= action.docstring %></td>
|
38
|
+
</tr>
|
39
|
+
<% n = n == 2 ? 1 : 2 %>
|
40
|
+
<% end %>
|
41
|
+
</tbody>
|
42
|
+
</table></ul>
|
43
|
+
<% end %>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<%# vim: filetype=eruby.html
|
2
|
+
|
3
|
+
Copyright (c) 2012 RightScale, Inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
%>
|
24
|
+
|
25
|
+
<% if object.providers.size > 0 %>
|
26
|
+
<h4>Providers</h4>
|
27
|
+
<ul class="summary compact">
|
28
|
+
<% object.providers.each do |provider| %>
|
29
|
+
<li>
|
30
|
+
<span class="summary_signature">
|
31
|
+
<a href="<%= link_to_provider(provider) %>">
|
32
|
+
<%= provider.long_name %>
|
33
|
+
</a>
|
34
|
+
</span>
|
35
|
+
</li>
|
36
|
+
<% end %>
|
37
|
+
</ul>
|
38
|
+
<% end %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%# vim: filetype=eruby.html
|
2
|
+
|
3
|
+
Copyright (c) 2012 RightScale, Inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
%>
|
24
|
+
|
25
|
+
<% if @resources.size > 0 %>
|
26
|
+
<h2>Lightweight Resources</h2>
|
27
|
+
<% @resources.each do |resource| %>
|
28
|
+
<h3><a name="<%= resource.long_name %>"><%= resource.name %></a></h3>
|
29
|
+
<ul><%= yieldall :object => resource %></ul>
|
30
|
+
<% end %>
|
31
|
+
<% end %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Copyright (c) 2012 RightScale, Inc.
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# 'Software'), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
17
|
+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
18
|
+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
19
|
+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
20
|
+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
22
|
+
def init
|
23
|
+
@resources = object.resources
|
24
|
+
|
25
|
+
sections :resource_list, [:actions, T('attribute'), :providers_list]
|
26
|
+
end
|
27
|
+
|
28
|
+
# Gets the link to the provider. This is a workaround as 'url_for' method
|
29
|
+
# returns "../cookbook_name.html#provider_name" while yard server returns
|
30
|
+
# "cookbook_name.html#provider_name". So the links to provider do not work
|
31
|
+
# when url_for is used directly.
|
32
|
+
#
|
33
|
+
def link_to_provider(provider)
|
34
|
+
url = url_for(provider.cookbook, provider.long_name)
|
35
|
+
url.slice!("../")
|
36
|
+
url
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: yard-chef
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Douglas Thrift
|
9
|
+
- Nick Stakanov
|
10
|
+
- Nitin Mohan
|
11
|
+
autorequire:
|
12
|
+
bindir: bin
|
13
|
+
cert_chain: []
|
14
|
+
date: 2013-04-18 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: yard
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ~>
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '0.8'
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ~>
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '0.8'
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: redcarpet
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ~>
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 2.1.1
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.1.1
|
48
|
+
description: yard-chef is a YARD plugin for Chef that adds support for documenting
|
49
|
+
Chef cookbooks, resources, providers, and definitions.
|
50
|
+
email:
|
51
|
+
- douglas@rightscale.com
|
52
|
+
- nitin@rightscale.com
|
53
|
+
executables: []
|
54
|
+
extensions: []
|
55
|
+
extra_rdoc_files: []
|
56
|
+
files:
|
57
|
+
- templates/default/action/html/action_list.erb
|
58
|
+
- templates/default/action/html/action_summary.erb
|
59
|
+
- templates/default/action/html/source.erb
|
60
|
+
- templates/default/attribute/html/attribute_header.erb
|
61
|
+
- templates/default/attribute/html/table.erb
|
62
|
+
- templates/default/chef/html/cookbook_table.erb
|
63
|
+
- templates/default/chef/html/docstring.erb
|
64
|
+
- templates/default/cookbook/html/cookbook_title.erb
|
65
|
+
- templates/default/cookbook/html/definitions.erb
|
66
|
+
- templates/default/cookbook/html/docstring.erb
|
67
|
+
- templates/default/cookbook/html/element_details.erb
|
68
|
+
- templates/default/cookbook/html/generated_docs.erb
|
69
|
+
- templates/default/cookbook/html/libraries.erb
|
70
|
+
- templates/default/cookbook/html/recipes.erb
|
71
|
+
- templates/default/definition/html/definition_list.erb
|
72
|
+
- templates/default/definition/html/source.erb
|
73
|
+
- templates/default/fulldoc/html/full_list_cookbooks.erb
|
74
|
+
- templates/default/fulldoc/html/full_list_definitions.erb
|
75
|
+
- templates/default/fulldoc/html/full_list_recipes.erb
|
76
|
+
- templates/default/fulldoc/html/full_list_resources.erb
|
77
|
+
- templates/default/layout/html/cookbook_table.erb
|
78
|
+
- templates/default/layout/html/title.erb
|
79
|
+
- templates/default/provider/html/providers_summary.erb
|
80
|
+
- templates/default/recipe/html/recipe_list.erb
|
81
|
+
- templates/default/recipe/html/source.erb
|
82
|
+
- templates/default/resource/html/actions.erb
|
83
|
+
- templates/default/resource/html/providers_list.erb
|
84
|
+
- templates/default/resource/html/resource_list.erb
|
85
|
+
- templates/default/action/html/setup.rb
|
86
|
+
- templates/default/attribute/html/setup.rb
|
87
|
+
- templates/default/chef/html/setup.rb
|
88
|
+
- templates/default/cookbook/html/setup.rb
|
89
|
+
- templates/default/definition/html/setup.rb
|
90
|
+
- templates/default/fulldoc/html/setup.rb
|
91
|
+
- templates/default/layout/html/setup.rb
|
92
|
+
- templates/default/provider/html/setup.rb
|
93
|
+
- templates/default/recipe/html/setup.rb
|
94
|
+
- templates/default/resource/html/setup.rb
|
95
|
+
- templates/default/fulldoc/html/css/common.css
|
96
|
+
- lib/yard-chef/code_objects/action_object.rb
|
97
|
+
- lib/yard-chef/code_objects/attribute_object.rb
|
98
|
+
- lib/yard-chef/code_objects/chef_object.rb
|
99
|
+
- lib/yard-chef/code_objects/cookbook_object.rb
|
100
|
+
- lib/yard-chef/code_objects/provider_object.rb
|
101
|
+
- lib/yard-chef/code_objects/recipe_object.rb
|
102
|
+
- lib/yard-chef/code_objects/resource_object.rb
|
103
|
+
- lib/yard-chef/handlers/action.rb
|
104
|
+
- lib/yard-chef/handlers/actions.rb
|
105
|
+
- lib/yard-chef/handlers/attribute.rb
|
106
|
+
- lib/yard-chef/handlers/base.rb
|
107
|
+
- lib/yard-chef/handlers/cookbook.rb
|
108
|
+
- lib/yard-chef/handlers/define.rb
|
109
|
+
- lib/yard-chef/handlers/recipe.rb
|
110
|
+
- lib/yard-chef.rb
|
111
|
+
homepage: https://github.com/rightscale/yard-chef
|
112
|
+
licenses:
|
113
|
+
- MIT
|
114
|
+
post_install_message:
|
115
|
+
rdoc_options: []
|
116
|
+
require_paths:
|
117
|
+
- lib
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
120
|
+
requirements:
|
121
|
+
- - ! '>='
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
none: false
|
126
|
+
requirements:
|
127
|
+
- - ! '>='
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
requirements: []
|
131
|
+
rubyforge_project:
|
132
|
+
rubygems_version: 1.8.25
|
133
|
+
signing_key:
|
134
|
+
specification_version: 3
|
135
|
+
summary: YARD plugin for Chef
|
136
|
+
test_files: []
|
137
|
+
has_rdoc:
|