From 4d88aa75a5b29917d0e8e59a965f466bd06002a6 Mon Sep 17 00:00:00 2001 From: Cookstyle Date: Mon, 21 Jun 2021 13:52:54 -0700 Subject: [PATCH] Cookstyle Bot Auto Corrections with Cookstyle 7.14.0 This change is automatically generated by the Cookstyle Bot using the latest version of Cookstyle (7.14.0). Adopting changes suggested by Cookstyle improves cookbook readability, avoids common coding mistakes, and eases upgrades to newer versions of the Chef Infra Client. Signed-off-by: Cookstyle --- metadata.rb | 3 +-- recipes/default.rb | 36 +++++++++++++++---------------- spec/unit/recipes/default_spec.rb | 4 ++-- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/metadata.rb b/metadata.rb index 99d1a0f..8efd81e 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,7 +1,6 @@ name 'redis' maintainer 'The Authors' maintainer_email 'you@example.com' -license 'all_rights' +license 'all rights reserved' description 'Installs/Configures redis' -long_description 'Installs/Configures redis' version '0.1.0' diff --git a/recipes/default.rb b/recipes/default.rb index 7cad4bf..45b11ae 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -1,47 +1,47 @@ # -# Cookbook Name:: redis +# Cookbook:: redis # Recipe:: default # -# Copyright (c) 2016 The Authors, All Rights Reserved. +# Copyright:: (c) 2016 The Authors, All Rights Reserved. # # Translated Instructions From: # https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis # -execute "apt-get update" +execute 'apt-get update' -package "build-essential" +package 'build-essential' -package "tcl8.5" +package 'tcl8.5' # download http://download.redis.io/releases/redis-2.8.9.tar.gz -remote_file "~/redis-2.8.9.tar.gz" do - source "http://download.redis.io/releases/redis-2.8.9.tar.gz" - notifies :run, "execute[tar xzf redis-2.8.9.tar.gz]", :immediately +remote_file '~/redis-2.8.9.tar.gz' do + source 'http://download.redis.io/releases/redis-2.8.9.tar.gz' + notifies :run, 'execute[tar xzf redis-2.8.9.tar.gz]', :immediately end # unzip the archive -execute "tar xzf redis-2.8.9.tar.gz" do - cwd "/tmp" +execute 'tar xzf redis-2.8.9.tar.gz' do + cwd '/tmp' action :nothing - notifies :run, "execute[make && make install]", :immediately + notifies :run, 'execute[make && make install]', :immediately end # Configure the application: make and make install -execute "make && make install" do - cwd "/tmp/redis-2.8.9" +execute 'make && make install' do + cwd '/tmp/redis-2.8.9' action :nothing - notifies :run, "execute[echo -n | ./install_server.sh]", :immediately + notifies :run, 'execute[echo -n | ./install_server.sh]', :immediately end # Install the Server -execute "echo -n | ./install_server.sh" do - cwd "/tmp/redis-2.8.9/utils" +execute 'echo -n | ./install_server.sh' do + cwd '/tmp/redis-2.8.9/utils' action :nothing end -service "redis_6379" do +service 'redis_6379' do action [ :start ] # This is necessary so that the service will not keep reporting as updated - supports :status => true + supports status: true end diff --git a/spec/unit/recipes/default_spec.rb b/spec/unit/recipes/default_spec.rb index 3935c84..161373a 100644 --- a/spec/unit/recipes/default_spec.rb +++ b/spec/unit/recipes/default_spec.rb @@ -1,8 +1,8 @@ # -# Cookbook Name:: redis +# Cookbook:: redis # Spec:: default # -# Copyright (c) 2016 The Authors, All Rights Reserved. +# Copyright:: (c) 2016 The Authors, All Rights Reserved. require 'spec_helper'