Rakefile in thorero-0.9.4.2 vs Rakefile in thorero-0.9.4.3
- old
+ new
@@ -8,26 +8,29 @@
require Pathname('spec/rake/spectask')
require Pathname('lib/extlib/version')
ROOT = Pathname(__FILE__).dirname.expand_path
+##############################################################################
+# Package && release
+##############################################################################
+RUBY_FORGE_PROJECT = "thorero"
+PROJECT_URL = "http://thorero.rubyforge.org"
+PROJECT_SUMMARY = "test releases task"
+PROJECT_DESCRIPTION = PROJECT_SUMMARY
+
AUTHOR = "Test test"
EMAIL = "test test@gmail.com"
GEM_NAME = "thorero"
GEM_VERSION = Extlib::VERSION
-RUBY_FORGE_PROJECT = "thorero"
-PROJECT_URL = "http://thorero.rubyforge.org"
-PROJECT_DESCRIPTION = PROJECT_SUMMARY = "test releases task"
-
PKG_NAME = GEM_NAME
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_VERSION = Extlib::VERSION + PKG_BUILD
-RELEASE_NAME = "REL #{PKG_VERSION}"
-RUBY_FORGE_USER = "webster132"
+RELEASE_NAME = "REL #{PKG_VERSION}"
require "lib/extlib/tasks/release"
spec = Gem::Specification.new do |s|
s.name = GEM_NAME
@@ -51,20 +54,19 @@
Rake::GemPackageTask.new(spec) do |package|
package.gem_spec = spec
end
+desc 'Remove all package, docs and spec products'
+task :clobber_all => %w[ clobber_package clobber_doc extlib:clobber_spec ]
+
##############################################################################
-# Release
+# Specs and continous integration
##############################################################################
-
task :default => 'extlib:spec'
task :spec => 'extlib:spec'
-desc 'Remove all package, docs and spec products'
-task :clobber_all => %w[ clobber_package clobber_doc extlib:clobber_spec ]
-
namespace :extlib do
Spec::Rake::SpecTask.new(:spec) do |t|
t.spec_opts << '--format' << 'specdoc' << '--colour'
t.spec_opts << '--loadby' << 'random'
t.spec_files = Pathname.glob(ENV['FILES'] || 'spec/**/*_spec.rb')
@@ -78,10 +80,14 @@
# rcov not installed
end
end
end
+
+##############################################################################
+# Documentation
+##############################################################################
desc "Generate documentation"
task :doc do
begin
require 'yard'
exec 'yardoc'
@@ -91,9 +97,10 @@
end
end
WINDOWS = (RUBY_PLATFORM =~ /win32|mingw|bccwin|cygwin/) rescue nil
SUDO = WINDOWS ? '' : ('sudo' unless ENV['SUDOLESS'])
+
desc "Install #{GEM_NAME}"
task :install => :package do
sh %{#{SUDO} gem install --local pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
end