Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tidy up config key paths

  • Loading branch information...
commit b895d2aadf15f3f3a0574d0513c2fd7c0a904331 1 parent 07c260f
@mattheath mattheath authored
Showing with 9 additions and 9 deletions.
  1. +3 −3 attributes/charles_proxy.rb
  2. +6 −6 recipes/charles_proxy.rb
View
6 attributes/charles_proxy.rb
@@ -1,4 +1,4 @@
node.default["charles_proxy"]["download_uri"]="http://www.charlesproxy.com/assets/release/3.6.5/charles-proxy_3.6.5.zip"
-node.default["charles_proxy_sha"]="2d9360ac63b826f6f190af8bb6ff9493bbc5e3e28ff45345ffc267ee72e5f335"
-node.default["charles_proxy_app_path"]="/Applications/Charles.app"
-node.default["charles_proxy_config_path"]="/Users/#{WS_USER}/Library/Preferences/com.xk72.charles.config"
+node.default["charles_proxy"]["sha"]="2d9360ac63b826f6f190af8bb6ff9493bbc5e3e28ff45345ffc267ee72e5f335"
+node.default["charles_proxy"]["app_path"]="/Applications/Charles.app"
+node.default["charles_proxy"]["config_path"]="/Users/#{WS_USER}/Library/Preferences/com.xk72.charles.config"
View
12 recipes/charles_proxy.rb
@@ -13,7 +13,7 @@
remote_file "#{Chef::Config[:file_cache_path]}/charles_proxy.zip" do
source node["charles_proxy"]["download_uri"]
owner WS_USER
- checksum node["charles_proxy_sha"]
+ checksum node["charles_proxy"]["sha"]
not_if { File.exists?("#{Chef::Config[:file_cache_path]}/charles_proxy.zip") }
end
@@ -24,22 +24,22 @@
end
execute "copy charles_proxy to /Applications" do
- command "mv #{Chef::Config[:file_cache_path]}/Charles.app #{Regexp.escape(node["charles_proxy_app_path"])}"
+ command "mv #{Chef::Config[:file_cache_path]}/Charles.app #{Regexp.escape(node["charles_proxy"]["app_path"])}"
user WS_USER
group "admin"
- not_if { File.exists?(node["charles_proxy_app_path"]) }
+ not_if { File.exists?(node["charles_proxy"]["app_path"]) }
end
-template node["charles_proxy_config_path"] do
+template node["charles_proxy"]["config_path"] do
source "com.xk72.charles.config.erb"
cookbook 'pivotal_workstation'
owner WS_USER
mode "0777"
- not_if { File.exists?(node["charles_proxy_config_path"]) || node["charles_proxy"]["license_key"] == nil || node["charles_proxy"]["license_name"] == nil }
+ not_if { File.exists?(node["charles_proxy"]["config_path"]) || node["charles_proxy"]["license_key"] == nil || node["charles_proxy"]["license_name"] == nil }
end
ruby_block "test to see if Charles.app was installed" do
block do
- raise "Charles.app was not installed" unless File.exists?(node["charles_proxy_app_path"])
+ raise "Charles.app was not installed" unless File.exists?(node["charles_proxy"]["app_path"])
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.