diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..897eb3e --- /dev/null +++ b/Rakefile @@ -0,0 +1,31 @@ +require 'rake' +require 'rake/testtask' +require 'rake/rdoctask' +require 'rake/packagetask' +require 'rake/gempackagetask' +require 'rake/contrib/rubyforgepublisher' + +require "./lib/switchtower/ext/version" + +PKG_NAME = "switchtower-ext" +PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : '' +PKG_VERSION = SwitchTower::Ext::Version::STRING + PKG_BUILD +PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" + +GEM_SPEC = eval(File.read("#{File.dirname(__FILE__)}/#{PKG_NAME}.gemspec")) + +Rake::GemPackageTask.new(GEM_SPEC) do |p| + p.gem_spec = GEM_SPEC + p.need_tar = true + p.need_zip = true +end + +desc "Build the RDoc API documentation" +Rake::RDocTask.new do |rdoc| + rdoc.rdoc_dir = "doc" + rdoc.title = "SwitchTower Extensions -- A collection of tasks and methods for switchtower" + rdoc.options << '--line-numbers --inline-source --main README' + rdoc.rdoc_files.include 'README' + rdoc.rdoc_files.include 'lib/**/*.rb' + rdoc.template = "jamis" +end diff --git a/lib/switchtower/ext/version.rb b/lib/switchtower/ext/version.rb new file mode 100644 index 0000000..6c75ba8 --- /dev/null +++ b/lib/switchtower/ext/version.rb @@ -0,0 +1,11 @@ +module SwitchTower + module Ext + module Version #:nodoc: + MAJOR = 1 + MINOR = 0 + TINY = 0 + + STRING = [MAJOR, MINOR, TINY].join(".") + end + end +end diff --git a/switchtower-ext.gemspec b/switchtower-ext.gemspec index 0deeb5f..ce103b1 100644 --- a/switchtower-ext.gemspec +++ b/switchtower-ext.gemspec @@ -1,10 +1,12 @@ +require './lib/switchtower/ext/version' + Gem::Specification.new do |s| s.name = 'switchtower-ext' - s.version = "0.0.1" + s.version = PKG_VERSION s.platform = Gem::Platform::RUBY s.summary = <<-DESC.strip.gsub(/\n/, " ") - SwitchTower Extensions are a set of useful task libraries and methods that + SwitchTower Extensions is a set of useful task libraries and methods that other developers may reference in their own recipe files. DESC