Sha256: e4f2c941cd19d1c54689337590cf1503a009cf922b35e3d97e508c7292edf167

Contents?: true

Size: 869 Bytes

Versions: 2

Compression:

Stored size: 869 Bytes

Contents

require "rake"
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
require 'rake/clean'
require 'rake/testtask'
require 'rake/rdoctask'

desc "Runs the Rspec suite"
task(:default) do
  run_suite
end

desc "Runs the Rspec suite"
task(:spec) do
  run_suite
end

desc "Copies the trunk to a tag with the name of the current release"
task(:tag_release) do
  tag_release
end

def run_suite
  dir = File.dirname(__FILE__)
  system("ruby #{dir}/spec/spec_suite.rb") || raise("Example Suite failed")
end

spec = eval(File.read("#{File.dirname(__FILE__)}/screw-unit-server.gemspec"))
PKG_NAME = spec.name
PKG_VERSION = spec.version

Rake::GemPackageTask.new(spec) do |pkg|
  pkg.need_zip = true
  pkg.need_tar = true
end

def tag_release
  dashed_version = PKG_VERSION.gsub('.', '-')
  system("git tag REL-#{dashed_version} -m 'Version #{PKG_VERSION}'")
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
screw-unit-0.3.1 Rakefile
screw-unit-0.3.3 Rakefile