Rakefile in reap-0.6.1 vs Rakefile in reap-3.01
- old
+ new
@@ -1,19 +1,141 @@
-require 'reap/reap-all'
+require 'reap/tasks'
-#require 'reap/template-task'
-#require 'reap/chmod-task'
-#require 'reap/test-task'
-#require 'reap/rdoc-task'
-#require 'reap/announce-task'
-#require 'reap/publish-task'
-#require 'reap/package-task'
+# Traditionally, a prebuilt rake task is utilized like this:
+#
+# Reap::PublishTask.new :mypublisher do |s|
+# s.type = 'web'
+# s.host = 'rubyforge.org'
+# s.username = 'transami'
+# s.dir = 'pub/www'
+# end
+#
+# Reap provides a way to use YAML and specilize methods to make
+# this even cleaner.
+#
+# publish_task( :mypublisher ) {"
+# type : web
+# host : rubyforge.org
+# username : transami
+# dir : pub/www
+# "}
+#
+# Of course, one can still use a traditional block with the
+# special methods.
+#
+# publish_task :mypublisher do |s|
+# s.type = 'web'
+# s.host = 'rubyforge.org'
+# s.username = 'transami'
+# s.dir = 'pub/www'
+# end
+#
+# But there is an additional advantage to the YAML approach. Reap prepends
+# the task YAML with the YAML in the ProjectInfo file. This way it is easy
+# to reuse master information in indivial tasks. For exmaple you might have
+# an# &author anchor defined in ProjectInfo.
+#
+# publish_task( :mypublisher ) {"
+# type : web
+# host : rubyforge.org
+# username : *author
+# dir : pub/www
+# "}
+#
+# This special method notation actually works for some prebuilt rake tasks too.
+# But do not expect the YAML to work /w them.
+#
-#Reap::TemplateTask.new
-#Reap::ChmodTask.new
-#Reap::TestTask.new
-#Reap::RDocTask.new
-#Reap::AnnounceTask.new
-#Reap::PublishTask.new
-#Reap::PackageTask.new
+# template_task
+include ReapTask
+
+info_task( :info )
+
+publish_task :publish do"
+ type : web
+ host : rubyforge.org
+ username : transami
+ dir : www
+"end
+
+announce_task :announce do"
+ to : transfire@gmail.com # ruby-talk@ruby-lang.org
+ from : *email
+ domain : reap.rubyforge.org
+ server : smtp.gmail.com
+ port : 587
+ account : *email # transfire@gmail.com
+ authtype : login # cram_md5, plain
+ sectype : tls # ~, tls, ssl (not working yet)
+ file : ANN # which file contains announcement
+ slogan : REAP THE REWARDS!
+ links :
+ - http://reap.rubyforge.org
+ - http://rake.rubyforge.org
+"end
+
+filemod_task :filemod do"
+ filemod: 644
+ dirmod: 755
+ user: trans
+ group: users
+"end
+
+test_task :test do"
+ files:
+ - 'test/**/tc*.rb'
+ - 'test/**/test*.rb'
+ - 'test/**/*test.rb'
+ options: ~ # not used yet
+"end
+
+rdoc_task :rdoc do"
+ title: *title
+ dir: 'pub/www/rdoc'
+ template: html
+ options: ['--merge', '--all']
+ main: README
+ include:
+ - 'README*'
+ - 'LICEN*'
+ - 'COPY*'
+ - 'lib/**/*.rb'
+ - 'bin/**/*.rb'
+ exclude: []
+"end
+
+package_task :package do"
+ dir: pkg
+ include:
+ - 'lib/**/*'
+ - 'data/**/*'
+ - 'ext/**/*'
+ - 'bin/**/*'
+ - 'bench/**/*'
+ - 'test/**/*'
+ - 'doc/**/*'
+ - 'rdoc/**/*'
+ - 'pub/**/*'
+ - 'www/**/*'
+ - 'demo/**/*'
+ - 'samples/**/*'
+ - 'examples/**/*'
+ - 'bench/**/*'
+ - 'setup.rb'
+ - '[A-Z]*'
+ exclude:
+ - InstalledFiles
+ autorequire: ~
+ requirements: []
+ dependencies: *dep #[]
+ executables: *exe #[]
+ gem: true
+ zip: true
+ gzip: true
+ bzip2: true
+"end
+
+noop_task :noop do"
+ message: 'Hello, World!'
+"end