Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 47 lines (34 sloc) 1.128 kB
e31941d @rtomayko add .gemspec; remove echoe
rtomayko authored
1 require 'rake/clean'
5aa20ae Rakefile
Blake Mizerany authored
2
3 task :default => :test
4
e31941d @rtomayko add .gemspec; remove echoe
rtomayko authored
5 # SPECS ===============================================================
6
7 desc 'Run specs with story style output'
8 task :spec do
9 sh 'specrb --specdox -Ilib:test test/*_test.rb'
10 end
11
12 desc 'Run specs with unit test style output'
13 task :test => FileList['test/*_test.rb'] do |t|
14 suite = t.prerequisites.map{|f| "-r#{f.chomp('.rb')}"}.join(' ')
15 sh "ruby -Ilib:test #{suite} -e ''", :verbose => false
16 end
17
18 # PACKAGING ============================================================
19
20 def spec
21 @spec ||=
22 eval(File.read('sinatra.gemspec'))
23 end
24
25 def package(ext='')
26 "dist/sinatra-#{spec.version}" + ext
27 end
28
29 desc 'Build packages'
30 task :package => %w[.gem .tar.gz].map {|e| package(e)}
31
32 desc 'Build and install as local gem'
33 task :install => package('.gem') do
34 sh "gem install #{package('.gem')}"
35 end
36
37 directory 'dist/'
38
39 file package('.gem') => %w[dist/ sinatra.gemspec] + spec.files do |f|
40 sh "gem build sinatra.gemspec"
41 mv File.basename(f.name), f.name
42 end
43
44 file package('.tar.gz') => %w[dist/] + spec.files do |f|
45 sh "git archive --format=tar HEAD | gzip > #{f.name}"
ca9ac7b Sinatra 0.2.0 released
Blake Mizerany authored
46 end
Something went wrong with that request. Please try again.