From e230db4c1216576b0f37b314b19620d0b3fe2baf Mon Sep 17 00:00:00 2001 From: Bryan Baugher Date: Tue, 18 Apr 2017 14:16:49 -0500 Subject: [PATCH 1/2] Fixed foodcritic issues after Chef 13 release --- LICENSE.txt => LICENSE | 0 metadata.rb | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename LICENSE.txt => LICENSE (100%) diff --git a/LICENSE.txt b/LICENSE similarity index 100% rename from LICENSE.txt rename to LICENSE diff --git a/metadata.rb b/metadata.rb index c3356ba..41aaf94 100644 --- a/metadata.rb +++ b/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) + supports 'centos' supports 'ubuntu' From f2804609e31b778022655e8efbcb6c2f30b77078 Mon Sep 17 00:00:00 2001 From: Bryan Baugher Date: Tue, 18 Apr 2017 14:42:22 -0500 Subject: [PATCH 2/2] Used default action dsl instead of variable --- resources/default.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/default.rb b/resources/default.rb index e083640..3d8f95e 100644 --- a/resources/default.rb +++ b/resources/default.rb @@ -2,9 +2,6 @@ def initialize(*args) super - # Default action - @action = :install - @cookbook_files = [] @remote_files = [] @templates = [] @@ -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'