Skip to content
Browse files

Things

  • Loading branch information...
1 parent 1ae0747 commit 127d4c8a21d5b5a238ff549b33ccc9073276467c Roderik van der Veer committed Dec 7, 2012
Showing with 28 additions and 0 deletions.
  1. +28 −0 recipes/things.rb
View
28 recipes/things.rb
@@ -0,0 +1,28 @@
+unless File.exists?("/Applications/Things.app")
+
+ remote_file "#{Chef::Config[:file_cache_path]}/Things.zip" do
+ source "http://culturedcode.com/things/download/"
+ owner WS_USER
+ end
+
+ execute "unzip Things" do
+ command "unzip #{Chef::Config[:file_cache_path]}/Things.zip -d #{Chef::Config[:file_cache_path]}/"
+ user WS_USER
+ end
+
+ execute "copy Things to /Applications" do
+ command "mv #{Chef::Config[:file_cache_path]}/Things.app #{Regexp.escape("/Applications/Things.app")}"
+ user WS_USER
+ group "admin"
+ end
+
+ ruby_block "test to see if Things.app was installed" do
+ block do
+ raise "Things.app was not installed" unless File.exists?("/Applications/Things.app")
+ end
+ end
+
+end
+
+
+

0 comments on commit 127d4c8

Please sign in to comment.
Something went wrong with that request. Please try again.