Rakefile in rubygems-update-0.9.0 vs Rakefile in rubygems-update-0.9.1
- old
+ new
@@ -33,36 +33,50 @@
CURRENT_VERSION = PKG_VERSION
end
CLEAN.include("COMMENTS")
CLOBBER.include(
+ 'InstalledFiles',
"test/data/one/one-*0.0.1.gem",
"test/temp",
+ 'test/mock/gem/doc',
+ 'test/mock/gem/cache',
'test/data/gemhome',
'test/data/[a-z]*.gem',
'scripts/*.hieraki',
'data__',
'html',
'pkgs/sources/sources*.gem',
'.config',
'**/debug.log',
- 'logs'
+ 'logs',
+ '*.out'
)
+CLOBBER.exclude('test/data/broken-1.0.0.gem')
+desc "Run all tests"
task :default => [:test]
+
+desc "Run unit tests (functionals fail on win32)"
task :test => [:test_units]
+desc "Run just the unit tests"
Rake::TestTask.new(:test_units) do |t|
t.test_files = FileList['test/test*.rb']
+ t.warning = true
end
+desc "Run just the functional tests"
Rake::TestTask.new(:test_functional) do |t|
t.test_files = FileList['test/functional*.rb']
+ t.warning = true
end
+desc "Run the unit and functional tests"
Rake::TestTask.new(:test_all) do |t|
t.test_files = FileList['test/{test,functional}*.rb']
+ t.warning = true
end
desc "Run the tests for a build"
task :build_tests do
html_dir = ENV['TESTRESULTS'] || 'html/tests'
@@ -133,13 +147,13 @@
# Are all source files checked in?
if ENV['RELTEST']
announce "Release Task Testing, skipping checked-in file test"
else
announce "Checking for unchecked-in files..."
- data = `cvs -q update`
+ data = `svn st`
unless data =~ /^$/
- fail "CVS update is not clean ... do you have unchecked-in files?"
+ abort "svn status is not clean ... do you have unchecked-in files?"
end
announce "No outstanding checkins found ... OK"
end
end
@@ -157,23 +171,23 @@
f.puts "end"
end
if ENV['RELTEST']
announce "Release Task Testing, skipping commiting of new version"
else
- sh %{cvs commit -m "Updated to version #{PKG_VERSION}" lib/rubygems/rubygems_version.rb} # "
+ sh %{svn commit -m "Updated to version #{PKG_VERSION}" lib/rubygems/rubygems_version.rb} # "
end
end
end
task :tag => [:prerelease] do
reltag = "REL_#{PKG_VERSION.gsub(/\./, '_')}"
- reltag << ENV['REUSE'].gsub(/\./, '_') if ENV['REUSE']
- announce "Tagging CVS with [#{reltag}]"
+ reltag = "REL_#{ENV['REUSE'].gsub(/\./, '_')}" if ENV['REUSE']
+ announce "Tagging SVN with [#{reltag}]"
if ENV['RELTEST']
- announce "Release Task Testing, skipping CVS tagging"
+ announce "Release Task Testing, skipping SVN tagging"
else
- sh %{cvs tag #{reltag}}
+ sh %{cd ..; svn copy trunk tags/#{reltag}; svn ci -m "Tag #{reltag}" tags/#{reltag}}
end
end
# --------------------------------------------------------------------
@@ -243,21 +257,23 @@
end
# Package tasks
PKG_FILES = FileList[
- "Rakefile", "ChangeLog", "Releases", "TODO", "README",
+ "Rakefile", "ChangeLog", "Releases", "TODO", "README", "LICENSE.txt",
+ "GPL.txt",
"setup.rb",
"post-install.rb",
"bin/*",
"doc/*.css", "doc/*.rb",
"examples/**/*",
"gemspecs/**/*",
"lib/**/*.rb",
"pkgs/**/*",
"redist/*.gem",
"scripts/*.rb",
- "test/**/*"
+ "test/**/*",
+ ".document"
]
PKG_FILES.exclude(%r(^test/temp(/|$)))
Rake::PackageTask.new("package") do |p|
p.name = PKG_NAME