Rakefile in classifier-1.1.1 vs Rakefile in classifier-1.2.0
- old
+ new
@@ -3,11 +3,11 @@
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
-PKG_VERSION = "1.1.1"
+PKG_VERSION = "1.2.0"
PKG_FILES = FileList[
"lib/**/*", "bin/*", "test/**/*", "[A-Z]*", "Rakefile", "doc/**/*"
]
@@ -20,10 +20,16 @@
t.libs << "lib"
t.pattern = 'test/*/*_test.rb'
t.verbose = true
}
+# Make a console, useful when working on tests
+desc "Generate a test console"
+task :console do
+ verbose( false ) { sh "irb -I lib/ -r 'classifier'" }
+end
+
# Genereate the RDoc documentation
desc "Create documentation"
Rake::RDocTask.new("doc") { |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.rdoc_files.include('README')
@@ -55,21 +61,27 @@
#### Documentation and testing.
s.has_rdoc = true
+ #### Dependencies and requirements.
+
+ s.add_dependency('stemmer', '>= 1.0.0')
+ s.requirements << "A porter-stemmer module to split word stems."
+
#### Author and project details.
s.author = "Lucas Carlson"
s.email = "lucas@rufy.com"
- s.homepage = "http://rubyforge.org/projects/classifier/"
+ s.homepage = "http://classifier.rufy.com/"
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_zip = false
pkg.need_tar = true
end
-desc "Publish to RubyForge"
-task :rubyforge do
+desc "Publish new documentation"
+task :publish do
+ `ssh rufy update-classifier-doc`
Rake::RubyForgePublisher.new('classifier', 'cardmagic').upload
end