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 4b72d05..49dd0e9 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -1,46 +1,46 @@ # -# 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' -remote_file "/tmp/redis-2.8.9.tar.gz" do - source "http://download.redis.io/releases/redis-2.8.9.tar.gz" - notifies :run, "execute[unzip_redis_archive]", :immediately +remote_file '/tmp/redis-2.8.9.tar.gz' do + source 'http://download.redis.io/releases/redis-2.8.9.tar.gz' + notifies :run, 'execute[unzip_redis_archive]', :immediately end -execute "unzip_redis_archive" do +execute 'unzip_redis_archive' do command 'tar xzf redis-2.8.9.tar.gz' - cwd "/tmp" + cwd '/tmp' action :nothing - notifies :run, "execute[build_and_install_redis]", :immediately + notifies :run, 'execute[build_and_install_redis]', :immediately end -execute "build_and_install_redis" do +execute 'build_and_install_redis' do command 'make && make install' - cwd "/tmp/redis-2.8.9" + cwd '/tmp/redis-2.8.9' action :nothing - notifies :run, "execute[install_server_redis]", :immediately + notifies :run, 'execute[install_server_redis]', :immediately end -execute "install_server_redis" do - command "echo -n | ./install_server.sh" - cwd "/tmp/redis-2.8.9/utils" +execute 'install_server_redis' do + command 'echo -n | ./install_server.sh' + cwd '/tmp/redis-2.8.9/utils' action :nothing end -service "redis_6379" do +service 'redis_6379' do action [ :start, :enable ] # 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 a5b2ceb..72d1cee 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'