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,40 @@
|
|
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
|
+
require 'yard'
|
23
|
+
|
24
|
+
module YARD::Handlers
|
25
|
+
module Chef
|
26
|
+
# Handles "definitions" in a cookbook.
|
27
|
+
#
|
28
|
+
class DefinitionHandler < Base
|
29
|
+
handles method_call(:define)
|
30
|
+
|
31
|
+
def process
|
32
|
+
# Register definition if not already registered
|
33
|
+
define_obj = MethodObject.new(cookbook, name)
|
34
|
+
define_obj.source = statement.source
|
35
|
+
define_obj.docstring = statement.docstring
|
36
|
+
define_obj.add_file(statement.file, statement.line)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,64 @@
|
|
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
|
+
require 'yard'
|
23
|
+
|
24
|
+
module YARD::Handlers
|
25
|
+
module Chef
|
26
|
+
# Handles "recipes" in a cookbook.
|
27
|
+
class RecipeHandler < Base
|
28
|
+
handles method_call(:recipe)
|
29
|
+
|
30
|
+
def process
|
31
|
+
return unless statement.file.to_s =~ /metadata.rb/
|
32
|
+
|
33
|
+
recipe_obj = ChefObject.register(cookbook, name, :recipe)
|
34
|
+
recipe_obj.docstring = docstring
|
35
|
+
end
|
36
|
+
|
37
|
+
# Gets the recipe name from the metadata.rb.
|
38
|
+
#
|
39
|
+
# @return [String] the recipe name
|
40
|
+
#
|
41
|
+
def name
|
42
|
+
recipe = statement.parameters.first.jump(:string_content, :ident).source
|
43
|
+
recipe = recipe.split("::")[1] if recipe =~ /::/
|
44
|
+
recipe = 'default' if recipe == cookbook.name.to_s
|
45
|
+
recipe
|
46
|
+
end
|
47
|
+
|
48
|
+
# Gets the docstring for the recipe. The docstring is obtained from the
|
49
|
+
# description field in the recipe.
|
50
|
+
#
|
51
|
+
# @return [YARD::Docsting] the docstring
|
52
|
+
#
|
53
|
+
def docstring
|
54
|
+
description = ""
|
55
|
+
# YARD builds an abstract syntax tree (AST) which we need to traverse
|
56
|
+
# to obtain the complete docstring
|
57
|
+
statement.parameters[1].traverse do |child|
|
58
|
+
description << child.jump(:string_content).source if child.type == :string_content
|
59
|
+
end
|
60
|
+
YARD::DocstringParser.new.parse(description).to_docstring
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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 @providers.size > 0 %>
|
26
|
+
<h2>Action Details</h2>
|
27
|
+
<% @providers.each do |provider| %>
|
28
|
+
<% actions = provider.children_by_type(:action) %>
|
29
|
+
<% if actions.size > 0 %>
|
30
|
+
<% actions.each_with_index do |action, i| %>
|
31
|
+
<div class="method_details <%= 'first' if i == 0 %>">
|
32
|
+
<h3 class="signature"><a name="<%= action.name %>">
|
33
|
+
<strong><%= action.name %></strong>
|
34
|
+
(<%= action.parent.long_name %>)
|
35
|
+
</a></h3>
|
36
|
+
<%= htmlify action.docstring %>
|
37
|
+
<%= yieldall :object => action, :owner => object, :index => i %>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
<% end %>
|
42
|
+
<% end %>
|
@@ -0,0 +1,37 @@
|
|
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 @actions.size > 0 %>
|
26
|
+
<h4>Actions Summary</h4>
|
27
|
+
<ul class="summary">
|
28
|
+
<% @actions.each do |action| %>
|
29
|
+
<li>
|
30
|
+
<span class="summary_signature">
|
31
|
+
<strong><a href="#<%= action.name %>"><%= action.name %></a></strong>
|
32
|
+
</span>
|
33
|
+
<span class="summary_desc"><%= action.docstring %></span>
|
34
|
+
</li>
|
35
|
+
<% end %>
|
36
|
+
</ul>
|
37
|
+
<% end %>
|
@@ -0,0 +1,36 @@
|
|
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
|
+
case object.type
|
24
|
+
when :cookbook
|
25
|
+
@providers = object.providers
|
26
|
+
sections.push :action_list, [:source]
|
27
|
+
when :provider
|
28
|
+
@actions = object.children_by_type(:action)
|
29
|
+
sections.push :action_summary
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def source
|
34
|
+
return if object.source.nil?
|
35
|
+
erb(:source)
|
36
|
+
end
|
@@ -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,28 @@
|
|
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 @attributes.size > 0 %>
|
26
|
+
<%= object.type == :resource ? "<h4>Attributes</h4>" : "<h2>Cookbook Attributes</h2>"%>
|
27
|
+
<ul><%= yieldall %></ul>
|
28
|
+
<% end %>
|
@@ -0,0 +1,26 @@
|
|
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
|
+
@attributes = object.children_by_type(:attribute)
|
24
|
+
|
25
|
+
sections.push :attribute_header, [:table]
|
26
|
+
end
|
@@ -0,0 +1,40 @@
|
|
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
|
+
<% n = 1 %>
|
26
|
+
<table>
|
27
|
+
<thead>
|
28
|
+
<th>Attribute</th>
|
29
|
+
<th>Description</th>
|
30
|
+
</thead>
|
31
|
+
<tbody>
|
32
|
+
<% @attributes.each do |attribute| %>
|
33
|
+
<tr class="r<%= n %>">
|
34
|
+
<td><strong><%= attribute.name %></strong></td>
|
35
|
+
<td><%= attribute.docstring %></td>
|
36
|
+
</tr>
|
37
|
+
<% n = n == 2 ? 1 : 2 %>
|
38
|
+
<% end %>
|
39
|
+
</tbody>
|
40
|
+
</table>
|
@@ -0,0 +1,45 @@
|
|
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
|
+
<h1>Cookbooks List</h1>
|
26
|
+
<table>
|
27
|
+
<thead>
|
28
|
+
<tr>
|
29
|
+
<th>Cookbook</th>
|
30
|
+
<th>Description</th>
|
31
|
+
<th>Version</th>
|
32
|
+
</tr>
|
33
|
+
</thead>
|
34
|
+
<tbody>
|
35
|
+
<% n = 1 %>
|
36
|
+
<% @cookbooks.each do |cookbook| %>
|
37
|
+
<tr class="r<%= n %>">
|
38
|
+
<td><%= linkify cookbook %></td>
|
39
|
+
<td><%= cookbook.short_desc %></td>
|
40
|
+
<td><%= cookbook.version %></td>
|
41
|
+
</tr>
|
42
|
+
<% n = n == 2 ? 1 : 2 %>
|
43
|
+
<% end %>
|
44
|
+
</tbody>
|
45
|
+
</table>
|
@@ -0,0 +1,25 @@
|
|
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
|
+
<%= htmlify(object.docstring, object.docstring_type) %>
|
@@ -0,0 +1,26 @@
|
|
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
|
+
@cookbooks = Registry.all(:cookbook).sort_by { |cookbook| cookbook.name.to_s }
|
24
|
+
|
25
|
+
sections.push :docstring, :cookbook_table
|
26
|
+
end
|