Permalink
Browse files

refactored to foodcritic's criticism

  • Loading branch information...
1 parent 2ecf2e6 commit 7b4f36c0988f0e48b9f68df5643fd34f3a36dcba Brian Cunnie & Matthew Kocher committed May 18, 2012
Showing with 8 additions and 14 deletions.
  1. +1 −1 recipes/rvm.rb
  2. +2 −2 recipes/ssl_certificate.rb
  3. +5 −11 recipes/textmate_plugins.rb
View
@@ -17,7 +17,7 @@
["curl -Lsf http://github.com/wayneeseguin/rvm/tarball/#{rvm_git_revision_hash} | tar xvz -C#{RVM_HOME}/src/rvm --strip 1",
"cd #{RVM_HOME}/src/rvm; ./install",
"#{RVM_COMMAND} --version | grep Wayne"].each do |rvm_cmd|
- command rvm_cmd
+ execute rvm_cmd
user WS_USER
end
end
@@ -14,7 +14,7 @@
"openssl genrsa -des3 -passout pass:password -out #{ca_path}/keys/ca.key 1024",
"cd #{ca_path} && openssl req -new -x509 -days 1001 -key #{ca_path}/keys/ca.key -passin pass:password -out #{ca_path}/certs/ca.cert -subj '/CN=mydomain.com/OU=Org Unit/O=My Org Pty Ltd/L=Sydney/ST=NSW/C=AU/emailAddr=someone@example.com'",
].each do |ssl_cmd|
- command ssl_cmd
+ execute ssl_cmd
end
execute "trust our CA" do
@@ -25,6 +25,6 @@
"openssl req -new -key #{cert_path}/server.key -out #{cert_path}/request.csr -subj '/CN=#{node["ssl_settings"]["common_name"]}/OU=Org Unit/O=My Org Pty Ltd/L=Sydney/ST=NSW/C=AU/emailAddr=someoneATexample.com'",
"cd #{cert_path} && openssl ca -policy policy_anything -cert #{ca_path}/certs/ca.cert -batch -in #{cert_path}/request.csr -passin pass:password -keyfile #{ca_path}/keys/ca.key -days 9999 -out #{cert_path}/signed.cert",
].each do |ssl_cmd|
- command ssl_cmd
+ execute ssl_cmd
end
end
@@ -1,18 +1,12 @@
run_unless_marker_file_exists("textmate_plugins_0") do
- execute "download ProjectPlus to temp dir" do
- command "curl -o #{Chef::Config[:file_cache_path]}/projectplus.dmg http://ciaranwal.sh/projectplus-files/ProjectPlus-1.3.dmg"
+ ["curl -o #{Chef::Config[:file_cache_path]}/projectplus.dmg http://ciaranwal.sh/projectplus-files/ProjectPlus-1.3.dmg",
+ "hdiutil mount #{Chef::Config[:file_cache_path]}/projectplus.dmg",
+ "rm -rf '#{WS_HOME}/Library/Application Support/TextMate/PlugIns/ProjectPlus.tmplugin'",
+ ].each do |tmate_cmd|
+ execute tmate_cmd do
user WS_USER
end
- execute "mount dmg" do
- command "hdid #{Chef::Config[:file_cache_path]}/projectplus.dmg"
- user WS_USER
- end
-
- execute "clear out the existing plugin if it's there" do
- command "rm -rf '#{WS_HOME}/Library/Application Support/TextMate/PlugIns/ProjectPlus.tmplugin'"
- end
-
execute "make textmate plugins directory" do
command "mkdir -p '#{WS_HOME}/Library/Application Support/TextMate/PlugIns'"
user WS_USER

0 comments on commit 7b4f36c

Please sign in to comment.