Rakefile in cutep-0.0.3 vs Rakefile in cutep-1.0.0
- old
+ new
@@ -15,14 +15,14 @@
puts '$ sudo gem install rspec'
exit
end
include FileUtils
-require File.join(File.dirname(__FILE__), 'lib', 'qp', 'version')
+require File.join(File.dirname(__FILE__), 'lib', 'qp')
AUTHOR = 'Kouichirou Eto'
-EMAIL = "eto@rubyforge.org.please.do.not.send.spam.example.com"
+EMAIL = "eto _at_ rubyforge _dot_ org"
DESCRIPTION = '"Cute p" provide more human readable "p" function.'
GEM_NAME = 'cutep'
@config_file = "~/.rubyforge/user-config.yml"
@config = nil
@@ -94,11 +94,11 @@
Dir['website/**/*.txt'].each do |txt|
sh %{ ruby scripts/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
end
end
-# add chmod function.
+# add chmod.
task :website_generate do
sh %{ chmod -R go+rx website }
end
desc 'Upload website files to rubyforge'
@@ -140,34 +140,55 @@
t.spec_opts = ['--options', "spec/spec.opts"]
t.spec_files = FileList['spec/*_spec.rb']
t.libs << "lib"
end
-# add chmod function.
+# add chmod.
task :docs do
sh %{ chmod -R go+rx doc }
end
-# override clear current task
+# clear current task
module Rake
class Task
def clear_actions
@actions.clear
end
end
end
-# clear current install_gem task
+# clear current task
t = Rake.application.lookup(:install_gem)
t.clear_actions if t
-# redefine install_gem task
+# redefine task
task :install_gem => [:clean, :package] do
if /mswin32/ =~ RUBY_PLATFORM || /cygwin/ =~ RUBY_PLATFORM
sh "gem.cmd install pkg/*.gem" # for Cygwin
else
sh "sudo gem install pkg/*.gem"
end
end
+
+task :clean => [:chmod]
+
+desc 'Change mode to erase executable bits.'
+task :chmod do
+ sh "chmod 644 Rakefile ChangeLog"
+ sh "chmod 644 *.txt */*.txt"
+ sh "chmod 644 */*.html"
+ sh "chmod 644 */*.rhtml"
+ sh "chmod 644 */*/*.js"
+ sh "chmod 644 */*/*.css"
+ sh "chmod 644 *.rb */*.rb"
+ sh "chmod 755 scripts/*"
+end
+
+desc 'Create Manifest.txt file.'
+task :manifest => [:chmod, :clean] do
+ ruby "scripts/makemanifest.rb"
+end
+
+task :gem => [:manifest]
desc "Default task is to run specs"
task :default => :spec