0
-require 'rake/gempackagetask'
0
-require 'rake/contrib/rubyforgepublisher'
0
-require 'rake/rdoctask'
0
-require 'rake/testtask'
0
-dir = File.dirname(__FILE__)
0
+require './lib/spec/rake/spectask'
0
+Hoe.new('rspec', Spec::VERSION::STRING) do |p|
0
+ p.summary = Spec::VERSION::DESCRIPTION
0
+ p.rubyforge_name = 'rspec'
0
+ p.developer('RSpec Development Team', 'dev@rspec.info')
0
-# Some of the tasks are in separate files since they are also part of the website documentation
0
-load File.dirname(__FILE__) + '/rake_tasks/examples.rake'
0
-load File.dirname(__FILE__) + '/rake_tasks/examples_with_rcov.rake'
0
-load File.dirname(__FILE__) + '/rake_tasks/failing_examples_with_html.rake'
0
-load File.dirname(__FILE__) + '/rake_tasks/verify_rcov.rake'
0
+['audit','test','test_deps','default'].each do |task|
0
+ Rake.application.instance_variable_get('@tasks').delete(task)
0
-PKG_VERSION = Spec::VERSION::STRING
0
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
0
- 'failing_examples/**/*',
0
+task :default => ['spec']
0
-task :default => [:verify_rcov]
0
-task :verify_rcov => [:spec, :stories]
0
+# require 'rake/gempackagetask'
0
+# require 'rake/contrib/rubyforgepublisher'
0
+# require 'rake/rdoctask'
0
+# require 'rake/testtask'
0
+# require 'spec/version'
0
+# dir = File.dirname(__FILE__)
0
+# # Some of the tasks are in separate files since they are also part of the website documentation
0
+# load File.dirname(__FILE__) + '/rake_tasks/examples.rake'
0
+# load File.dirname(__FILE__) + '/rake_tasks/examples_with_rcov.rake'
0
+# load File.dirname(__FILE__) + '/rake_tasks/failing_examples_with_html.rake'
0
+# load File.dirname(__FILE__) + '/rake_tasks/verify_rcov.rake'
0
+# PKG_VERSION = Spec::VERSION::STRING
0
+# PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
0
+# PKG_FILES = FileList[
0
+# 'failing_examples/**/*',
0
+# task :default => [:verify_rcov]
0
+# task :verify_rcov => [:spec, :stories]
0
Spec::Rake::SpecTask.new do |t|
0
t.spec_files = FileList['spec/**/*_spec.rb']
0
@@ -41,222 +62,222 @@ Spec::Rake::SpecTask.new do |t|
0
t.rcov_opts = ['--exclude', 'lib/spec.rb,lib/spec/runner.rb,spec\/spec,bin\/spec,examples,\/var\/lib\/gems,\/Library\/Ruby,\.autotest']
0
- html = 'story_server/prototype/rspec_stories.html'
0
- ruby "stories/all.rb --colour --format plain --format html:#{html}"
0
- unless IO.read(html) =~ /<span class="param">/m
0
- raise 'highlighted parameters are broken in story HTML'
0
-desc "Run all specs and store html output in doc/output/report.html"
0
-Spec::Rake::SpecTask.new('spec_html') do |t|
0
- t.spec_files = FileList['spec/**/*_spec.rb']
0
- t.spec_opts = ['--format html:../../../../doc/output/report.html', '--format progress','--backtrace']
0
-desc "Run all failing examples"
0
-Spec::Rake::SpecTask.new('failing_examples') do |t|
0
- t.spec_files = FileList['failing_examples/**/*_spec.rb']
0
-rd = Rake::RDocTask.new do |rdoc|
0
- rdoc.rdoc_dir = '../doc/output/rdoc'
0
- rdoc.options << '--title' << 'RSpec' << '--line-numbers' << '--inline-source' << '--main' << 'README'
0
- rdoc.rdoc_files.include('README', 'CHANGES', 'MIT-LICENSE', 'lib/**/*.rb')
0
-spec = Gem::Specification.new do |s|
0
- s.version = PKG_VERSION
0
- s.summary = Spec::VERSION::DESCRIPTION
0
- s.description = <<-EOF
0
- RSpec is a behaviour driven development (BDD) framework for Ruby. RSpec was
0
- created in response to Dave Astels' article _A New Look at Test Driven Development_
0
- which can be read at: http://daveastels.com/index.php?p=5 RSpec is intended to
0
- provide the features discussed in Dave's article.
0
- s.files = PKG_FILES.to_a
0
- s.require_path = 'lib'
0
- s.rdoc_options = rd.options
0
- s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$|^EXAMPLES.rd$/ }.to_a
0
- s.executables = ['spec', 'spec_translator', 'autospec']
0
- s.default_executable = 'spec'
0
- s.author = "RSpec Development Team"
0
- s.email = "rspec-devel@rubyforge.org"
0
- s.homepage = "http://rspec.rubyforge.org"
0
- s.platform = Gem::Platform::RUBY
0
- s.rubyforge_project = "rspec"
0
-Rake::GemPackageTask.new(spec) do |pkg|
0
- Dir['**/*.rb'].each do |fn|
0
- puts "#{fn}:#{count}:#{line}"
0
-desc "Look for TODO and FIXME tags in the code"
0
- egrep /(FIXME|TODO|TBD)/
0
-task :release => [:verify_committed, :verify_user, :spec, :publish_packages, :tag, :publish_news]
0
-desc "Verifies that there is no uncommitted code"
0
-task :verify_committed do
0
- IO.popen('git status') do |io|
0
- io.each_line do |line|
0
- raise "\n!!! Do a git commit first !!!\n\n" if line =~ /^#\s*modified:/
0
-desc "Creates a tag in svn"
0
- # from = `svn info #{File.dirname(__FILE__)}`.match(/URL: (.*)\/rspec/n)[1]
0
- # to = from.gsub(/trunk/, "tags/#{Spec::VERSION::TAG}")
0
- # current = from.gsub(/trunk/, "tags/CURRENT")
0
- # puts "Creating tag in SVN"
0
- # tag_cmd = "svn cp #{from} #{to} -m \"Tag release #{Spec::VERSION::FULL_VERSION}\""
0
- # `#{tag_cmd}` ; raise "ERROR: #{tag_cmd}" unless $? == 0
0
- # puts "Removing CURRENT"
0
- # remove_current_cmd = "svn rm #{current} -m \"Remove tags/CURRENT\""
0
- # `#{remove_current_cmd}` ; raise "ERROR: #{remove_current_cmd}" unless $? == 0
0
- # puts "Re-Creating CURRENT"
0
- # create_current_cmd = "svn cp #{to} #{current} -m \"Copy #{Spec::VERSION::TAG} to tags/CURRENT\""
0
- # `#{create_current_cmd}` ; "ERROR: #{create_current_cmd}" unless $? == 0
0
- raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
0
-desc "Upload Website to RubyForge"
0
-task :publish_website => [:verify_user, :website] do
0
- unless Spec::VERSION::RELEASE_CANDIDATE
0
- publisher = Rake::SshDirPublisher.new(
0
- "rspec-website@rubyforge.org",
0
- "/var/www/gforge-projects/#{PKG_NAME}",
0
- puts "** Not publishing packages to RubyForge - this is a prerelease"
0
-desc "Upload Website archive to RubyForge"
0
-task :archive_website => [:verify_user, :website] do
0
- publisher = Rake::SshDirPublisher.new(
0
- "rspec-website@rubyforge.org",
0
- "/var/www/gforge-projects/#{PKG_NAME}/#{Spec::VERSION::TAG}",
0
-desc "Package the Rails plugin"
0
-task :package_rspec_on_rails do
0
- mkdir 'pkg' rescue nil
0
- rm_rf "pkg/rspec-rails-#{PKG_VERSION}" rescue nil
0
- `git clone ../rspec-rails pkg/rspec-rails-#{PKG_VERSION}`
0
- rm_rf "pkg/rspec-rails-#{PKG_VERSION}/.git"
0
- `tar cvzf rspec-rails-#{PKG_VERSION}.tgz rspec-rails-#{PKG_VERSION}`
0
-task :pkg => :package_rspec_on_rails
0
-desc "Package the RSpec.tmbundle"
0
-task :package_tmbundle do
0
- mkdir 'pkg' rescue nil
0
- rm_rf "pkg/RSpec-#{PKG_VERSION}.tmbundle" rescue nil
0
- `git clone ../../../../RSpec.tmbundle pkg/RSpec-#{PKG_VERSION}.tmbundle`
0
- rm_rf "pkg/RSpec-#{PKG_VERSION}.tmbundle/.git"
0
- `tar cvzf RSpec-#{PKG_VERSION}.tmbundle.tgz RSpec-#{PKG_VERSION}.tmbundle`
0
-task :pkg => :package_tmbundle
0
-desc "Publish gem+tgz+zip on RubyForge. You must make sure lib/version.rb is aligned with the CHANGELOG file"
0
-task :publish_packages => [:verify_user, :package, :pkg] do
0
- release_files = FileList[
0
- "pkg/#{PKG_FILE_NAME}.gem",
0
- "pkg/#{PKG_FILE_NAME}.tgz",
0
- "pkg/rspec-rails-#{PKG_VERSION}.tgz",
0
- "pkg/#{PKG_FILE_NAME}.zip",
0
- "pkg/RSpec-#{PKG_VERSION}.tmbundle.tgz"
0
- unless Spec::VERSION::RELEASE_CANDIDATE
0
- require 'meta_project'
0
- require 'rake/contrib/xforge'
0
- Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |xf|
0
- # Never hardcode user name and password in the Rakefile!
0
- xf.user_name = ENV['RUBYFORGE_USER']
0
- xf.files = release_files.to_a
0
- xf.release_name = "RSpec #{PKG_VERSION}"
0
- puts "SINCE THIS IS A PRERELEASE, FILES ARE UPLOADED WITH SSH, NOT TO THE RUBYFORGE FILE SECTION"
0
- puts "YOU MUST TYPE THE PASSWORD #{release_files.length} TIMES..."
0
- host = "rspec-website@rubyforge.org"
0
- remote_dir = "/var/www/gforge-projects/#{PKG_NAME}"
0
- publisher = Rake::SshFilePublisher.new(
0
- File.dirname(__FILE__),
0
- puts "UPLADED THE FOLLOWING FILES:"
0
- release_files.each do |file|
0
- name = file.match(/pkg\/(.*)/)[1]
0
- puts "* http://rspec.rubyforge.org/#{name}"
0
- puts "They are not linked to anywhere, so don't forget to tell people!"
0
-desc "Publish news on RubyForge"
0
-task :publish_news => [:verify_user] do
0
- unless Spec::VERSION::RELEASE_CANDIDATE
0
- require 'meta_project'
0
- require 'rake/contrib/xforge'
0
- Rake::XForge::NewsPublisher.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |news|
0
- # Never hardcode user name and password in the Rakefile!
0
- news.user_name = ENV['RUBYFORGE_USER']
0
- puts "** Not publishing news to RubyForge - this is a prerelease"
0
\ No newline at end of file
0
+# desc "Run all stories"
0
+# html = 'story_server/prototype/rspec_stories.html'
0
+# ruby "stories/all.rb --colour --format plain --format html:#{html}"
0
+# unless IO.read(html) =~ /<span class="param">/m
0
+# raise 'highlighted parameters are broken in story HTML'
0
+# desc "Run all specs and store html output in doc/output/report.html"
0
+# Spec::Rake::SpecTask.new('spec_html') do |t|
0
+# t.spec_files = FileList['spec/**/*_spec.rb']
0
+# t.spec_opts = ['--format html:../../../../doc/output/report.html', '--format progress','--backtrace']
0
+# desc "Run all failing examples"
0
+# Spec::Rake::SpecTask.new('failing_examples') do |t|
0
+# t.spec_files = FileList['failing_examples/**/*_spec.rb']
0
+# rd = Rake::RDocTask.new do |rdoc|
0
+# rdoc.rdoc_dir = '../doc/output/rdoc'
0
+# rdoc.options << '--title' << 'RSpec' << '--line-numbers' << '--inline-source' << '--main' << 'README'
0
+# rdoc.rdoc_files.include('README', 'CHANGES', 'MIT-LICENSE', 'lib/**/*.rb')
0
+# spec = Gem::Specification.new do |s|
0
+# s.version = PKG_VERSION
0
+# s.summary = Spec::VERSION::DESCRIPTION
0
+# s.description = <<-EOF
0
+# RSpec is a behaviour driven development (BDD) framework for Ruby. RSpec was
0
+# created in response to Dave Astels' article _A New Look at Test Driven Development_
0
+# which can be read at: http://daveastels.com/index.php?p=5 RSpec is intended to
0
+# provide the features discussed in Dave's article.
0
+# s.files = PKG_FILES.to_a
0
+# s.require_path = 'lib'
0
+# s.rdoc_options = rd.options
0
+# s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$|^EXAMPLES.rd$/ }.to_a
0
+# s.executables = ['spec', 'spec_translator', 'autospec']
0
+# s.default_executable = 'spec'
0
+# s.author = "RSpec Development Team"
0
+# s.email = "rspec-devel@rubyforge.org"
0
+# s.homepage = "http://rspec.rubyforge.org"
0
+# s.platform = Gem::Platform::RUBY
0
+# s.rubyforge_project = "rspec"
0
+# Rake::GemPackageTask.new(spec) do |pkg|
0
+# Dir['**/*.rb'].each do |fn|
0
+# puts "#{fn}:#{count}:#{line}"
0
+# desc "Look for TODO and FIXME tags in the code"
0
+# egrep /(FIXME|TODO|TBD)/
0
+# task :release => [:verify_committed, :verify_user, :spec, :publish_packages, :tag, :publish_news]
0
+# desc "Verifies that there is no uncommitted code"
0
+# task :verify_committed do
0
+# IO.popen('git status') do |io|
0
+# io.each_line do |line|
0
+# raise "\n!!! Do a git commit first !!!\n\n" if line =~ /^#\s*modified:/
0
+# desc "Creates a tag in svn"
0
+# # from = `svn info #{File.dirname(__FILE__)}`.match(/URL: (.*)\/rspec/n)[1]
0
+# # to = from.gsub(/trunk/, "tags/#{Spec::VERSION::TAG}")
0
+# # current = from.gsub(/trunk/, "tags/CURRENT")
0
+# # puts "Creating tag in SVN"
0
+# # tag_cmd = "svn cp #{from} #{to} -m \"Tag release #{Spec::VERSION::FULL_VERSION}\""
0
+# # `#{tag_cmd}` ; raise "ERROR: #{tag_cmd}" unless $? == 0
0
+# # puts "Removing CURRENT"
0
+# # remove_current_cmd = "svn rm #{current} -m \"Remove tags/CURRENT\""
0
+# # `#{remove_current_cmd}` ; raise "ERROR: #{remove_current_cmd}" unless $? == 0
0
+# # puts "Re-Creating CURRENT"
0
+# # create_current_cmd = "svn cp #{to} #{current} -m \"Copy #{Spec::VERSION::TAG} to tags/CURRENT\""
0
+# # `#{create_current_cmd}` ; "ERROR: #{create_current_cmd}" unless $? == 0
0
+# raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
0
+# desc "Upload Website to RubyForge"
0
+# task :publish_website => [:verify_user, :website] do
0
+# unless Spec::VERSION::RELEASE_CANDIDATE
0
+# publisher = Rake::SshDirPublisher.new(
0
+# "rspec-website@rubyforge.org",
0
+# "/var/www/gforge-projects/#{PKG_NAME}",
0
+# puts "** Not publishing packages to RubyForge - this is a prerelease"
0
+# desc "Upload Website archive to RubyForge"
0
+# task :archive_website => [:verify_user, :website] do
0
+# publisher = Rake::SshDirPublisher.new(
0
+# "rspec-website@rubyforge.org",
0
+# "/var/www/gforge-projects/#{PKG_NAME}/#{Spec::VERSION::TAG}",
0
+# desc "Package the Rails plugin"
0
+# task :package_rspec_on_rails do
0
+# mkdir 'pkg' rescue nil
0
+# rm_rf "pkg/rspec-rails-#{PKG_VERSION}" rescue nil
0
+# `git clone ../rspec-rails pkg/rspec-rails-#{PKG_VERSION}`
0
+# rm_rf "pkg/rspec-rails-#{PKG_VERSION}/.git"
0
+# `tar cvzf rspec-rails-#{PKG_VERSION}.tgz rspec-rails-#{PKG_VERSION}`
0
+# task :pkg => :package_rspec_on_rails
0
+# desc "Package the RSpec.tmbundle"
0
+# task :package_tmbundle do
0
+# mkdir 'pkg' rescue nil
0
+# rm_rf "pkg/RSpec-#{PKG_VERSION}.tmbundle" rescue nil
0
+# `git clone ../../../../RSpec.tmbundle pkg/RSpec-#{PKG_VERSION}.tmbundle`
0
+# rm_rf "pkg/RSpec-#{PKG_VERSION}.tmbundle/.git"
0
+# `tar cvzf RSpec-#{PKG_VERSION}.tmbundle.tgz RSpec-#{PKG_VERSION}.tmbundle`
0
+# task :pkg => :package_tmbundle
0
+# desc "Publish gem+tgz+zip on RubyForge. You must make sure lib/version.rb is aligned with the CHANGELOG file"
0
+# task :publish_packages => [:verify_user, :package, :pkg] do
0
+# release_files = FileList[
0
+# "pkg/#{PKG_FILE_NAME}.gem",
0
+# "pkg/#{PKG_FILE_NAME}.tgz",
0
+# "pkg/rspec-rails-#{PKG_VERSION}.tgz",
0
+# "pkg/#{PKG_FILE_NAME}.zip",
0
+# "pkg/RSpec-#{PKG_VERSION}.tmbundle.tgz"
0
+# unless Spec::VERSION::RELEASE_CANDIDATE
0
+# require 'meta_project'
0
+# require 'rake/contrib/xforge'
0
+# Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |xf|
0
+# # Never hardcode user name and password in the Rakefile!
0
+# xf.user_name = ENV['RUBYFORGE_USER']
0
+# xf.files = release_files.to_a
0
+# xf.release_name = "RSpec #{PKG_VERSION}"
0
+# puts "SINCE THIS IS A PRERELEASE, FILES ARE UPLOADED WITH SSH, NOT TO THE RUBYFORGE FILE SECTION"
0
+# puts "YOU MUST TYPE THE PASSWORD #{release_files.length} TIMES..."
0
+# host = "rspec-website@rubyforge.org"
0
+# remote_dir = "/var/www/gforge-projects/#{PKG_NAME}"
0
+# publisher = Rake::SshFilePublisher.new(
0
+# File.dirname(__FILE__),
0
+# puts "UPLADED THE FOLLOWING FILES:"
0
+# release_files.each do |file|
0
+# name = file.match(/pkg\/(.*)/)[1]
0
+# puts "* http://rspec.rubyforge.org/#{name}"
0
+# puts "They are not linked to anywhere, so don't forget to tell people!"
0
+# desc "Publish news on RubyForge"
0
+# task :publish_news => [:verify_user] do
0
+# unless Spec::VERSION::RELEASE_CANDIDATE
0
+# require 'meta_project'
0
+# require 'rake/contrib/xforge'
0
+# Rake::XForge::NewsPublisher.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |news|
0
+# # Never hardcode user name and password in the Rakefile!
0
+# news.user_name = ENV['RUBYFORGE_USER']
0
+# puts "** Not publishing news to RubyForge - this is a prerelease"
0
\ No newline at end of file