Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (12 sloc) 391 Bytes
require 'rake'
require 'rubygems/specification'
require 'rake/gempackagetask'
task :default => [:gem]
# Gem build task - load gemspec from file
gemspec = File.read('currentcost-daemon.gemspec')
spec = nil
# Eval gemspec in SAFE=3 mode to emulate github build environment
Thread.new { spec = eval("$SAFE = 3\n#{gemspec}") }.join
Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
end