Sha256: c9a8d95abcc106ce7a585e10b3f783b57887d545630414eeb5802327d22e87d4

Contents?: true

Size: 764 Bytes

Versions: 2

Compression:

Stored size: 764 Bytes

Contents

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

gem_spec_file = 'micromachine.gemspec'

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

task :default => :test

Rake::TestTask.new(:test) do |t|
  t.pattern = 'test/**/*_test.rb'
  t.verbose = false
end

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

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

2 entries across 2 versions & 2 rubygems

Version Path
soveran-micromachine-0.0.6 Rakefile
micromachine-0.0.6 Rakefile