Rakefile in usher-0.7.1 vs Rakefile in usher-0.7.2
- old
+ new
@@ -1,31 +1,66 @@
# encoding: utf-8
require 'spec'
require 'spec/rake/spectask'
-task :spec => ['spec:private', 'spec:rails2_2', 'spec:rails2_3']
+require 'yard'
+
+YARD::Rake::YardocTask.new do |t|
+ t.files = ['lib/**/*.rb'] # optional
+ t.options = ['--markup=markdown'] # optional
+end
+
+task :spec => ['spec:private', 'spec:rails2_2:cleanup', 'spec:rails2_3:cleanup']
namespace(:spec) do
Spec::Rake::SpecTask.new(:private) do |t|
t.spec_opts ||= []
t.spec_opts << "-rubygems"
t.spec_opts << "--options" << "spec/spec.opts"
t.spec_files = FileList['spec/private/**/*_spec.rb']
end
- Spec::Rake::SpecTask.new(:rails2_2) do |t|
- t.spec_opts ||= []
- t.spec_opts << "-rubygems"
- t.spec_opts << "--options" << "spec/spec.opts"
- t.spec_files = FileList['spec/rails2_2/**/*_spec.rb']
- end
+ namespace(:rails2_2) do
+ task :unzip do
+ sh('rm -rf spec/rails2_2/vendor')
+ sh('unzip -qq spec/rails2_2/vendor.zip -dspec/rails2_2')
+ end
- Spec::Rake::SpecTask.new(:rails2_3) do |t|
- t.spec_opts ||= []
- t.spec_opts << "-rubygems"
- t.spec_opts << "--options" << "spec/spec.opts"
- t.spec_files = FileList['spec/rails2_3/**/*_spec.rb']
+ Spec::Rake::SpecTask.new(:spec) do |t|
+ t.spec_opts ||= []
+ t.spec_opts << "-rubygems"
+ t.spec_opts << "--options" << "spec/spec.opts"
+ t.spec_files = FileList['spec/rails2_2/**/*_spec.rb']
+ end
+
+ task :cleanup do
+ sh('rm -rf spec/rails2_2/vendor')
+ end
+
+ task :spec => :unzip
+ task :cleanup => :spec
end
+ namespace(:rails2_3) do
+ task :unzip do
+ sh('rm -rf spec/rails2_3/vendor')
+ sh('unzip -qq spec/rails2_3/vendor.zip -dspec/rails2_3')
+ end
+
+ Spec::Rake::SpecTask.new(:spec) do |t|
+ t.spec_opts ||= []
+ t.spec_opts << "-rubygems"
+ t.spec_opts << "--options" << "spec/spec.opts"
+ t.spec_files = FileList['spec/rails2_3/**/*_spec.rb']
+ end
+ task :cleanup do
+ sh('rm -rf spec/rails2_3/vendor')
+ end
+
+ task :spec => :unzip
+ task :cleanup => :spec
+ end
+
+
end
desc "Run all examples with RCov"
Spec::Rake::SpecTask.new('spec_with_rcov') do |t|
t.spec_files = FileList['spec/**/*.rb']