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,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
|
+
<% n = 1 %>
|
26
|
+
<% @items.each do |item| %>
|
27
|
+
<% unless item.namespace.parent.root? %>
|
28
|
+
<li class="r<%= n %>">
|
29
|
+
<span class="object_link">
|
30
|
+
<a href="<%= url_for(item.parent, item.name) %>" title="<%= item.file %>">
|
31
|
+
<%= h(item.name) %>
|
32
|
+
</a>
|
33
|
+
</span>
|
34
|
+
</li>
|
35
|
+
<% n = n == 2 ? 1 : 2 %>
|
36
|
+
<% end %>
|
37
|
+
<% end %>
|
@@ -0,0 +1,39 @@
|
|
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
|
+
<% @items.each do |item| %>
|
27
|
+
<% unless item.resources.empty? %>
|
28
|
+
<% item.resources.each do |resource| %>
|
29
|
+
<li class="r<%= n %>">
|
30
|
+
<span class="object_link">
|
31
|
+
<a href="<%= url_for(item, resource.long_name) %>" title="<%= resource.file %>">
|
32
|
+
<%= h(resource.name) %>
|
33
|
+
</a>
|
34
|
+
</span>
|
35
|
+
</li>
|
36
|
+
<% n = n == 2 ? 1 : 2 %>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
<% end %>
|
@@ -0,0 +1,99 @@
|
|
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
|
+
super
|
24
|
+
|
25
|
+
# Register custom stylesheets
|
26
|
+
asset('css/common.css', file('css/common.css', true))
|
27
|
+
|
28
|
+
# Generate cookbook pages
|
29
|
+
chef = YARD::Registry.all(:chef).first
|
30
|
+
chef.cookbooks.each do |cookbook|
|
31
|
+
serialize(cookbook)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Generates searchable recipe list in the output.
|
36
|
+
#
|
37
|
+
def generate_recipes_list
|
38
|
+
recipes = YARD::Registry.all(:recipe).sort_by { |recipe| recipe.name.to_s }
|
39
|
+
generate_full_list(recipes, 'Recipe', 'recipes')
|
40
|
+
end
|
41
|
+
|
42
|
+
# Generates searchable resource list in the output.
|
43
|
+
#
|
44
|
+
def generate_resources_list
|
45
|
+
cookbooks = YARD::Registry.all(:cookbook).sort_by { |cookbook| cookbook.name.to_s }
|
46
|
+
generate_full_list(cookbooks, 'Resource', 'resources')
|
47
|
+
end
|
48
|
+
|
49
|
+
# Called by menu_lists in layout/html/setup.rb by default
|
50
|
+
def generate_definitions_list
|
51
|
+
cookbooks = YARD::Registry.all(:cookbook).sort_by { |cookbook| cookbook.name.to_s }
|
52
|
+
definitions = []
|
53
|
+
cookbooks.each { |cookbook| definitions = definitions + cookbook.definitions }
|
54
|
+
generate_full_list(definitions, 'Definition', 'definitions')
|
55
|
+
end
|
56
|
+
|
57
|
+
# Called by menu_lists in layout/html/setup.rb by default
|
58
|
+
def generate_cookbooks_list
|
59
|
+
cookbooks = YARD::Registry.all(:cookbook).sort_by{|cookbook| cookbook.name.to_s}
|
60
|
+
generate_full_list(cookbooks, 'Cookbooks', 'cookbooks')
|
61
|
+
end
|
62
|
+
|
63
|
+
# Called by menu_lists in layout/html/setup.rb by default
|
64
|
+
def generate_libraries_list
|
65
|
+
libraries = options.objects if options.objects
|
66
|
+
generate_full_list(libraries, 'Library', 'class')
|
67
|
+
end
|
68
|
+
|
69
|
+
def generate_full_list(objects, title, type)
|
70
|
+
@items = objects
|
71
|
+
@list_title = "#{title} List"
|
72
|
+
@list_type = "#{type}"
|
73
|
+
asset(url_for_list(@list_type), erb(:full_list))
|
74
|
+
end
|
75
|
+
|
76
|
+
def class_list(root = YARD::Registry.root)
|
77
|
+
out = ""
|
78
|
+
children = run_verifier(root.children)
|
79
|
+
children.reject {|c| c.nil? }.sort_by {|child| child.path }.map do |child|
|
80
|
+
if child.is_a?(CodeObjects::ModuleObject)
|
81
|
+
name = child.name
|
82
|
+
has_children = child.children.any? {|o| o.is_a?(CodeObjects::ModuleObject) }
|
83
|
+
out << "<li>"
|
84
|
+
out << "<a class='toggle'></a> " if has_children
|
85
|
+
out << linkify(child, name)
|
86
|
+
out << " < #{child.superclass.name}" if child.is_a?(CodeObjects::ClassObject) && child.superclass
|
87
|
+
out << "<small class='search_info'>"
|
88
|
+
if !child.namespace || child.namespace.root?
|
89
|
+
out << "Top Level Namespace"
|
90
|
+
else
|
91
|
+
out << child.namespace.path
|
92
|
+
end
|
93
|
+
out << "</small>"
|
94
|
+
out << "</li>"
|
95
|
+
out << "<ul>#{class_list(child)}</ul>" if has_children
|
96
|
+
end
|
97
|
+
end
|
98
|
+
out
|
99
|
+
end
|
@@ -0,0 +1,46 @@
|
|
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 = Registry.all(:cookbook).uniq.sort_by {|cookbook| cookbook.name.to_s} %>
|
37
|
+
<% cookbooks.each do |cookbook| %>
|
38
|
+
<tr class="r<%= n %>">
|
39
|
+
<td><%= linkify cookbook %></td>
|
40
|
+
<td><%= cookbook.short_desc %></td>
|
41
|
+
<td><%= cookbook.version %></td>
|
42
|
+
</tr>
|
43
|
+
<% n = n == 2 ? 1 : 2 %>
|
44
|
+
<% end %>
|
45
|
+
</tbody>
|
46
|
+
</table>
|
@@ -0,0 +1,58 @@
|
|
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
|
+
super
|
24
|
+
@page_title = page_title
|
25
|
+
if @file
|
26
|
+
if @file.attributes[:namespace]
|
27
|
+
@object = options.object = Registry.at(@file.attributes[:namespace]) || Registry.root
|
28
|
+
end
|
29
|
+
@breadcrumb_title = "File: " + @file.title
|
30
|
+
@page_title = "Cookbook Documentation"
|
31
|
+
sections :layout, [:title, [:diskfile, :cookbook_table]]
|
32
|
+
elsif object == '_index.html'
|
33
|
+
sections :layout, [:title, [T('chef')]]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Add yard-chef specific menus
|
38
|
+
# Methods generate_#{type}_list must be defined in fulldoc/html/setup.rb
|
39
|
+
def menu_lists
|
40
|
+
[ { :type => 'cookbooks', :title => 'Cookbooks', :search_title => 'Cookbook List'},
|
41
|
+
{ :type => 'recipes', :title => 'Recipes', :search_title => 'Recipe List'},
|
42
|
+
{ :type => 'resources', :title => 'Resources', :search_title => 'Resource List'},
|
43
|
+
{ :type => 'definitions', :title => 'Definitions', :search_title => 'Definitions List' },
|
44
|
+
{ :type => 'class', :title => 'Libraries', :search_title => 'Libraries List' } ]
|
45
|
+
end
|
46
|
+
|
47
|
+
def page_title
|
48
|
+
if object == '_index.html'
|
49
|
+
"Cookbook Documentation"
|
50
|
+
elsif object.is_a? CodeObjects::Base
|
51
|
+
case object.type
|
52
|
+
when :cookbook
|
53
|
+
"Cookbook: #{object.name}"
|
54
|
+
when :module, :class
|
55
|
+
format_object_title(object)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -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
|
+
<div id="filecontents">
|
26
|
+
<h1>Chef Cookbooks Documentation</h1>
|
27
|
+
<%= yieldall :object => YARD::Registry.all(:chef).first %>
|
28
|
+
</div>
|
@@ -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 @providers.size > 0 %>
|
26
|
+
<h2>Providers</h2>
|
27
|
+
<% @providers.each do |provider| %>
|
28
|
+
<h3><a name="<%= provider.long_name %>"><%= provider.name %></a></h3>
|
29
|
+
<ul><%= yieldall :object => provider %></ul>
|
30
|
+
<% end %>
|
31
|
+
<% 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
|
+
@providers = object.providers
|
24
|
+
|
25
|
+
sections.push :providers_summary, [T('action')]
|
26
|
+
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
|
+
<% recipes = object.children_by_type(:recipe) %>
|
26
|
+
<% if recipes.size > 0 %>
|
27
|
+
<h2>Recipe Details</h2>
|
28
|
+
<% recipes.each_with_index do |recipe, i| %>
|
29
|
+
<div class="method_details <%= 'first' if i == 0 %>">
|
30
|
+
<h3 class="signature"><a name="<%= recipe.name %>">
|
31
|
+
<strong><%= recipe.name %></strong>
|
32
|
+
</a></h3>
|
33
|
+
<%= htmlify recipe.docstring %>
|
34
|
+
<%= yieldall :object => recipe, :owner => object, :index => i %>
|
35
|
+
</div>
|
36
|
+
<% end %>
|
37
|
+
<% end %>
|
@@ -0,0 +1,29 @@
|
|
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
|
+
sections.push :recipe_list, [:source]
|
24
|
+
end
|
25
|
+
|
26
|
+
def source
|
27
|
+
return if object.source.nil?
|
28
|
+
erb(:source)
|
29
|
+
end
|