Permalink
Browse files

Add Test Kitchen, ChefSpec, RuboCop, and Foodcritic on Travis CI

Signed-off-by: Seth Vargo <sethvargo@gmail.com>
  • Loading branch information...
1 parent 7b552ac commit 452e446841353de1f0da00c37cff8c5e95c41da3 @sethvargo sethvargo committed Oct 8, 2013
Showing with 1,669 additions and 1,608 deletions.
  1. +20 −2 .gitignore
  2. +15 −0 .rubocop.yml
  3. +9 −0 .travis.yml
  4. +7 −0 Berksfile
  5. +137 −157 CHANGELOG.md
  6. +20 −7 Gemfile
  7. +4 −2 README.md
  8. +53 −0 TESTING.md
  9. +115 −115 attributes/default.rb
  10. +21 −2 attributes/mod_auth_cas.rb
  11. +10 −9 attributes/mod_auth_openid.rb
  12. +5 −4 attributes/mod_fastcgi.rb
  13. +5 −4 attributes/mod_ssl.rb
  14. +4 −4 definitions/apache_conf.rb
  15. +16 −18 definitions/apache_module.rb
  16. +7 −7 definitions/apache_site.rb
  17. +13 −15 definitions/web_app.rb
  18. +1 −1 files/default/apache2_module_conf_generate.pl
  19. +2 −3 files/default/tests/minitest/default_test.rb
  20. +3 −3 files/default/tests/minitest/god_monitor_test.rb
  21. +3 −3 files/default/tests/minitest/mod_apreq2_test.rb
  22. +3 −4 files/default/tests/minitest/mod_auth_cas_test.rb
  23. +11 −12 files/default/tests/minitest/mod_auth_openid_test.rb
  24. +0 −1 files/default/tests/minitest/mod_cgi_test.rb
  25. +2 −3 files/default/tests/minitest/mod_dav_svn_test.rb
  26. +2 −3 files/default/tests/minitest/mod_fastcgi.rb
  27. +1 −2 files/default/tests/minitest/mod_include_test.rb
  28. +1 −2 files/default/tests/minitest/mod_perl_test.rb
  29. +2 −2 files/default/tests/minitest/mod_php5_test.rb
  30. +1 −2 files/default/tests/minitest/mod_python_test.rb
  31. +4 −5 files/default/tests/minitest/mod_ssl_test.rb
  32. +10 −9 files/default/tests/minitest/support/helpers.rb
  33. +224 −218 metadata.rb
  34. +92 −102 recipes/default.rb
  35. +9 −9 recipes/god_monitor.rb
  36. +2 −2 recipes/iptables.rb
  37. +2 −2 recipes/logrotate.rb
  38. +2 −2 recipes/mod_actions.rb
  39. +3 −3 recipes/mod_alias.rb
  40. +15 −18 recipes/mod_apreq2.rb
  41. +3 −3 recipes/mod_auth_basic.rb
  42. +36 −22 recipes/mod_auth_cas.rb
  43. +3 −3 recipes/mod_auth_digest.rb
  44. +30 −32 recipes/mod_auth_openid.rb
  45. +3 −3 recipes/mod_authn_file.rb
  46. +3 −3 recipes/mod_authnz_ldap.rb
  47. +3 −3 recipes/mod_authz_default.rb
  48. +3 −3 recipes/mod_authz_groupfile.rb
  49. +3 −3 recipes/mod_authz_host.rb
  50. +3 −3 recipes/mod_authz_user.rb
  51. +3 −3 recipes/mod_autoindex.rb
  52. +2 −2 recipes/mod_cgi.rb
  53. +8 −8 recipes/mod_cloudflare.rb
  54. +2 −2 recipes/mod_dav.rb
  55. +3 −3 recipes/mod_dav_fs.rb
  56. +7 −9 recipes/mod_dav_svn.rb
  57. +3 −3 recipes/mod_deflate.rb
  58. +3 −3 recipes/mod_dir.rb
  59. +3 −3 recipes/mod_env.rb
  60. +3 −3 recipes/mod_expires.rb
  61. +29 −37 recipes/mod_fastcgi.rb
  62. +11 −13 recipes/mod_fcgid.rb
  63. +1 −1 recipes/mod_filter.rb
  64. +3 −3 recipes/mod_headers.rb
  65. +2 −2 recipes/mod_include.rb
  66. +3 −3 recipes/mod_ldap.rb
  67. +4 −4 recipes/mod_log_config.rb
  68. +4 −4 recipes/mod_logio.rb
  69. +3 −3 recipes/mod_mime.rb
  70. +3 −3 recipes/mod_negotiation.rb
  71. +8 −12 recipes/mod_perl.rb
  72. +28 −37 recipes/mod_php5.rb
  73. +3 −3 recipes/mod_proxy.rb
  74. +4 −4 recipes/mod_proxy_ajp.rb
  75. +3 −3 recipes/mod_proxy_balancer.rb
  76. +3 −3 recipes/mod_proxy_connect.rb
  77. +3 −3 recipes/mod_proxy_http.rb
  78. +7 −10 recipes/mod_python.rb
  79. +3 −3 recipes/mod_rewrite.rb
  80. +3 −3 recipes/mod_setenvif.rb
  81. +11 −12 recipes/mod_ssl.rb
  82. +3 −3 recipes/mod_status.rb
  83. +1 −1 recipes/mod_userdir.rb
  84. +7 −11 recipes/mod_wsgi.rb
  85. +7 −11 recipes/mod_xsendfile.rb
  86. +8 −8 templates/default/apache2.conf.erb
  87. +53 −55 templates/default/default-site.erb
  88. +16 −17 templates/default/mods/alias.conf.erb
  89. +1 −1 templates/default/mods/auth_cas.conf.erb
  90. +87 −88 templates/default/mods/autoindex.conf.erb
  91. +14 −14 templates/default/mods/deflate.conf.erb
  92. +1 −3 templates/default/mods/dir.conf.erb
  93. +1 −1 templates/default/mods/fcgid.conf.erb
  94. +8 −8 templates/default/mods/info.conf.erb
  95. +188 −190 templates/default/mods/mime.conf.erb
  96. +14 −15 templates/default/mods/negotiation.conf.erb
  97. +13 −13 templates/default/mods/proxy.conf.erb
  98. +23 −25 templates/default/mods/setenvif.conf.erb
  99. +67 −68 templates/default/mods/ssl.conf.erb
  100. +20 −21 templates/default/mods/status.conf.erb
  101. +1 −1 templates/default/ports.conf.erb
  102. +3 −7 templates/default/security.erb
  103. +11 −7 test/features/step_definitions/webserver_steps.rb
