Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 26 lines (20 sloc) 0.683 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
unless File.exists?(node["grid_app_path"])

  remote_file "#{Chef::Config[:file_cache_path]}/Grid.app.zip" do
    source node["grid_download_uri"]
    owner WS_USER
  end

  execute "unzip grid" do
    command "unzip #{Chef::Config[:file_cache_path]}/Grid.app.zip -d #{Chef::Config[:file_cache_path]}/"
    user WS_USER
  end

  execute "copy grid to /Applications" do
    command "mv #{Chef::Config[:file_cache_path]}/Grid.app #{Regexp.escape(node["grid_app_path"])}"
    user WS_USER
    group "admin"
  end

  ruby_block "test to see if Grid.app was installed" do
    block do
      raise "Grid.app was not installed" unless File.exists?(node["grid_app_path"])
    end
  end

end
Something went wrong with that request. Please try again.