Permalink
Browse files

spring 2009 cleanup

  • Loading branch information...
1 parent 2227f78 commit 3159e3a12c41e0aafbba7d4f1a3f7e1f604186cc @jmettraux jmettraux committed Mar 24, 2009
View
@@ -1,7 +1,8 @@
= rufus-verbs CHANGELOG.txt
-== rufus-verbs - 0.11 not yet released
+
+== rufus-verbs - 1.0.0 not yet released
== rufus-verbs - 0.10 released 2008/05/28
View
@@ -5,46 +5,19 @@ require 'rake'
require 'rake/clean'
require 'rake/packagetask'
require 'rake/gempackagetask'
-require 'rake/rdoctask'
require 'rake/testtask'
-require 'lib/rufus/verbs/version' # Rufus::Verbs::VERSION
+#require 'rake/rdoctask'
+require 'hanna/rdoctask'
-#
-# GEM SPEC
-
-spec = Gem::Specification.new do |s|
-
- s.name = "rufus-verbs"
- s.version = Rufus::Verbs::VERSION
- s.authors = [ "John Mettraux" ]
- s.email = "john at openwfe dot org"
- s.homepage = "http://rufus.rubyforge.org/rufus-verbs"
- s.platform = Gem::Platform::RUBY
- s.summary = "GET, POST, PUT, DELETE, with something around"
- #s.license = "MIT"
-
- s.require_path = "lib"
- #s.autorequire = "rufus-verbs"
- s.test_file = "test/test.rb"
- s.has_rdoc = true
- s.extra_rdoc_files = [ 'README.txt' ]
-
- [ 'rufus-lru' ].each do |d|
- s.requirements << d
- s.add_dependency d
- end
+gemspec = File.read('rufus-verbs.gemspec')
+eval "gemspec = #{gemspec}"
- files = FileList[ "{bin,docs,lib,test}/**/*" ]
- files.exclude "rdoc"
- files.exclude "extras"
- s.files = files.to_a
-end
#
# tasks
-CLEAN.include("pkg", "html", "rdoc")
+CLEAN.include('pkg', 'html')
task :default => [ :clean, :repackage ]
@@ -53,25 +26,26 @@ task :default => [ :clean, :repackage ]
# TESTING
Rake::TestTask.new(:test) do |t|
- t.libs << "test"
+ t.libs << 'test'
t.test_files = FileList['test/test.rb']
t.verbose = true
end
+
#
# PACKAGING
-Rake::GemPackageTask.new(spec) do |pkg|
+Rake::GemPackageTask.new(gemspec) do |pkg|
#pkg.need_tar = true
end
-Rake::PackageTask.new("rufus-verbs", Rufus::Verbs::VERSION) do |pkg|
+Rake::PackageTask.new('rufus-verbs', gemspec.version) do |pkg|
pkg.need_zip = true
pkg.package_files = FileList[
- "Rakefile",
- "*.txt",
- "lib/**/*",
- "test/**/*"
+ 'Rakefile',
+ '*.txt',
+ 'lib/**/*',
+ 'test/**/*'
].to_a
#pkg.package_files.delete("MISC.txt")
class << pkg
@@ -82,40 +56,47 @@ Rake::PackageTask.new("rufus-verbs", Rufus::Verbs::VERSION) do |pkg|
end
#
-# DOCUMENTATION
-
-#ALLISON=`allison --path`
-ALLISON="/Library/Ruby/Gems/1.8/gems/allison-2.0.3/lib/allison.rb"
+# VERSION
-Rake::RDocTask.new do |rd|
+task :change_version do
- rd.main = "README.txt"
+ version = ARGV.pop
+ `sedip "s/VERSION = '.*'/VERSION = '#{version}'/" lib/rufus/verbs/version.rb`
+ `sedip "s/s.version = '.*'/s.version = '#{version}'/" rufus-verbs.gemspec`
+ exit 0 # prevent rake from triggering other tasks
+end
- rd.rdoc_dir = "html/rufus-verbs"
- rd.rdoc_files.include(
- "README.txt",
- "CHANGELOG.txt",
- "LICENSE.txt",
- "CREDITS.txt",
- "lib/**/*.rb")
+#
+# DOCUMENTATION
- rd.title = "rufus-verbs rdoc"
+Rake::RDocTask.new do |rd|
+ rd.main = 'README.txt'
+ rd.rdoc_dir = 'html/rufus-verbs'
+ rd.rdoc_files.include(
+ 'README.txt',
+ 'CHANGELOG.txt',
+ 'LICENSE.txt',
+ 'CREDITS.txt',
+ 'lib/**/*.rb')
+ rd.title = 'rufus-verbs rdoc'
rd.options << '-N' # line numbers
rd.options << '-S' # inline source
+end
- rd.template = ALLISON if File.exist?(ALLISON)
+task :rrdoc => :rdoc do
+ FileUtils.cp('doc/rdoc-style.css', 'html/rufus-verbs/')
end
#
# WEBSITE
-task :upload_website => [ :clean, :rdoc ] do
+task :upload_website => [ :clean, :rrdoc ] do
- account = "jmettraux@rubyforge.org"
- webdir = "/var/www/gforge-projects/rufus"
+ account = 'jmettraux@rubyforge.org'
+ webdir = '/var/www/gforge-projects/rufus'
sh "rsync -azv -e ssh html/rufus-verbs #{account}:#{webdir}/"
Oops, something went wrong.

0 comments on commit 3159e3a

Please sign in to comment.