Sha256: ec74571b50cbca986cb5eddd354b700427cf2d6a05988f385a805ff7b17888eb

Contents?: true

Size: 794 Bytes

Versions: 9

Compression:

Stored size: 794 Bytes

Contents

require 'rake'
require 'rake/gempackagetask'
require 'rake/testtask'
require 'rake/clean'

gem_spec_file = 'drawer.gemspec'

gem_spec = eval(File.read(gem_spec_file)) rescue nil

Rake::GemPackageTask.new(gem_spec) do |pkg|
  pkg.need_zip = false
  pkg.need_tar = false
  rm_f FileList['pkg/**/*.*']
end if gem_spec

task :default => :test

desc "Run tests"
Rake::TestTask.new do |t|
  t.libs << "drawer"
  t.test_files = FileList['test/*.rb']
  t.verbose = true
end


desc "Generate the gemspec file."
task :gemspec do
  require 'erb'

  File.open(gem_spec_file, 'w') do |f|
    f.write ERB.new(File.read("#{gem_spec_file}.erb")).result(binding)
  end
end

desc "Builds and installs the gem."
task :install => :repackage do
  `sudo gem install pkg/#{gem_spec.name}-#{gem_spec.version}.gem`
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
soveran-drawer-0.0.2 Rakefile
soveran-drawer-0.0.3 Rakefile
soveran-drawer-0.0.4 Rakefile
soveran-drawer-0.0.5 Rakefile
soveran-drawer-0.0.7 Rakefile
soveran-drawer-0.0.8 Rakefile
drawer-0.0.9 Rakefile
drawer-0.0.8 Rakefile
drawer-0.0.7 Rakefile