knife-cookbook-readme 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/CHANGELOG.md +11 -0
- data/README.md +0 -2
- data/lib/chef/knife/cookbook_readme_from.rb +2 -13
- data/lib/knife_cookbook_readme.rb +3 -0
- data/lib/knife_cookbook_readme/readme.rb +2 -3
- data/lib/knife_cookbook_readme/version.rb +1 -1
- data/spec/fixtures/README.md +1 -0
- data/spec/fixtures/apache2-README.md +371 -0
- data/spec/fixtures/apache2-metadata.rb +213 -0
- data/spec/fixtures/git-README.md +42 -0
- data/spec/fixtures/git-metadata.rb +14 -0
- data/spec/fixtures/mysql-README.md +206 -0
- data/spec/fixtures/mysql-metadata.rb +140 -0
- data/spec/metadata_spec.rb +22 -5
- data/spec/readme_spec.rb +67 -72
- data/spec/template_spec.rb +1 -1
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3bf6bf73327c2975c25a29a964f4534bc001227
|
4
|
+
data.tar.gz: 32d4e3b73c37de05672f55e6d38d7fcb48be4dd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44c03840e90d7fb46d1238b900f8232f60073d1c3a86129a74291cba9a6f2b2684e67712e37364441482525647213877554254d6165de8cf1514dc94f16bd7d3
|
7
|
+
data.tar.gz: 89fd6345a41e480b70f5fa69ea6ed69024bde1a0566c014d7f9ecf8b4222774306441220f747d8ed368817ff96b03068ee2dcbc996f6b39298154388bd59fda4
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
v0.2.1 (Sep 25 2013)
|
2
|
+
--------------------
|
3
|
+
|
4
|
+
* Change specs for `Metadata.from_file` and `Readme#render` to run against test
|
5
|
+
fixtures.
|
6
|
+
* Remove `--constraints` option. If a version constraint is specified in
|
7
|
+
metadata.rb, it should always be reflected in README.md.
|
8
|
+
* Remove support for Ruby 1.8.7, which has reached end of life.
|
9
|
+
* Use `require_relative`.
|
10
|
+
* Add `lib/knife_cookbook_readme.rb`, which requires all lib files.
|
11
|
+
|
1
12
|
v0.2.0 (Sep 22 2013)
|
2
13
|
--------------------
|
3
14
|
|
data/README.md
CHANGED
@@ -33,13 +33,11 @@ Usage
|
|
33
33
|
|
34
34
|
knife cookbook readme from FILE (options)
|
35
35
|
|
36
|
-
-c, --constraints Include version constraints for platforms and dependencies
|
37
36
|
-t, --template FILE Set template file used to render README.md
|
38
37
|
|
39
38
|
Examples:
|
40
39
|
|
41
40
|
knife cookbook readme from path/to/metadata.rb
|
42
|
-
knife cookbook readme from path/to/metadata.rb --constraints >README.md
|
43
41
|
knife cookbook readme from path/to/metadata.rb --template README.md.erb
|
44
42
|
|
45
43
|
|
@@ -4,20 +4,11 @@ require 'pathname'
|
|
4
4
|
module KnifeCookbookReadme
|
5
5
|
class CookbookReadmeFrom < Chef::Knife
|
6
6
|
deps do
|
7
|
-
require 'knife_cookbook_readme
|
8
|
-
require 'knife_cookbook_readme/readme'
|
9
|
-
require 'knife_cookbook_readme/template'
|
7
|
+
require 'knife_cookbook_readme'
|
10
8
|
end
|
11
9
|
|
12
10
|
banner 'knife cookbook readme from FILE (options)'
|
13
11
|
|
14
|
-
option :constraints,
|
15
|
-
:short => '-c',
|
16
|
-
:long => '--constraints',
|
17
|
-
:boolean => true,
|
18
|
-
:default => false,
|
19
|
-
:description => 'Include version constraints for platforms and dependencies'
|
20
|
-
|
21
12
|
option :template_file,
|
22
13
|
:short => '-t',
|
23
14
|
:long => '--template FILE',
|
@@ -28,7 +19,6 @@ module KnifeCookbookReadme
|
|
28
19
|
def run
|
29
20
|
metadata_file = name_args.first
|
30
21
|
template_file = config[:template_file]
|
31
|
-
constraints = config[:constraints]
|
32
22
|
|
33
23
|
unless metadata_file
|
34
24
|
ui.fatal 'Please provide metadata.rb file as argument'
|
@@ -37,8 +27,7 @@ module KnifeCookbookReadme
|
|
37
27
|
|
38
28
|
metadata = Metadata.from_file(metadata_file)
|
39
29
|
template = File.read(template_file)
|
40
|
-
|
41
|
-
result = readme.render(template)
|
30
|
+
result = Readme.new(metadata).render(template)
|
42
31
|
|
43
32
|
ui.output(result)
|
44
33
|
end
|
@@ -2,9 +2,8 @@ module KnifeCookbookReadme
|
|
2
2
|
DEFAULT_CONSTRAINT = ">= 0.0.0".freeze
|
3
3
|
|
4
4
|
class Readme
|
5
|
-
def initialize(metadata
|
5
|
+
def initialize(metadata)
|
6
6
|
@metadata = metadata
|
7
|
-
@constraints = constraints
|
8
7
|
end
|
9
8
|
|
10
9
|
def title
|
@@ -61,7 +60,7 @@ module KnifeCookbookReadme
|
|
61
60
|
private
|
62
61
|
|
63
62
|
def format_constraint(name, version)
|
64
|
-
if
|
63
|
+
if version && version != DEFAULT_CONSTRAINT
|
65
64
|
"#{name} (#{version})"
|
66
65
|
else
|
67
66
|
name
|
@@ -0,0 +1 @@
|
|
1
|
+
Dummy file read by metadata.rb files.
|
@@ -0,0 +1,371 @@
|
|
1
|
+
Apache2 Cookbook
|
2
|
+
================
|
3
|
+
|
4
|
+
Installs and configures all aspects of apache2 using Debian style symlinks with helper definitions
|
5
|
+
|
6
|
+
Requirements
|
7
|
+
------------
|
8
|
+
|
9
|
+
### Platform:
|
10
|
+
|
11
|
+
* Redhat
|
12
|
+
* Centos
|
13
|
+
* Scientific
|
14
|
+
* Fedora
|
15
|
+
* Debian
|
16
|
+
* Ubuntu
|
17
|
+
* Arch
|
18
|
+
* Freebsd
|
19
|
+
* Amazon
|
20
|
+
|
21
|
+
### Cookbooks:
|
22
|
+
|
23
|
+
*No dependencies defined*
|
24
|
+
|
25
|
+
Attributes
|
26
|
+
----------
|
27
|
+
|
28
|
+
<table>
|
29
|
+
<tr>
|
30
|
+
<td>Attribute</td>
|
31
|
+
<td>Description</td>
|
32
|
+
<td>Default</td>
|
33
|
+
</tr>
|
34
|
+
<tr>
|
35
|
+
<td><code>node['apache']</code></td>
|
36
|
+
<td>Hash of Apache attributes</td>
|
37
|
+
<td><code></code></td>
|
38
|
+
</tr>
|
39
|
+
<tr>
|
40
|
+
<td><code>node['apache']['dir']</code></td>
|
41
|
+
<td>Location for Apache configuration</td>
|
42
|
+
<td><code>/etc/apache2</code></td>
|
43
|
+
</tr>
|
44
|
+
<tr>
|
45
|
+
<td><code>node['apache']['log_dir']</code></td>
|
46
|
+
<td>Location for Apache logs</td>
|
47
|
+
<td><code>/etc/apache2</code></td>
|
48
|
+
</tr>
|
49
|
+
<tr>
|
50
|
+
<td><code>node['apache']['user']</code></td>
|
51
|
+
<td>User Apache runs as</td>
|
52
|
+
<td><code>www-data</code></td>
|
53
|
+
</tr>
|
54
|
+
<tr>
|
55
|
+
<td><code>node['apache']['binary']</code></td>
|
56
|
+
<td>Apache server daemon program</td>
|
57
|
+
<td><code>/usr/sbin/apache2</code></td>
|
58
|
+
</tr>
|
59
|
+
<tr>
|
60
|
+
<td><code>node['apache']['icondir']</code></td>
|
61
|
+
<td>Directory location for icons</td>
|
62
|
+
<td><code>/usr/share/apache2/icons</code></td>
|
63
|
+
</tr>
|
64
|
+
<tr>
|
65
|
+
<td><code>node['apache']['listen_ports']</code></td>
|
66
|
+
<td>Ports that Apache should listen on</td>
|
67
|
+
<td><code>["80", "443"]</code></td>
|
68
|
+
</tr>
|
69
|
+
<tr>
|
70
|
+
<td><code>node['apache']['contact']</code></td>
|
71
|
+
<td>Email address of webmaster</td>
|
72
|
+
<td><code>ops@example.com</code></td>
|
73
|
+
</tr>
|
74
|
+
<tr>
|
75
|
+
<td><code>node['apache']['timeout']</code></td>
|
76
|
+
<td>Connection timeout value</td>
|
77
|
+
<td><code>300</code></td>
|
78
|
+
</tr>
|
79
|
+
<tr>
|
80
|
+
<td><code>node['apache']['keepalive']</code></td>
|
81
|
+
<td>HTTP persistent connections</td>
|
82
|
+
<td><code>On</code></td>
|
83
|
+
</tr>
|
84
|
+
<tr>
|
85
|
+
<td><code>node['apache']['keepaliverequests']</code></td>
|
86
|
+
<td>Number of requests allowed on a persistent connection</td>
|
87
|
+
<td><code>100</code></td>
|
88
|
+
</tr>
|
89
|
+
<tr>
|
90
|
+
<td><code>node['apache']['keepalivetimeout']</code></td>
|
91
|
+
<td>Time to wait for requests on persistent connection</td>
|
92
|
+
<td><code>5</code></td>
|
93
|
+
</tr>
|
94
|
+
<tr>
|
95
|
+
<td><code>node['apache']['servertokens']</code></td>
|
96
|
+
<td>Server response header</td>
|
97
|
+
<td><code>Prod</code></td>
|
98
|
+
</tr>
|
99
|
+
<tr>
|
100
|
+
<td><code>node['apache']['serversignature']</code></td>
|
101
|
+
<td>Configure footer on server-generated documents</td>
|
102
|
+
<td><code>On</code></td>
|
103
|
+
</tr>
|
104
|
+
<tr>
|
105
|
+
<td><code>node['apache']['traceenable']</code></td>
|
106
|
+
<td>Determine behavior of TRACE requests</td>
|
107
|
+
<td><code>On</code></td>
|
108
|
+
</tr>
|
109
|
+
<tr>
|
110
|
+
<td><code>node['apache']['allowed_openids']</code></td>
|
111
|
+
<td>Array of OpenIDs allowed to authenticate</td>
|
112
|
+
<td><code></code></td>
|
113
|
+
</tr>
|
114
|
+
<tr>
|
115
|
+
<td><code>node['apache']['prefork']</code></td>
|
116
|
+
<td>Hash of Apache prefork tuning attributes.</td>
|
117
|
+
<td><code></code></td>
|
118
|
+
</tr>
|
119
|
+
<tr>
|
120
|
+
<td><code>node['apache']['prefork']['startservers']</code></td>
|
121
|
+
<td>Number of MPM servers to start</td>
|
122
|
+
<td><code>16</code></td>
|
123
|
+
</tr>
|
124
|
+
<tr>
|
125
|
+
<td><code>node['apache']['prefork']['minspareservers']</code></td>
|
126
|
+
<td>Minimum number of spare server processes</td>
|
127
|
+
<td><code>16</code></td>
|
128
|
+
</tr>
|
129
|
+
<tr>
|
130
|
+
<td><code>node['apache']['prefork']['maxspareservers']</code></td>
|
131
|
+
<td>Maximum number of spare server processes</td>
|
132
|
+
<td><code>32</code></td>
|
133
|
+
</tr>
|
134
|
+
<tr>
|
135
|
+
<td><code>node['apache']['prefork']['serverlimit']</code></td>
|
136
|
+
<td>Upper limit on configurable server processes</td>
|
137
|
+
<td><code>400</code></td>
|
138
|
+
</tr>
|
139
|
+
<tr>
|
140
|
+
<td><code>node['apache']['prefork']['maxclients']</code></td>
|
141
|
+
<td>Maximum number of simultaneous connections</td>
|
142
|
+
<td><code>400</code></td>
|
143
|
+
</tr>
|
144
|
+
<tr>
|
145
|
+
<td><code>node['apache']['prefork']['maxrequestsperchild']</code></td>
|
146
|
+
<td>Maximum number of request a child process will handle</td>
|
147
|
+
<td><code>10000</code></td>
|
148
|
+
</tr>
|
149
|
+
<tr>
|
150
|
+
<td><code>node['apache']['worker']</code></td>
|
151
|
+
<td>Hash of Apache prefork tuning attributes.</td>
|
152
|
+
<td><code></code></td>
|
153
|
+
</tr>
|
154
|
+
<tr>
|
155
|
+
<td><code>node['apache']['worker']['startservers']</code></td>
|
156
|
+
<td>Initial number of server processes to start</td>
|
157
|
+
<td><code>4</code></td>
|
158
|
+
</tr>
|
159
|
+
<tr>
|
160
|
+
<td><code>node['apache']['worker']['maxclients']</code></td>
|
161
|
+
<td>Maximum number of simultaneous connections</td>
|
162
|
+
<td><code>1024</code></td>
|
163
|
+
</tr>
|
164
|
+
<tr>
|
165
|
+
<td><code>node['apache']['worker']['minsparethreads']</code></td>
|
166
|
+
<td>Minimum number of spare worker threads</td>
|
167
|
+
<td><code>64</code></td>
|
168
|
+
</tr>
|
169
|
+
<tr>
|
170
|
+
<td><code>node['apache']['worker']['maxsparethreads']</code></td>
|
171
|
+
<td>Maximum number of spare worker threads</td>
|
172
|
+
<td><code>192</code></td>
|
173
|
+
</tr>
|
174
|
+
<tr>
|
175
|
+
<td><code>node['apache']['worker']['threadsperchild']</code></td>
|
176
|
+
<td>Constant number of worker threads in each server process</td>
|
177
|
+
<td><code>64</code></td>
|
178
|
+
</tr>
|
179
|
+
<tr>
|
180
|
+
<td><code>node['apache']['worker']['maxrequestsperchild']</code></td>
|
181
|
+
<td>Maximum number of request a child process will handle</td>
|
182
|
+
<td><code>0</code></td>
|
183
|
+
</tr>
|
184
|
+
<tr>
|
185
|
+
<td><code>node['apache']['default_modules']</code></td>
|
186
|
+
<td>Default modules to enable via recipes</td>
|
187
|
+
<td><code>status alias auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex dir env mime negotiation setenvif</code></td>
|
188
|
+
</tr>
|
189
|
+
<tr>
|
190
|
+
<td><code>node['apache']['mod_ssl']['cipher_suite']</code></td>
|
191
|
+
<td>String of SSL ciphers to use for SSLCipherSuite</td>
|
192
|
+
<td><code>RC4-SHA:HIGH:!ADH</code></td>
|
193
|
+
</tr>
|
194
|
+
</table>
|
195
|
+
|
196
|
+
Recipes
|
197
|
+
-------
|
198
|
+
|
199
|
+
### apache2
|
200
|
+
|
201
|
+
Main Apache configuration
|
202
|
+
|
203
|
+
### apache2::logrotate
|
204
|
+
|
205
|
+
Rotate apache2 logs. Requires logrotate cookbook
|
206
|
+
|
207
|
+
### apache2::mod_alias
|
208
|
+
|
209
|
+
Apache module 'alias' with config file
|
210
|
+
|
211
|
+
### apache2::mod_apreq2
|
212
|
+
|
213
|
+
Apache module 'apreq'
|
214
|
+
|
215
|
+
### apache2::mod_auth_basic
|
216
|
+
|
217
|
+
Apache module 'auth_basic'
|
218
|
+
|
219
|
+
### apache2::mod_auth_digest
|
220
|
+
|
221
|
+
Apache module 'auth_digest'
|
222
|
+
|
223
|
+
### apache2::mod_auth_openid
|
224
|
+
|
225
|
+
Apache module 'authopenid'
|
226
|
+
|
227
|
+
### apache2::mod_authn_file
|
228
|
+
|
229
|
+
Apache module 'authn_file'
|
230
|
+
|
231
|
+
### apache2::mod_authnz_ldap
|
232
|
+
|
233
|
+
Apache module 'authnz_ldap'
|
234
|
+
|
235
|
+
### apache2::mod_authz_default
|
236
|
+
|
237
|
+
Apache module 'authz_default'
|
238
|
+
|
239
|
+
### apache2::mod_authz_groupfile
|
240
|
+
|
241
|
+
Apache module 'authz_groupfile'
|
242
|
+
|
243
|
+
### apache2::mod_authz_host
|
244
|
+
|
245
|
+
Apache module 'authz_host'
|
246
|
+
|
247
|
+
### apache2::mod_authz_user
|
248
|
+
|
249
|
+
Apache module 'authz_user'
|
250
|
+
|
251
|
+
### apache2::mod_autoindex
|
252
|
+
|
253
|
+
Apache module 'autoindex' with config file
|
254
|
+
|
255
|
+
### apache2::mod_cgi
|
256
|
+
|
257
|
+
Apache module 'cgi'
|
258
|
+
|
259
|
+
### apache2::mod_dav
|
260
|
+
|
261
|
+
Apache module 'dav'
|
262
|
+
|
263
|
+
### apache2::mod_dav_svn
|
264
|
+
|
265
|
+
Apache module 'dav_svn'
|
266
|
+
|
267
|
+
### apache2::mod_deflate
|
268
|
+
|
269
|
+
Apache module 'deflate' with config file
|
270
|
+
|
271
|
+
### apache2::mod_dir
|
272
|
+
|
273
|
+
Apache module 'dir' with config file
|
274
|
+
|
275
|
+
### apache2::mod_env
|
276
|
+
|
277
|
+
Apache module 'env'
|
278
|
+
|
279
|
+
### apache2::mod_expires
|
280
|
+
|
281
|
+
Apache module 'expires'
|
282
|
+
|
283
|
+
### apache2::mod_fcgid
|
284
|
+
|
285
|
+
Apache module 'fcgid', package on ubuntu/debian, rhel/centos, compile source on suse; with config file
|
286
|
+
|
287
|
+
### apache2::mod_headers
|
288
|
+
|
289
|
+
Apache module 'headers'
|
290
|
+
|
291
|
+
### apache2::mod_include
|
292
|
+
|
293
|
+
Apache module 'include'
|
294
|
+
|
295
|
+
### apache2::mod_ldap
|
296
|
+
|
297
|
+
Apache module 'ldap'
|
298
|
+
|
299
|
+
### apache2::mod_log_config
|
300
|
+
|
301
|
+
Apache module 'log_config'
|
302
|
+
|
303
|
+
### apache2::mod_mime
|
304
|
+
|
305
|
+
Apache module 'mime' with config file
|
306
|
+
|
307
|
+
### apache2::mod_negotiation
|
308
|
+
|
309
|
+
Apache module 'negotiation' with config file
|
310
|
+
|
311
|
+
### apache2::mod_perl
|
312
|
+
|
313
|
+
Apache module 'perl'
|
314
|
+
|
315
|
+
### apache2::mod_php5
|
316
|
+
|
317
|
+
Apache module 'php5'
|
318
|
+
|
319
|
+
### apache2::mod_proxy
|
320
|
+
|
321
|
+
Apache module 'proxy' with config file
|
322
|
+
|
323
|
+
### apache2::mod_proxy_ajp
|
324
|
+
|
325
|
+
Apache module 'proxy_ajp'
|
326
|
+
|
327
|
+
### apache2::mod_proxy_balancer
|
328
|
+
|
329
|
+
Apache module 'proxy_balancer'
|
330
|
+
|
331
|
+
### apache2::mod_proxy_connect
|
332
|
+
|
333
|
+
Apache module 'proxy_connect'
|
334
|
+
|
335
|
+
### apache2::mod_proxy_http
|
336
|
+
|
337
|
+
Apache module 'proxy_http'
|
338
|
+
|
339
|
+
### apache2::mod_python
|
340
|
+
|
341
|
+
Apache module 'python'
|
342
|
+
|
343
|
+
### apache2::mod_rewrite
|
344
|
+
|
345
|
+
Apache module 'rewrite'
|
346
|
+
|
347
|
+
### apache2::mod_setenvif
|
348
|
+
|
349
|
+
Apache module 'setenvif' with config file
|
350
|
+
|
351
|
+
### apache2::mod_ssl
|
352
|
+
|
353
|
+
Apache module 'ssl' with config file, adds port 443 to listen_ports
|
354
|
+
|
355
|
+
### apache2::mod_status
|
356
|
+
|
357
|
+
Apache module 'status' with config file
|
358
|
+
|
359
|
+
### apache2::mod_xsendfile
|
360
|
+
|
361
|
+
Apache module 'xsendfile'
|
362
|
+
|
363
|
+
|
364
|
+
License and Author
|
365
|
+
------------------
|
366
|
+
|
367
|
+
Author:: Opscode, Inc. (<cookbooks@opscode.com>)
|
368
|
+
|
369
|
+
Copyright:: 2013, Opscode, Inc.
|
370
|
+
|
371
|
+
License:: Apache 2.0
|