yard-chef 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/lib/yard-chef.rb +12 -11
  3. data/lib/yard-chef/code_objects/attribute_object.rb +43 -0
  4. data/lib/yard-chef/code_objects/chef_object.rb +3 -3
  5. data/lib/yard-chef/code_objects/cookbook_object.rb +9 -1
  6. data/lib/yard-chef/code_objects/dependency_object.rb +52 -0
  7. data/lib/yard-chef/code_objects/provider_object.rb +7 -7
  8. data/lib/yard-chef/code_objects/recipe_object.rb +2 -1
  9. data/lib/yard-chef/code_objects/resource_object.rb +1 -1
  10. data/lib/yard-chef/handlers/actions.rb +2 -2
  11. data/lib/yard-chef/handlers/attribute.rb +38 -9
  12. data/lib/yard-chef/handlers/base.rb +14 -14
  13. data/lib/yard-chef/handlers/cookbook.rb +18 -8
  14. data/lib/yard-chef/handlers/dependency.rb +55 -0
  15. data/lib/yard-chef/handlers/recipe.rb +25 -13
  16. data/templates/default/action/html/action.erb +8 -0
  17. data/templates/default/action/html/setup.rb +1 -13
  18. data/templates/default/attribute/html/attribute.erb +7 -0
  19. data/templates/default/attribute/html/attribute_header.erb +1 -1
  20. data/templates/default/attribute/html/cookbook_attribute.erb +33 -0
  21. data/templates/default/attribute/html/{table.erb → resource_attribute.erb} +24 -2
  22. data/templates/default/attribute/html/setup.rb +2 -1
  23. data/templates/default/chef/html/cookbook_table.erb +323 -2
  24. data/templates/default/chef/html/setup.rb +1 -1
  25. data/templates/default/chef_tags/html/example.erb +11 -0
  26. data/templates/default/chef_tags/html/index.erb +3 -0
  27. data/templates/default/chef_tags/html/note.erb +10 -0
  28. data/templates/default/chef_tags/html/see.erb +8 -0
  29. data/templates/default/chef_tags/html/tag.erb +20 -0
  30. data/templates/default/chef_tags/setup.rb +43 -0
  31. data/templates/default/{action/html/action_summary.erb → cookbook/html/dependencies.erb} +7 -6
  32. data/templates/default/cookbook/html/libraries.erb +4 -2
  33. data/templates/default/cookbook/html/recipes.erb +1 -1
  34. data/templates/default/cookbook/html/setup.rb +18 -14
  35. data/templates/default/fulldoc/html/css/bootstrap.min.css +5 -0
  36. data/templates/default/fulldoc/html/css/common.css +146 -0
  37. data/templates/default/fulldoc/html/full_list_cookbooks.erb +6 -8
  38. data/templates/default/fulldoc/html/full_list_definitions.erb +9 -9
  39. data/templates/default/fulldoc/html/full_list_recipes.erb +5 -5
  40. data/templates/default/fulldoc/html/full_list_resources.erb +5 -5
  41. data/templates/default/fulldoc/html/js/app.js +213 -0
  42. data/templates/default/fulldoc/html/js/bootstrap.min.js +7 -0
  43. data/templates/default/fulldoc/html/js/d3.js +5 -0
  44. data/templates/default/fulldoc/html/js/jquery.js +4 -0
  45. data/templates/default/fulldoc/html/setup.rb +34 -24
  46. data/templates/default/layout/html/setup.rb +19 -9
  47. data/templates/default/provider/html/providers_summary.erb +4 -1
  48. data/templates/default/provider/html/setup.rb +2 -1
  49. data/templates/default/recipe/html/recipe_list.erb +1 -1
  50. data/templates/default/recipe/html/setup.rb +1 -1
  51. data/templates/default/resource/html/actions.erb +1 -1
  52. data/templates/default/resource/html/setup.rb +1 -1
  53. metadata +64 -55
  54. data/templates/default/action/html/action_list.erb +0 -42
  55. data/templates/default/action/html/source.erb +0 -34
  56. data/templates/default/chef/html/docstring.erb +0 -25
  57. data/templates/default/layout/html/cookbook_table.erb +0 -46
@@ -1,42 +0,0 @@
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
- &nbsp;(<%= 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 %>
@@ -1,34 +0,0 @@
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>
@@ -1,25 +0,0 @@
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) %>
@@ -1,46 +0,0 @@
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>