This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
_README.md.erb
157 lines (119 loc) · 4.17 KB
/
_README.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Chef Cookbook Skeleton
<%= fragments['badges'] %>
## Description
<%= description %>
<%= fragments['makenew'] %>
<%= fragments['usage'] %>
<% unless platforms.empty? %>
## Platform Support
<% platforms.each do |platform| %>
* <%= platform %>
<% end -%>
<% end -%>
<% unless dependencies.empty? &&
recommendations.empty? &&
suggestions.empty? &&
conflicting.empty? %>
## Cookbook Dependencies
<% dependencies.each do |cookbook| %>
* <%= cookbook %>
<% end -%>
<% recommendations.each do |cookbook| %>
* <%= cookbook %> (Recommended but not required)
<% end -%>
<% suggestions.each do |cookbook| %>
* <%= cookbook %> (Suggested but not required)
<% end -%>
<% conflicting.each do |cookbook| %>
* Conflicts with <%= cookbook %>
<% end -%>
<% end -%>
<% unless attributes.empty? %>
## Attributes
Attribute | Description | Default | Choices
----------|-------------|---------|--------
<% attributes.each do |name, description, default, choice| %>
`<%= name %>` | `<%= description %>` | <%= default.inspect %> | <% unless choice.empty? %><%= "`#{choice.map(&:inspect).join('`, `')}`" %><% end %>
<% end -%>
<% end -%>
<% unless recipes.empty? %>
## Recipes
<% recipes.each do |recipe| %>
* <% if recipe.top_level_descriptions.empty? %><%= recipe.name %><% else %>[<%= recipe.name %>](#<%= recipe.name.gsub(':','') %>)<% end %><% if recipe.short_description != '' %> - <%= recipe.short_description %><% end %>
<% end %>
<% recipes.each do |recipe| -%>
<% unless recipe.top_level_descriptions.empty? -%>
### <%= recipe.name %>
<% if recipe.top_level_description('main') != '' -%>
<%= recipe.top_level_description('main') %>
<% end -%>
<% recipe.top_level_descriptions.keys.select{|k| k != 'main'}.each do |key| -%>
#### <%= key -%>
<%= recipe.top_level_description(key) %>
<% end -%>
<% end -%>
<% end -%>
<% end -%>
<% unless definitions.empty? -%>
## Definitions
<% definitions.each do |definition| -%>
* [<%= definition.name %>](#<%= definition.name %>)<% if definition.short_description %> - <%= definition.short_description %><% end %>
<% end -%>
<% definitions.each do |definition| -%>
### <%= definition.name %>
<% if definition.top_level_description('main') != '' -%>
<%= definition.top_level_description('main') -%>
<% end -%>
<% unless definition.params.empty? -%>
#### Parameters
<% definition.params.each do |param, data| -%>
- <%= param %>: <%= data['descr'] %>.<% if data['default']%> Defaults to: <%=data['default']%><%end%>
<% end -%>
<% end -%>
<% definition.top_level_descriptions.keys.select{|k| k != 'main'}.each do |key| -%>
### <%= key -%>
<%= definition.top_level_description(key) -%>
<% end -%>
<% end -%>
<% end -%>
<% unless resources.empty? -%>
## Resources
<% resources.each do |resource| %>
* [<%= resource.name %>](#<%= resource.name %>)<% if resource.short_description %> - <%= resource.short_description %><% end %>
<% end %>
<% resources.each do |resource| -%>
### <%= resource.name %>
<% if resource.top_level_description('main') != '' -%>
<%= resource.top_level_description('main') -%>
<% end -%>
<% unless resource.actions.empty? -%>
#### Actions
<% resource.actions.each do |action| -%>
- <%= action %>: <%= resource.action_description(action) %><% if resource.default_action == action %> Default action.<% end %>
<% end -%>
<% end -%>
<% unless resource.attributes.empty? -%>
#### Attribute Parameters
<% resource.attributes.each do |attribute| -%>
- <%= attribute %>: <%= resource.attribute_description(attribute) %><% if resource.attribute_has_default_value?(attribute) %> Defaults to <code><%= resource.attribute_default_value(attribute).inspect %></code>.<% end %>
<% end -%>
<% end -%>
<% resource.top_level_descriptions.keys.select{|k| k != 'main'}.each do |key| -%>
#### <%= key -%>
<%= resource.top_level_description(key) -%>
<% end -%>
<% end -%>
<% end -%>
## Development and Testing
<%= fragments['requirements'] %>
<%= fragments['source'] %>
<%= fragments['rake'] %>
<%= fragments['thor'] %>
<%= fragments['guard'] %>
<%= fragments['contributing'] %>
<%= fragments['license'] %>
## Warranty
This software is provided "as is" and without any express or
implied warranties, including, without limitation, the implied
warranties of merchantability and fitness for a particular
purpose.