Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Build distributables under pkg/ instead of dist/ (per blake's request)

While here, clean up some random cruft in the Rakefile
  • Loading branch information...
commit 230f1ea10d6bf3697cc329662a13f3bcd4b9cc9c 1 parent d5f2028
@rtomayko rtomayko authored
Showing with 9 additions and 20 deletions.
  1. +2 −2 .gitignore
  2. +7 −18 Rakefile
View
4 .gitignore
@@ -1,9 +1,9 @@
*.log
.DS_Store
-/dist
+/pkg
/book
/doc/api
/doc/*.html
.#*
\#*
-.emacs*
+.emacs*
View
25 Rakefile
@@ -33,7 +33,7 @@ def spec
end
def package(ext='')
- "dist/sinatra-#{spec.version}" + ext
+ "pkg/sinatra-#{spec.version}" + ext
end
desc 'Build packages'
@@ -44,15 +44,15 @@ task :install => package('.gem') do
sh "gem install #{package('.gem')}"
end
-directory 'dist/'
-CLOBBER.include('dist')
+directory 'pkg/'
+CLOBBER.include('pkg')
-file package('.gem') => %w[dist/ sinatra.gemspec] + spec.files do |f|
+file package('.gem') => %w[pkg/ sinatra.gemspec] + spec.files do |f|
sh "gem build sinatra.gemspec"
mv File.basename(f.name), f.name
end
-file package('.tar.gz') => %w[dist/] + spec.files do |f|
+file package('.tar.gz') => %w[pkg/] + spec.files do |f|
sh <<-SH
git archive \
--prefix=sinatra-#{source_version}/ \
@@ -64,7 +64,7 @@ end
# Rubyforge Release / Publish Tasks ==================================
desc 'Publish gem and tarball to rubyforge'
-task 'publish:gem' => [package('.gem'), package('.tar.gz')] do |t|
+task 'release' => [package('.gem'), package('.tar.gz')] do |t|
sh <<-end
rubyforge add_release sinatra sinatra #{spec.version} #{package('.gem')} &&
rubyforge add_file sinatra sinatra #{spec.version} #{package('.tar.gz')}
@@ -95,12 +95,6 @@ file 'doc/api/index.html' => FileList['lib/**/*.rb','README.rdoc'] do |f|
end
CLEAN.include 'doc/api'
-def rdoc_to_html(file_name)
- require 'rdoc/markup/to_html'
- rdoc = RDoc::Markup::ToHtml.new
- rdoc.convert(File.read(file_name))
-end
-
# Gemspec Helpers ====================================================
def source_version
@@ -108,12 +102,7 @@ def source_version
line.match(/.*VERSION = '(.*)'/)[1]
end
-project_files =
- FileList[
- '{lib,test,compat,images}/**',
- 'Rakefile', 'CHANGES', 'README.rdoc'
- ]
-file 'sinatra.gemspec' => project_files do |f|
+task 'sinatra.gemspec' => FileList['{lib,test,compat}/**','Rakefile','CHANGES','*.rdoc'] do |f|
# read spec file and split out manifest section
spec = File.read(f.name)
head, manifest, tail = spec.split(" # = MANIFEST =\n")
Please sign in to comment.
Something went wrong with that request. Please try again.