Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 84 lines (71 sloc) 3.164 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
Chef::Log.warn 'Please use https://github.com/pivotal-sprout/sprout instead'

dmg_package "OmniGraffle Professional 5" do
    volumes_dir "OmniGrafflePro"
    accept_eula true
    source "http://www.omnigroup.com/download/latest/omnigrafflepro"
    action :install
    owner WS_USER
end

gtemplate = "#{WS_HOME}/Library/Application Support/OmniGraffle/Templates/Konigi-UX-Template.gtemplate"
unless File.exists?(gtemplate)
    directory "#{WS_HOME}/Library/Application Support/OmniGraffle/Templates" do
        owner WS_USER
        mode 0755
        action :create
        recursive true
    end

    remote_file "#{Chef::Config[:file_cache_path]}/Konigi-UX-Template-2-5-1.gtemplate.zip" do
        source "http://media.konigi.com/tools/og-ux-template/Konigi-UX-Template-2-5-1.gtemplate.zip"
        owner WS_USER
    end

    execute "unzip Konigi-UX-Template-2-5-1.gtemplate.zip" do
        command "unzip #{Chef::Config[:file_cache_path]}/Konigi-UX-Template-2-5-1.gtemplate.zip -d #{Chef::Config[:file_cache_path]}/"
        user WS_USER
    end

    execute "move Konigi-UX-Template.gtemplate" do
        command "mv #{Chef::Config[:file_cache_path]}/Konigi-UX-Template.gtemplate #{Regexp.escape(gtemplate)}"
        user WS_USER
    end
end

gdiagramstyle = "#{WS_HOME}/Library/Application Support/OmniGraffle/Diagram Styles/Konigi.gdiagramstyle"
unless File.exists?(gdiagramstyle)
    directory "#{WS_HOME}/Library/Application Support/OmniGraffle/Diagram Styles" do
        owner WS_USER
        mode 0755
        action :create
        recursive true
    end

    remote_file "#{Chef::Config[:file_cache_path]}/Konigi.gdiagramstyle.zip" do
        source "http://media.konigi.com/tools/og-ux-template/Konigi.gdiagramstyle.zip"
        owner WS_USER
    end

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

    execute "move Konigi.gdiagramstyle" do
        command "mv #{Chef::Config[:file_cache_path]}/Konigi.gdiagramstyle #{Regexp.escape(gdiagramstyle)}"
        user WS_USER
    end
end

stencils = "#{WS_HOME}/Library/Application Support/OmniGraffle/Stencils/Konigi Wireframe Stencils v3"
unless File.exists?(stencils)
    directory "#{WS_HOME}/Library/Application Support/OmniGraffle/Stencils" do
        owner WS_USER
        mode 0755
        action :create
        recursive true
    end

    remote_file "#{Chef::Config[:file_cache_path]}/Konigi-Wireframe-Stencils-v3-02.zip" do
        source "http://media.konigi.com/tools/og-wireframe-stencil/Konigi-Wireframe-Stencils-v3-02.zip"
        owner WS_USER
    end

    execute "unzip Konigi-Wireframe-Stencils-v3-02.zip" do
        command "unzip #{Chef::Config[:file_cache_path]}/Konigi-Wireframe-Stencils-v3-02.zip -d #{Chef::Config[:file_cache_path]}/"
        user WS_USER
    end

    execute "move Konigi.gdiagramstyle" do
        command "mv #{Chef::Config[:file_cache_path]}/#{Regexp.escape("Konigi Wireframe Stencils v3")} #{Regexp.escape("#{WS_HOME}/Library/Application Support/OmniGraffle/Stencils/")}"
        user WS_USER
    end
end
Something went wrong with that request. Please try again.