View
@@ -1,3 +1,21 @@
-test/kitchen/.kitchen/
-
+*~
+*#
+.#*
+\#*#
+.*.sw[a-z]
+*.un~
+*.tmp
+*.bk
+*.bkup
+.kitchen.local.yml
+Berksfile.lock
Gemfile.lock
+
+.bundle/
+.cache/
+.kitchen/
+.vagrant/
+.vagrant.d/
+bin/
+tmp/
+vendor/
View
@@ -0,0 +1,15 @@
+AllCops:
+ Excludes:
+ - test/**
+ - vendor/**
+
+AlignParameters:
+ Enabled: false
+Encoding:
+ Enabled: false
+HashSyntax:
+ Enabled: false
+LineLength:
+ Enabled: false
+MethodLength:
+ Max: 30
View
@@ -0,0 +1,9 @@
+rvm:
+ - 1.9.3
+ - 2.0.0
+before_script:
+ - bundle exec berks install
+script:
+ - bundle exec foodcritic -f any . --tags ~FC007 --tags ~FC015 --tags ~FC023
+ # - bundle exec rspec --color --format progress
+ - bundle exec rubocop
View
@@ -0,0 +1,7 @@
+site :opscode
+metadata
+
+group :integration do
+ cookbook 'apt', '~> 2.0'
+ cookbook 'yum', '~> 2.0'
+end
View
@@ -1,5 +1,9 @@
-## v1.7.0:
+apache2 Cookbook Changelog
+==========================
+This file is used to list changes made in each version of the apache2 cookbook.
+v1.7.0
+------
### Improvement
- [COOK-3073]: make access.log location configurable per-platform
@@ -11,173 +15,149 @@
- [COOK-3184]: Add `mod_filter` recipe to Apache2-cookbook
- [COOK-3236]: Add `mod_action` recipe to Apache2-cookbook
-## v1.6.6:
-
+v1.6.6
+------
1.6.4 had a missed step in the automated release, long live 1.6.6.
### Bug
-- [COOK-3018]: apache2_module does duplicate delayed restart of
- apache2 service when conf = true
-- [COOK-3027]: Default site enable true, then false, does not disable
- default site
+- [COOK-3018]: apache2_module does duplicate delayed restart of apache2 service when conf = true
+- [COOK-3027]: Default site enable true, then false, does not disable default site
- [COOK-3109]: fix apache lib_dir arch attribute regexp
-## v1.6.2
-
-* [COOK-2535] - `mod_auth_openid` requires libtool to run autogen.sh
-* [COOK-2667] - Typo in usage documentation
-* [COOK-2461] - `apache2::mod_auth_openid` fails on some ubuntu systems
-* [COOK-2720] - Apache2 minitest helper function `ran_recipe` is not
- portable
-
-## v1.6.0:
-
-* [COOK-2372] - apache2 mpm_worker: add ServerLimit attribute (default
- to 16)
-
-## v1.5.0:
-
-**NOTE** The `mod_auth_openid` attributes are changed. The upstream
- maintainer deprecated the older release versions, and the source
- repository has releases available at specific SHA1SUM references.
- The new attribute, `node['apache']['mod_auth_openid']['ref']` is
- used to set this.
-
-* [COOK-2198] - `apache::mod_auth_openid` compiles from source, but
- does not install make on debian/ubuntu
-* [COOK-2224] - version conflict between cucumber and other gems
-* [COOK-2248] - `apache2::mod_php5` uses `not_if` "which php" without
- ensuring package 'which' is installed
-* [COOK-2269] - Set allow list for mod_status incase external monitor scripts need
-* [COOK-2276] - cookbook apache2 documentation regarding listening
- ports doesn't match default attributes
-* [COOK-2296] - `mod_auth_openid` doesn't have tags/releases for the
- version I need for features and fixes
-* [COOK-2323] - Add Oracle linux support
-
-## v1.4.2:
-
-* [COOK-1721] - fix logrotate recipe
-
-## v1.4.0:
-
-* [COOK-1456] - iptables enhancements
-* [COOK-1473] - apache2 does not disable default site when setting
- "`default_site_enabled`" back to false
-* [COOK-1824] - the apache2 cookbook needs to specify which binary is
- used on rhel platform
-* [COOK-1916] - Download location wrong for apache2 `mod_auth_openid`
- >= 0.7
-* [COOK-1917] - Improve `mod_auth_openid` recipe to handle module
- upgrade more gracefully
-* [COOK-2029] - apache2 restarts on every run on RHEL and friends,
- generate-module-list on every run.
-* [COOK-2036] - apache2: Cookbook style
-
-## v1.3.2:
-
-* [COOK-1804] - fix `web_app` definition parameter so site can be
- disabled.
-
-## v1.3.0:
-
-* [COOK-1738] - Better configuration for `mod_include` and some
- overrides in `web_app` definition
-* [COOK-1470] - Change SSL Ciphers to Mitigate BEAST attack
-
-## v1.2.0:
-
-* [COOK-692] - delete package conf.d files in module recipes, for EL
-* [COOK-1693] - Foodcritic finding for unnecessary string interpolation
-* [COOK-1757] - platform_family and better style / usage practices
-
-## v1.1.16:
-
+v1.6.2
+------
+- [COOK-2535] - `mod_auth_openid` requires libtool to run autogen.sh
+- [COOK-2667] - Typo in usage documentation
+- [COOK-2461] - `apache2::mod_auth_openid` fails on some ubuntu systems
+- [COOK-2720] - Apache2 minitest helper function `ran_recipe` is not portable
+
+v1.6.0
+------
+- [COOK-2372] - apache2 mpm_worker: add ServerLimit attribute (default to 16)
+
+v1.5.0
+------
+The `mod_auth_openid` attributes are changed. The upstream maintainer deprecated the older release versions, and the source repository has releases available at specific SHA1SUM references. The new attribute, `node['apache']['mod_auth_openid']['ref']` is used to set this.
+
+- [COOK-2198] - `apache::mod_auth_openid` compiles from source, but does not install make on debian/ubuntu
+- [COOK-2224] - version conflict between cucumber and other gems
+- [COOK-2248] - `apache2::mod_php5` uses `not_if` "which php" without ensuring package 'which' is installed
+- [COOK-2269] - Set allow list for mod_status incase external monitor scripts need
+- [COOK-2276] - cookbook apache2 documentation regarding listening ports doesn't match default attributes
+- [COOK-2296] - `mod_auth_openid` doesn't have tags/releases for the version I need for features and fixes
+- [COOK-2323] - Add Oracle linux support
+
+v1.4.2
+------
+- [COOK-1721] - fix logrotate recipe
+
+v1.4.0
+------
+- [COOK-1456] - iptables enhancements
+- [COOK-1473] - apache2 does not disable default site when setting "`default_site_enabled`" back to false
+- [COOK-1824] - the apache2 cookbook needs to specify which binary is used on rhel platform
+- [COOK-1916] - Download location wrong for apache2 `mod_auth_openid` >= 0.7
+- [COOK-1917] - Improve `mod_auth_openid` recipe to handle module upgrade more gracefully
+- [COOK-2029] - apache2 restarts on every run on RHEL and friends, generate-module-list on every run.
+- [COOK-2036] - apache2: Cookbook style
+
+v1.3.2
+------
+- [COOK-1804] - fix `web_app` definition parameter so site can be disabled.
+
+v1.3.0
+------
+- [COOK-1738] - Better configuration for `mod_include` and some overrides in `web_app` definition
+- [COOK-1470] - Change SSL Ciphers to Mitigate BEAST attack
+
+v1.2.0
+------
+- [COOK-692] - delete package conf.d files in module recipes, for EL
+- [COOK-1693] - Foodcritic finding for unnecessary string interpolation
+- [COOK-1757] - platform_family and better style / usage practices
+
+v1.1.16
+-------
re-releasing as .16 due to error on tag 1.1.14
-* [COOK-1466] - add `mod_auth_cas` recipe
-* [COOK-1609] - apache2 changes ports.conf twice per run when using
- apache2::mod_ssl
-
-## v1.1.12:
+- [COOK-1466] - add `mod_auth_cas` recipe
+- [COOK-1609] - apache2 changes ports.conf twice per run when using apache2::mod_ssl
-* [COOK-1436] - restore apache2 web_app definition
-* [COOK-1356] - allow ExtendedStatus via attribute
-* [COOK-1403] - add mod_fastcgi recipe
+v1.1.12
+-------
+- [COOK-1436] - restore apache2 web_app definition
+- [COOK-1356] - allow ExtendedStatus via attribute
+- [COOK-1403] - add mod_fastcgi recipe
-## v1.1.10:
+v1.1.10
+-------
+- [COOK-1315] - allow the default site to not be enabled
+- [COOK-1328] - cookbook tests (minitest, cucumber)
-* [COOK-1315] - allow the default site to not be enabled
-* [COOK-1328] - cookbook tests (minitest, cucumber)
-
-## v1.1.8:
-
-* Some platforms with minimal installations that don't have perl won't
- have a `node['languages']['perl']` attribute, so remove the
- conditional and rely on the power of idempotence in the package
- resource.
-* [COOK-1214] - address foodcritic warnings
-* [COOK-1180] - add `mod_logio` and fix `mod_proxy`
-
-## v1.1.6:
+v1.1.8
+------
+- Some platforms with minimal installations that don't have perl won't have a `node['languages']['perl']` attribute, so remove the conditional and rely on the power of idempotence in the package resource.
+- [COOK-1214] - address foodcritic warnings
+- [COOK-1180] - add `mod_logio` and fix `mod_proxy`
+v1.1.6
+------
FreeBSD users: This release requires the `freebsd` cookbook. See README.md.
-* [COOK-1025] - freebsd support in mod_php5 recipe
-
-## v1.1.4:
-
-* [COOK-1100] - support amazon linux
-
-## v1.1.2:
-
-* [COOK-996] - apache2::mod_php5 can cause PHP and module API mismatches
-* [COOK-1083] - return string for v_f_p and use correct value for
- default
-
-## v1.1.0:
-
-* [COOK-861] - Add `mod_perl` and apreq2
-* [COOK-941] - fix `mod_auth_openid` on FreeBSD
-* [COOK-1021] - add a commented-out LoadModule directive to keep apxs happy
-* [COOK-1022] - consistency for icondir attribute
-* [COOK-1023] - fix platform test for attributes
-* [COOK-1024] - fix a2enmod script so it runs cleanly on !bash
-* [COOK-1026] - fix `error_log` location on FreeBSD
-
-## v1.0.8:
-
-* COOK-548 - directory resource doesn't have backup parameter
-
-## v1.0.6:
-
-* COOK-915 - update to `mod_auth_openid` version 0.6, see __Recipes/mod_auth_openid__ below.
-* COOK-548 - Add support for FreeBSD.
-
-## v1.0.4:
-
-* COOK-859 - don't hardcode module paths
-
-## v1.0.2
-
-* Tickets resolved in this release: COOK-788, COOK-782, COOK-780
-
-## v1.0.0
-
-* Red Hat family support is greatly improved, all recipes except `god_monitor` converge.
-* Recipe `mod_auth_openid` now works on RHEL family distros
-* Recipe `mod_php5` will now remove config from package on RHEL family so it doesn't conflict with the cookbook's.
-* Added `php5.conf.erb` template for `mod_php5` recipe.
-* Create the run state directory for `mod_fcgid` to prevent a startup error on RHEL version 6.
-* New attribute `node['apache']['lib_dir']` to handle lib vs lib64 on RHEL family distributions.
-* New attribute `node['apache']['group']`.
-* Scientific Linux support added.
-* Use a file resource instead of the generate-module-list executed perl script on RHEL family.
-* "default" site can now be disabled.
-* web_app now has an "enable" parameter.
-* Support for dav_fs apache module.
-* Tickets resolved in this release: COOK-754, COOK-753, COOK-665, COOK-624, COOK-579, COOK-519, COOK-518
-* Fix node references in template for a2dissite
-* Use proper user and group attributes on files and templates.
-* Replace the anemic README.rdoc with this new and improved superpowered README.md :).
+- [COOK-1025] - freebsd support in mod_php5 recipe
+
+v1.1.4
+------
+- [COOK-1100] - support amazon linux
+
+v1.1.2
+------
+- [COOK-996] - apache2::mod_php5 can cause PHP and module API mismatches
+- [COOK-1083] - return string for v_f_p and use correct value for default
+
+v1.1.0
+------
+- [COOK-861] - Add `mod_perl` and apreq2
+- [COOK-941] - fix `mod_auth_openid` on FreeBSD
+- [COOK-1021] - add a commented-out LoadModule directive to keep apxs happy
+- [COOK-1022] - consistency for icondir attribute
+- [COOK-1023] - fix platform test for attributes
+- [COOK-1024] - fix a2enmod script so it runs cleanly on !bash
+- [COOK-1026] - fix `error_log` location on FreeBSD
+
+v1.0.8
+------
+- COOK-548 - directory resource doesn't have backup parameter
+
+v1.0.6
+------
+- COOK-915 - update to `mod_auth_openid` version 0.6, see __Recipes/mod_auth_openid__ below.
+- COOK-548 - Add support for FreeBSD.
+
+v1.0.4
+------
+- COOK-859 - don't hardcode module paths
+
+v1.0.2
+------
+- Tickets resolved in this release: COOK-788, COOK-782, COOK-780
+
+v1.0.0
+------
+- Red Hat family support is greatly improved, all recipes except `god_monitor` converge.
+- Recipe `mod_auth_openid` now works on RHEL family distros
+- Recipe `mod_php5` will now remove config from package on RHEL family so it doesn't conflict with the cookbook's.
+- Added `php5.conf.erb` template for `mod_php5` recipe.
+- Create the run state directory for `mod_fcgid` to prevent a startup error on RHEL version 6.
+- New attribute `node['apache']['lib_dir']` to handle lib vs lib64 on RHEL family distributions.
+- New attribute `node['apache']['group']`.
+- Scientific Linux support added.
+- Use a file resource instead of the generate-module-list executed perl script on RHEL family.
+- "default" site can now be disabled.
+- web_app now has an "enable" parameter.
+- Support for dav_fs apache module.
+- Tickets resolved in this release: COOK-754, COOK-753, COOK-665, COOK-624, COOK-579, COOK-519, COOK-518
+- Fix node references in template for a2dissite
+- Use proper user and group attributes on files and templates.
+- Replace the anemic README.rdoc with this new and improved superpowered README.md :).
Oops, something went wrong.

0 comments on commit 452e446

Please sign in to comment.