summaryrefslogtreecommitdiff
path: root/chef-server-webui/Rakefile
blob: 2c4b6d458cbd609daf8bada10b221724e42acac3 (plain)
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
require File.dirname(__FILE__) + '/lib/chef-server-webui/version'

require 'rubygems'
require 'rake/gempackagetask'

begin
  require 'merb-core'
  require 'merb-core/tasks/merb'
rescue LoadError
  STDERR.puts "merb is not installed, merb rake tasks will not be available."
end

GEM_NAME = "chef-server-webui"
AUTHOR = "Opscode"
EMAIL = "chef@opscode.com"
HOMEPAGE = "http://wiki.opscode.com/display/chef"
SUMMARY = "A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure."

spec = eval(File.read("chef-server-webui.gemspec"))

Rake::GemPackageTask.new(spec) do |pkg|
  pkg.gem_spec = spec
end

desc "Install the gem"
task :install => :package do
  sh %{gem install pkg/#{GEM_NAME}-#{ChefServerWebui::VERSION} --no-rdoc --no-ri}
end

desc "Uninstall the gem"
task :uninstall do
  sh %{gem uninstall #{GEM_NAME} -x -v #{ChefServerWebui::VERSION} }
end

desc "Create a gemspec file"
task :gemspec do
  File.open("#{GEM_NAME}.gemspec", "w") do |file|
    file.puts spec.to_ruby
  end
end

desc "Create a new Balsamiq Mockups project"
task :new_mockup, :name do |t, args|
  if args[:name].nil?
    puts "You must supply a name for your mockups project directory: `rake new_mockup[project-name]`"
    exit
  end
  src = "mockups/base-mockup/."
  dest =  "mockups/#{args[:name]}"
  FileUtils.cp_r src, dest
end