File: gem.rake

package info (click to toggle)
libinnate-ruby 2010.07-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 812 kB
  • ctags: 621
  • sloc: ruby: 4,242; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'rake/gempackagetask'

task :gemspec => [:manifest, :changelog] do
  gemspec_file = "#{GEMSPEC.name}.gemspec"
  File.open(gemspec_file, 'w+'){|gs| gs.puts(GEMSPEC.to_ruby) }
end

desc "package and install from gemspec"
task :install => [:gemspec] do
  sh "gem build #{GEMSPEC.name}.gemspec"
  sh "gem install #{GEMSPEC.name}-#{GEMSPEC.version}.gem"
end

desc "uninstall the gem"
task :uninstall => [:clean] do
  sh %{gem uninstall -x #{GEMSPEC.name}}
end

Rake::GemPackageTask.new(GEMSPEC) do |p|
  p.need_tar = true
  p.need_zip = true
end