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'