data/tasks/setup.rb in bones-1.3.2 vs data/tasks/setup.rb in bones-1.3.3
- old
+ new
@@ -14,11 +14,12 @@
PROJ.authors = nil
PROJ.email = nil
PROJ.url = nil
PROJ.version = ENV['VERSION'] || '0.0.0'
PROJ.rubyforge_name = nil
-PROJ.exclude = %w(tmp$ bak$ ~$ CVS .svn/ ^pkg/ ^doc/)
+PROJ.exclude = %w(tmp$ bak$ ~$ CVS .svn/ ^pkg/ ^doc/ announcement.txt)
+PROJ.release_name = ENV['RELEASE']
# Rspec
PROJ.specs = FileList['spec/**/*_spec.rb']
PROJ.spec_opts = []
@@ -53,22 +54,38 @@
else [] end
PROJ.executables = PROJ.files.find_all {|fn| fn =~ %r/^bin/}
PROJ.dependencies = []
PROJ.need_tar = true
PROJ.need_zip = false
+PROJ.post_install_message = nil
# File Annotations
-PROJ.annotation_exclude = []
+PROJ.annotation_exclude = %w(^tasks/setup.rb$)
PROJ.annotation_extensions = %w(.txt .rb .erb) << ''
+PROJ.annotation_tags = %w(FIXME OPTIMIZE TODO)
# Subversion Repository
PROJ.svn = false
PROJ.svn_root = nil
PROJ.svn_trunk = 'trunk'
PROJ.svn_tags = 'tags'
PROJ.svn_branches = 'branches'
+# Announce
+PROJ.ann_text = nil
+PROJ.ann_paragraphs = []
+PROJ.ann_email = {
+ :from => nil,
+ :to => %w(ruby-talk@ruby-lang.org),
+ :server => 'localhost',
+ :port => 25,
+ :domain => ENV['HOSTNAME'],
+ :acct => nil,
+ :passwd => nil,
+ :authtype => :plain
+}
+
# Load the other rake files in the tasks folder
rakefiles = Dir.glob('tasks/*.rake').sort
rakefiles.unshift(rakefiles.delete('tasks/post_load.rake')).compact!
import(*rakefiles)
@@ -97,12 +114,12 @@
else
if quiet {system 'which sudo'} then 'sudo'
else '' end
end
-RCOV = WIN32 ? 'rcov.cmd' : 'rcov'
-GEM = WIN32 ? 'gem.cmd' : 'gem'
+RCOV = WIN32 ? 'rcov.bat' : 'rcov'
+GEM = WIN32 ? 'gem.bat' : 'gem'
%w(rcov spec/rake/spectask rubyforge bones facets/ansicode).each do |lib|
begin
require lib
Object.instance_eval {const_set "HAVE_#{lib.tr('/','_').upcase}", true}
@@ -182,8 +199,23 @@
cd dir
return block.call
ensure
cd curdir
end
+end
+
+# Scans the current working directory and creates a list of files that are
+# candidates to be in the manifest.
+#
+def manifest_files
+ files = []
+ exclude = Regexp.new(PROJ.exclude.join('|'))
+ Find.find '.' do |path|
+ path.sub! %r/^(\.\/|\/)/o, ''
+ next unless test ?f, path
+ next if path =~ exclude
+ files << path
+ end
+ files.sort!
end
# EOF