Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Fix foodcritic 2x #47

Merged
merged 2 commits into from Apr 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
File renamed without changes.
6 changes: 3 additions & 3 deletions metadata.rb
@@ -1,14 +1,14 @@
# coding: UTF-8

maintainer 'Cerner Corp'
maintainer_email 'Bryan.Baugher@Cerner.com'
license 'All rights reserved'
license 'Apache-2.0'
description 'Installs/Configures tomcat'
long_description 'This cookbook is meant to install and configure an instance of tomcat'
issues_url 'https://github.com/cerner/cerner_tomcat/issues'
source_url 'https://github.com/cerner/cerner_tomcat'
name 'cerner_tomcat'

chef_version '>= 12.0' if respond_to?(:chef_version)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of the respond_to? Why can't we just specify ">= 12.0"? And actually, given the problems we've encountered recently with Chef 13 should we just have "~ 12.0" for now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the purpose of respond_to is to handle situations where the version of chef doesn't have a chef_version method for metadata.rb which looks to have been added in 12.6. Currently this cookbook and its dependencies have no problems with Chef 13, our test kitchen runs still work fine so I left it open so we don't have to tweak and release it later

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1...thanks!


supports 'centos'
supports 'ubuntu'

Expand Down
4 changes: 1 addition & 3 deletions resources/default.rb
Expand Up @@ -2,9 +2,6 @@
def initialize(*args)
super

# Default action
@action = :install

@cookbook_files = []
@remote_files = []
@templates = []
Expand All @@ -13,6 +10,7 @@ def initialize(*args)
end

actions(:install, :uninstall)
default_action :install

attribute :instance_name, kind_of: String, name_attribute: true
attribute :user, kind_of: String, default: 'tomcat'
Expand Down