public
Description: Test against many versions of Rails with a single command.
Homepage: http://multi-rails.rubyforge.org/
Clone URL: git://github.com/relevance/multi_rails.git
multi_rails / Rakefile
100644 59 lines (52 sloc) 2.367 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
begin
  gem 'technicalpickles-echoe'
rescue LoadError => e
  puts "couldn't find the correct version of echoe - please install from forked version on github: http://github.com/technicalpickles/echoe/"
  puts "gem sources -a http://gems.github.com"
  puts "sudo gem install technicalpickles-echoe"
end
 
require 'rubygems'
require 'echoe'
require File.expand_path(File.join(File.dirname(__FILE__), "/lib/multi_rails"))
load File.expand_path(File.join(File.dirname(__FILE__), "/tasks/multi_rails.rake"))
 
Echoe.new('multi_rails') do |p|
  p.version = MultiRails::VERSION
  p.rubyforge_name = 'thinkrelevance'
  p.author = ['Rob Sanheim', 'Relevance']
  p.email = 'multi_rails@googlegroups.com'
  p.summary = 'Testing tool to easily test agaist multiple versions of Rails.'
  p.description = "MultiRails allows easy testing against multiple versions of Rails for your Rails specific gem or plugin. It also has tentative support testing Rails applications against multiple versions of Rails."
  p.url = "http://github.com/relevance/multi_rails/"
  p.rdoc_pattern = /^(lib|bin|ext)|txt|rdoc|CHANGELOG|MIT-LICENSE$/
  p.test_pattern = 'test/**/*_test.rb'
  p.eval = lambda { self.require_paths = ['lib', 'tasks'] }
  # p.manifest_name = 'manifest.txt'
  rdoc_template = `allison --path`.strip << ".rb"
  p.rdoc_template = rdoc_template
end
 
desc "Convert the readme from markdown to html to prep for posting on blog/email/whatever."
task :email_to_html => :email do
  require 'redcloth'
  RedCloth::DEFAULT_RULES.replace [:markdown, :textile]
  
  email = File.read("email.txt")
  html = RedCloth.new(email).to_html
  html = text_helper.auto_link(html)
  File.open("email.html", "w") do |f|
    f << html
  end
end
 
desc "Do a full release of the multi_rails, including copying to stable tag, pushing docs and prepping for blog/announcement."
task :full_release => [:require_version, :publish_docs, :email_to_html, :release]
 
desc "Must supply the VERSION env var"
task :require_version do
  raise "You must supply a VERSION=x.x.x environment var to release!" unless ENV["VERSION"]
end
 
# it should be easier then this to do some g'd autolinking
def text_helper
  gem 'actionpack'
  require 'action_controller' # bringing this in for autolinks
  helper = Object.new
  helper.extend ActionView::Helpers::TextHelper
  helper.extend ActionView::Helpers::TagHelper
  helper
end